Description
Hey guys, so I briefly tried newClientImplementation
and found out that it doesn't recover from a connection failure, meaning it doesn't retry uploading the transaction if the first attempt failed due to missing data connection. I also tried switching newClientImplementation
and method
individually, and the issue occurs only with newClientImplementation = true
so apparently nothing to do with ConnectionMethod.WebSocket
.
To reproduce:
- Write to the database while offline
- Wait for the sync attempt to fail
- Enable the data connection
- Wait for the changes to appear in Supabase
With the stable client, you have the following:
... do the write ...
Error in streamingSync: Unable to resolve host
... enable data connection ...
Could not apply checkpoint. Waiting for next sync complete line
... Supabase connector is called, transaction uploaded ...
validated checkpoint Checkpoint(...)
With the new client, you have this:
... do the write ...
Error in streamingSync: Unable to resolve host
... enable data connection ...
Could not apply checkpoint. Waiting for next sync complete line
[SQLite EXEC] BEGIN TRANSACTION
powersync_control(line_text, {"token_expires_in":602356})
[SQLite EXEC] SELECT powersync_control(?, ?) AS r
control result: []
... nothing else happens ...
Force-closing and re-opening the app doesn't help. The only way to get the transaction uploaded is to make another one, on this exact device with the data connection enabled – then the sync kicks back and the failed transaction gets uploaded.
Thanks.