Why are some sync error messages not shown in the GUI?

Recently I found out that Joplin doesn’t show all sync error messages in the left sidebar. This can be easily reproduced by making a new note and clicking on “Synchronize” while being offline. In this case I would expect to see an error message in the left sidebar unless the sync target is the file system but this is not the case. Instead it is shown “Completed” in the left sidebar as shown in the following screenshot:
2020-08-30_10-00
The error message is only shown in the log file in this case.

If you are not aware that you are offline you can easily get confused that changes on one devices are not synced to another device. Also FetchErrors triggered by syncing large file attachments to a WebDAV Server will currently only be shown in the log file but not in the sidebar.

I initially thought that this is a Bug and I wanted to fix this. But after investigating the source code I found out that it is actually intended that Joplin doesn’t show some error types such as “Network timeout” and “ECONNREFUSED” in the GUI. I see many disadvantages and no advantages in hiding those messages but maybe I am missing something. So why is Joplin hiding some error messages in the GUI?

2 Likes

I agree this UI is misleading. In particular on mobile, where the data connection might be unreliable, it would be important to know if the sync actually succeeded, and the latest revision of my notes made it onto the device. Also see this issue filed: https://github.com/laurent22/joplin/issues/3851

1 Like

The flip side of this is that some users have an unreliable connection (not everyone has a data plan), so they'll see connection errors all the time in the sidebar. Eventually displaying an error in there would be useless since we'd have train users to ignore them.

Maybe what we need is an online status or something similar to show that Joplin is connected to the internet. Or when the user initiates the sync (by clicking the button) we display all the errors including connection issue, not sure what solution would be best.

1 Like

It sounds like you want to differentiate between sync and connection errors? With a sync error, where the sync target was reached and the actual sync itself failed, being potentially more important and serious, but with a connection error being common, expected, temporary, and unproblematic?

In my mind, the ideal, informative message after a sync that didn't connect would be something like:

Attempted: yyyy-mm-dd hh:mm
Unable to reach [sync_target] (maybe this line isn't needed)
Completed: yyyy-mm-dd hh:mm (this would be the time of the last successful sync)

I'm conscious of not overloading the sidebar status area, but would be interested everyone's thoughts.

2 Likes

It's not just connection errors, in general the app differentiate between errors that can be solved by repeating the request, and those that cannot. The code is ins there: joplin/ReactNativeClient/lib/shim.ts at 871f8b3a72f473dc05ae8aab8a391915c9ce87a5 · laurent22/joplin · GitHub

1 Like

The flip side of this is that some users have an unreliable connection (not everyone has a data plan), so they'll see connection errors all the time in the sidebar. Eventually displaying an error in there would be useless since we'd have train users to ignore them.

Thanks for this clarification. I understand that it is not good to show the original error message when users are offline as they won't take the error message seriously later when it is not due to missing internet connection. But I think this would not happen when there is a clear message when a user syncs while being offline. So maybe it should be shown a message: "Error: you are offline" (or something similar). In this case I am sure that a user would take a different Error serious.

Maybe what we need is an online status or something similar to show that Joplin is connected to the internet.

You mean something like that:

Online

Offline

I like that idea but not sure if it is worth the effort.

1 Like

That looks good and would be a nice UI improvement if replacing "Completed" with "Failed" is too complicated.

I would prefer to replace "Completed" with "Failed" if a sync is not successfully finished.

My open issue to this topic: https://github.com/laurent22/joplin/issues/3851#issuecomment-705723342

Functionally, my main issue is that I have no easy way of telling as of what timestamp the notes on my Android phone are current. Technically this also applies to my Windows PC, but there I take internet connectivity for granted.

Currently, if a sync was successful, and some syncing activity took place, I can easily see my device is up to date, because the detailed sync activity notes provide an indication of success.
Examples on Windows:
2020-10-11 2036 Joplin Sync

2020-10-11 2040 Joplin Sync

2020-10-11 2048 Joplin Sync

Example on Android:

But I can't differentiate a successful connection with nothing to sync from a failed attempt, because they look the same. Therefore, one can't actually rely on the notes being current as of the timestamp shown.
Windows:
2020-10-11 2053 Joplin Sync

Android:

In fact, on Android, the only way to I can find to know for sure as of when the notes are synced, is going to the log files. Maybe I'm missing something here, if so, please let me know.

On the online status, I'm not sure it's the way to go, because the devil is in the details: What should "online" mean here? Any connectivity to the internet? Ability to reach the sync target? As of when? Would this be checked at a different frequency that the sync frequency?

I guess it's caused by the frequently auto sync.
How about hiding the Completed/Failed message if network errors(or other errors with shim.fetchRequestCanBeRetried() == true) occur? Users won't "be trained to ignore errors" if so, and they won't be mislead by the Completed message. Specifically, the network errors message could be shown in a few seconds then disappear.
Otherwise we can separate the sync operations into the user requested ones and the auto-triggered ones. For the former, users are expected to know the details so all error information should be shown. For the latter, Joplin can only show Completed when the sync is successful. If the temporary errors occur, then the message should be hided.