Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync fails but displays "Completed" when getaddrinfo results in ENOTFOUND #6173

Closed
hmhackmaster opened this issue Feb 17, 2022 · 52 comments
Closed
Labels
bug It's a bug stale An issue that hasn't been active for a while...

Comments

@hmhackmaster
Copy link

Environment

Joplin version: 2.6.10 (prod, win32)
Platform: Windows
OS specifics: Windows 11

Steps to reproduce

  1. Add a sync target (in my case, Nextcloud via WebDAV) and perform initial syncs
  2. At some point, make Joplin (or the whole OS) unable to resolve the WebDAV server's FQDN
    • An "nslookup" of the server's FQDN in the OS would return "DNS request timed out"
  3. The following things will occur:
    • The sync status text above the Synchronize button will display "Completed: DATE TIME (20s)"
    • The Synchronization Status page will not show any errors
  4. Add a new note, perform a manual sync
  5. The sync will silently continue to fail:
    • No errors will be displayed in the UI that the sync does not complete
    • On the Synchronization Status page, the "synced items" and "total items" will begin to differ
    • The Synchronization Status page's Debug Report will show no new entries since the last successful sync (including no new Note IDs for any of the new notes)
    • The log.txt file will reveal the actual error, reproduced below

There may be other scenarios beyond the ENOTFOUND result reproduced below that would result in a false-Completed message displayed, this is only what happened in my particular scenario

Once the DNS lookup failure is resolved (for example, by adding an entry into the Operating System's HOSTS file) the next sync works correctly and all note changes are correctly synced.

Describe what you expected to happen

A transient fault (like the server's FQDN not resolving as experienced here) should result in some sort of indication that the sync did not complete, which would allow the user to debug further or at least know that the user should not expect the data to be synced to other devices yet.

I would expect the UI to indicate that the sync failed and to hopefully reveal some additional error information, such as the "reason" output from the Synchronizer task's FetchError.

Logfile

2022-02-17 13:20:54: "Preparing scheduled sync"
2022-02-17 13:20:54: "Starting scheduled sync"
2022-02-17 13:20:54: Synchronizer: "Sync: starting: Starting synchronisation to target 5... supportsAccurateTimestamp = false; supportsMultiPut = false [1645122054694]"
2022-02-17 13:20:54: Synchronizer: "Indexing resources..."
2022-02-17 13:20:54: "ResourceService::indexNoteResources: Start"
2022-02-17 13:20:54: "ResourceService::indexNoteResources: Completed"
2022-02-17 13:21:01: "SearchEngine: Updating FTS table..."
2022-02-17 13:21:01: "SearchEngine: Updated FTS table in 29ms. Inserted: 1. Deleted: 0"
2022-02-17 13:21:22: Synchronizer: "FetchError: request to https://totallyrealfqdn.test/remote.php/dav/files/mpotts/Joplin/info.json failed, reason: getaddrinfo ENOTFOUND totallyrealfqdn.test
Code: ENOTFOUND
FetchError: request to https://totallyrealfqdn.test/remote.php/dav/files/mpotts/Joplin/info.json failed, reason: getaddrinfo ENOTFOUND totallyrealfqdn.test
    at ClientRequest.<anonymous> (C:\Users\mpotts\AppData\Local\Programs\Joplin\resources\app.asar\node_modules\@joplin\lib\node_modules\node-fetch\index.js:133:11)
    at ClientRequest.emit (events.js:376:20)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:376:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)"
2022-02-17 13:21:22: Synchronizer: "Sync: finished: Synchronisation finished [1645122054694]"
2022-02-17 13:21:22: Synchronizer: "Operations completed: "
2022-02-17 13:21:22: Synchronizer: "Total folders: 25"
2022-02-17 13:21:22: Synchronizer: "Total notes: 129"
2022-02-17 13:21:22: Synchronizer: "Total resources: 31"
2022-02-17 13:21:23: "DecryptionWorker: cannot start because no master key is currently loaded."
@hmhackmaster hmhackmaster added the bug It's a bug label Feb 17, 2022
@laurent22
Copy link
Owner

Normally if the sync configuration check passed, this ENOTFOUND error is temporary so that's why it's not reported. There are other errors like ECONNRESET or ETIMEDOUT which are not reported because we don't want to flood the user with temporary errors (which are solved on next sync). I can appreciate in some cases like yours it might have been nice to show the error but getting the right balance is tricky.

@hmhackmaster
Copy link
Author

I totally understand not displaying a popup or other intrusive notification that there is a temporary error but I do feel that the status text could at least not indicate that the sync was successful.
In my scenario, I spent quite a few minutes troubleshooting when a small change to a note made on one computer didn't appear on another and, had I not specifically checked for the small change, the result would have been, in my case, an incomplete set of commands that would have been a bad time.

While I would uniquely appreciate the value of knowing that the server is temporarily not responding (since I run the server), I think a user knowing that any sync target failed would at least let the user know that they are currently in the somewhat dangerous void of not everything is synced and to have the foreknowledge that they should not expect the updates to appear on other devices for the time being.

If the goal is to hide any temporary errors, perhaps it's better to just hide the "Sync: Completed" text entirely (so it's not like the app is just lying to the user) and only show an error if the user manually selects "Synchronize" ?
Otherwise I would propose just replacing the "Completed" text with something like "Temporary sync error" in a warning-style yellow (potentially with a mouseover that contains more details); This would seem to me to be non-intrusive enough to not bother a user yet keep the user's expectations on the status of their data accurate.

