Not able to sync if offline first
Opened this issue · 1 comments
JCKodel commented
I have a table that is synced for every user with holidays.
If the app initializes with a connection, that table is synced and all holidays are available on the SQLite.
If the app is offline when started, that table is NEVER synced anymore, no matter if the device become online (and PowerSync logs says FINE
), nor if I stop and restart the app online. It just ignores the table forever.
Steps to reproduce:
- Create a table in Postgres with some data (mine was about 130 records with date and name)
- Make sure your docker container is stopped, so the connection would fail
- Open the app and make sure to call PS connect (it will fail after some time, in the logs)
- Close the app (or don't, it doesn't matter)
- Start the docker container
- Run the app again (or wait for PS to connect automatically), you'll see the
FINE
log (which means the sync was done) - No data will be available in the SQLite database for that table
rkistner commented
Could you elaborate on the FINE
log that you see? FINE
is typically the level, and there should be more detailed log messages.
One guess: Quite often, issues like these are caused by data upload issues, which then blocks the download. Make sure that there are no errors thrown in your uploadData
function.