Expected: Not say synced successfully and show error
Actual: Immediately says synced
Iāve been trying to get the sync server working for an hour. I can access the couchdb manually using curl, but for some reason the documents arenāt syncing. It would help if I can see the error in either the developer console or app, but there seems to be a bug where if the app thinks it synced successfully.
The only thing that is different is - Iām using a custom certificate authority for my host. The certificate authority is installed in my systemās root certs and other electron apps are able to validate the cert. Thatās the only thing I can think of as to why it would fail, but still I think it should show an error to make it easier to debug
Thanks for the report.
That makes sense. Since the sync runs in the main process and not in a renderer process, you canāt see errors in the developer console.
Instead, you can run the app directly from a terminal with --enable-logging option to see errors in the main process like so:
\path\to\Inkdrop.exe --enable-logging
As to the sync status, since the sync fails for so many reasons like web proxy, unstable network, etc, itās distracting to report every network error. So, it is by design.
I get what you mean that itās distracting to report every network error, but itās also misleading to update the ālast syncedā timestamp if the sync failed. Assuming the sync process updates the store with the last synced timestamp, maybe a suggestion would be to also update it with an error flag if the sync failed, so the timestamp can be replaced with āfailed to syncā. I understand if this isnāt a high priority though, since not a lot of people will use a custom couchdb instance.
I didnāt know about the enable logging option. Iāll use it the next time I get a chance to debug this.
The last synced timestamp indicates when the sync paused.
PouchDB doesnāt report errors when pausing the live sync.
Itās hard to properly handle every failure case.
Instead, Iāve added a section on how to debug the connection issues to the documentation: