This problem has a long history.
Related posts in the forum and GitHub issue
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 …
opened 11:05AM - 30 Sep 20 UTC
closed 11:15PM - 14 Nov 20 UTC
stale
## Environment
Joplin version: 1.1.4
Platform: macOS
OS specifics: 10.15.7
…
## Steps to reproduce
1. Check sync state in UI after server (i.e. Nextcloud) is offline
## Describe what you expected to happen

Ui should show an error and not "complete".
## Logfile
-
opened 07:57PM - 15 Sep 22 UTC
closed 04:02PM - 15 Jul 23 UTC
bug
stale
## Environment
Joplin version: 2.8.1
Platform: linux (terminal)
OS specific… s: Ubuntu 22.04 + Docker + node image
## Steps to reproduce
1. Set up Dropbox sync and add some notes
2. Completly disable network
3. Run joplin sync
4. Joplin acts as everything succeeded, the exit code is 0 and there's no error shown in the stdout/stderr. Note: network errors are logged in log.txt
## Describe what you expected to happen
joplin shows errors to the terminal, and exit with a non-zero code
opened 07:02PM - 04 Nov 22 UTC
closed 10:58AM - 06 Nov 22 UTC
bug
I sync my Joplin apps through my local WebDAV server. If I am outside the networ… k, the server cannot be reached. When I then click the "Sync" button, nothing happens for a while until it times out. After that, the message "Completed" appears with a time stamp. This suggests that the synchronization was successful.
## Environment
Joplin version: 12.8.1
Platform: iOS
OS specifics: 15.7.1
## Steps to reproduce
1. Configure (local) WebDAV server as sync target
2. Be not connected to your local network, the WebDAV server must not be reachable
3. Press sync button at the bottom of the burger menu
## Describe what you expected to happen
Message "Sync failed" after timeout, maybe together with the reason of the network stack.
## Logfile


Related code
fetchRequestCanBeRetried: (error: any) => {
if (!error) return false;
// Unfortunately the error 'Network request failed' doesn't have a type
// or error code, so hopefully that message won't change and is not localized
if (error.message === 'Network request failed') return true;
// request to https://public-ch3302....1fab24cb1bd5f.md failed, reason: socket hang up"
if (error.code === 'ECONNRESET') return true;
// OneDrive (or Node?) sometimes sends back a "not found" error for resources
// that definitely exist and in this case repeating the request works.
// Error is:
// request to https://graph.microsoft.com/v1.0/drive/special/approot failed, reason: getaddrinfo ENOTFOUND graph.microsoft.com graph.microsoft.com:443
if (error.code === 'ENOTFOUND') return true;
// network timeout at: https://public-ch3302...859f9b0e3ab.md
if (error.message && error.message.indexOf('network timeout') === 0) return true;
// name: 'FetchError',
This file has been truncated. show original
I got the idea that some network errors are temporary, hiding them from the sidebar is reasonable.
However, the current version doesn't show most of the network errors at all. If the phone doesn't have the network connection and the user doesn't realize this, he/she will think the sync is completed from the message of the side bar.
Can we test the network connection to the sync target before sync? If Joplin just can't connect to the sync target, then user should get a message in the side bar. I think this solution covers most of the cases when users think they are misled by the Completed
message in sidebar.
system
Closed
24 November 2024 17:15
2
This topic was automatically closed 730 days after the last reply. New replies are no longer allowed.