@Perkolator
Copy link
Contributor

While testing other thing, I disconnected from internet before running Joplin and I noticed that the sync message incorrectly said completed even though I could see the ENOTFOUND error in the console. And even when I manually clicked the sync button.

@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Apr 16, 2022
@Perkolator
Copy link
Contributor

Leave it open.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Apr 17, 2022
@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label May 17, 2022
@Perkolator
Copy link
Contributor

Open sesame.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label May 18, 2022
@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Jun 18, 2022
@Perkolator
Copy link
Contributor

open

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Jun 19, 2022
@antontkv
Copy link
Contributor

Showing users that there is a sync error, even temporary, is the right thing to do. User should know that there is a problem with saving. Right now it misleading, and showing "Completed" without any indication of an error is just lying to the user.

@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Jul 24, 2022
@Perkolator
Copy link
Contributor

open

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Jul 26, 2022
@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Aug 26, 2022
@Perkolator
Copy link
Contributor

öppen

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Aug 27, 2022
@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Sep 26, 2022
@Perkolator
Copy link
Contributor

This close-bot stuff is ridiculous. Review an issue and assign it to some label that is exempt from auto-closing bot, or close the issue yourself with "wontfix" explanation. This current auto-close system is totally bs, I really don't understand what the point of this is.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Sep 27, 2022
@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Sep 30, 2023
@Perkolator
Copy link
Contributor

...

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Oct 1, 2023
Copy link
Contributor

github-actions bot commented Nov 1, 2023

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Nov 1, 2023
@darkdragon-001
Copy link
Contributor

.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Nov 2, 2023
Copy link
Contributor

github-actions bot commented Dec 3, 2023

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Dec 3, 2023
@darkdragon-001
Copy link
Contributor

.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Dec 4, 2023
Copy link
Contributor

github-actions bot commented Jan 3, 2024

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Jan 3, 2024
@personalizedrefrigerator personalizedrefrigerator removed the stale An issue that hasn't been active for a while... label Jan 3, 2024
@darkdragon-001
Copy link
Contributor

.

Copy link
Contributor

github-actions bot commented Feb 3, 2024

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Feb 3, 2024
@darkdragon-001
Copy link
Contributor

.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Feb 4, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Mar 5, 2024
@darkdragon-001
Copy link
Contributor

.

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Mar 6, 2024
@roman-r-m
Copy link
Collaborator

@laurent22 I think you need to decide what the expected behaviour should be and either close it, or it can even be a good first issue for gsoc as the fix seems to be quite trivial.

Copy link
Contributor

github-actions bot commented Apr 6, 2024

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Apr 6, 2024
@Perkolator
Copy link
Contributor

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug stale An issue that hasn't been active for a while...
Projects
None yet
Development

No branches or pull requests

8 participants