Fail-safe - Every day

Operating system

Windows

Joplin version

3.4.12

Sync target

Joplin Server

What issue do you have?

I'm just not understanding how sync is supposed to work. I have Joplin currently installed on two Windows desktops and on one Android phone. They all are set to sync every five minutes and on the desktops, Joplin minimizes to the systray when closed.

If I edit or add a note on one device and immediately perform a manual sync, then later, work on one of the other devices, it always says fail-safe stopped the sync even if I perform a manual sync on the then current device. I have to completely close Joplin, then the sync completes upon reopening Joplin.

This happens a lot. To reiterate, I do immediately perform a manual sync after I edit a note on the device that I'm currently working on.

So what is happening and how do I avoid this issue?

Are you saying that on a device which presents the fail-safe error, if you close Joplin on all other devices, then the sync is sucessful on the device which had the fail-safe error?

Also, how many devices do you get the fail-safe error on?

Can you attach a log file from one of the devices which you get the error?

Not exactly. If I close Joplin on the device that has the fail-safe error, the subsequent sync is successful when I re-open Joplin, on that same device. I experience this on all three devices.

As this is happening on multiple devices it seems like some problem with your data on the Joplin Server end. I can’t really tell the problem though without further information.

Can you reproduce the issue for both getting the fail-safe error and then the successful sync following it and then send over a log file for that client? If you don’t want to send the whole log then just send the output starting from at least 1 hour before reproducing the issue and until the end of the log

@jeffshead Given that you also raised this topic Conflict - Neither matches it seems like your profile got messed up somehow and you need to start over. See How to fix synchronisation issues and start over

It would still be helpful if you could send a log over first though, as the fail-safe error should happen on every sync when it occurs, and it would be useful to know why the first sync after restarting does not report the error

I already started over, twice. Completely new profile, notes, server, client app installs, etc. Still encountering same fail-safe errors.

Is the log file that you want to view located here: C:\Users\Jeff.config\joplin-desktop\log.txt

It contains a lot of data that I would rather not post in the public. I do see a lot of the following errors:

<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
Code: 404
Error: Error 404 Not Found: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
    at newError (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3346:1960)
    at UAt.exec_ (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3346:2359)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async UAt.exec (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3346:2709)
    at async e.refreshShares (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3353:11060)
    at async e.maintenance (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3353:11733)
    at async e.start (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3343:62789)
    at async timeoutCallback (file:///C:/Users/Jeff/AppData/Local/Programs/Joplin/resources/app.asar/main-html.bundle.js:3231:26834)
2025-09-29 21:13:09: Performance: ShareService/maintenance: End at 173286.86s (took 0.49s)
2025-09-29 21:13:09: Synchronizer: Fail-safe: Sync was interrupted to prevent data loss, because the sync target is empty or damaged. To override this behaviour disable the fail-safe in the sync settings.
2025-09-29 21:13:09: Synchronizer: Sync: finished: Synchronisation finished [1759194788953]
2025-09-29 21:13:09: Synchronizer: Operations completed: 
2025-09-29 21:13:09: Synchronizer: Total folders: 1
2025-09-29 21:13:09: Synchronizer: Total notes: 11
2025-09-29 21:13:09: Synchronizer: Total resources: 6
2025-09-29 21:13:09: Synchronizer: [warn] There was some errors:
2025-09-29 21:13:09: Synchronizer: [warn] Fail-safe: Sync was interrupted to prevent data loss, because the sync target is empty or damaged. To override this behaviour disable the fail-safe in the sync settings.
2025-09-29 21:13:09: checkDisabledSyncItemsNotification: No errors: Hiding notification
2025-09-29 21:13:10: DecryptionWorker: starting decryption...
2025-09-29 21:13:10: DecryptionWorker: completed decryption.
2025-09-29 21:13:19: SearchEngine: Updating FTS table...
2025-09-29 21:13:19: Updating items_normalized from {"updated_time":1759022405476,"id":"b5b9cc14bd40443db1885a3d651ac767"}
2025-09-29 21:13:19: SearchEngine: Updated FTS table in 2ms. Inserted: 0. Deleted: 0
2025-09-29 21:13:19: Performance: SearchEngine/syncTables: End at 173296.49s (took 111.5ms)
2025-09-29 21:15:07: RevisionService: maintenance: Starting...
2025-09-29 21:15:07: RevisionService: maintenance: Service is enabled
2025-09-29 21:15:07: RevisionService: collectRevisions: Created revisions for 0 notes
2025-09-29 21:15:07: RevisionService: maintenance: Done in 115ms
2025-09-29 21:15:09: OcrService: Found 0 resources to process...
2025-09-29 21:15:11: OcrService: 0 resources have been processed.
2025-09-29 21:18:09: Running background sync on timer...
2025-09-29 21:18:09: Preparing scheduled sync
2025-09-29 21:18:09: Starting scheduled sync
2025-09-29 21:18:09: Synchronizer: Sync: starting: Starting synchronisation to target 9... supportsAccurateTimestamp = true; supportsMultiPut = true} [1759195089960]
2025-09-29 21:18:09: Synchronizer: Indexing resources...
2025-09-29 21:18:09: ResourceService::indexNoteResources: Start
2025-09-29 21:18:10: Performance: ResourceService/indexNoteResources: End at 173587.38s (took 115.7ms)
2025-09-29 21:18:10: ResourceService::indexNoteResources: Completed
2025-09-29 21:18:10: ShareService: [error] Maintenance: Failed to update share invitations: Error: Error 404 Not Found: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

As soon as I close/stop the Joplin client app and restart it, it syncs just fine.

The only thing that I can think of at this point is that I am sometimes connected to a VPN and sometimes the connection drops when I'm away from the computer and the Joplin client remains open in the systray. However, when the connection drops, the Internet and the Joplin sync server are still accessible via any Internet browser. I'm wondering if the Joplin clients just aren't able to handle the network change when the VPN connection drops and that's why the clients have to be restarted. What do you think? Actually, I just tested my theory by having the VPN connected and opening the Joplin client. It syncs just fine before and after manually disconnecting the VPN even without restarting the Joplin client.

You could try setting up different sync target, let’s say WebDAV and see if that resolves the issue.

Wouldn't this be client-side related if simply restarting the clients resolves the issue?

From your partial log it seems likely the issue is related to your server network configuration. There’s all kind of issues which can happen with self hosted instances which I can’t really help with, as I don’t understand network configuration myself.

There are 2 types of fail-safe error and the one you are getting means the main sync configuration item could not be found on the server. I’m not sure if the 404 error you are getting in the logs is related to the fail-safe error or the share service error, but it’s clear that at least intermittently the Joplin client is unable to retrieve the required resources from your server. It may be worth trying WebDAV server instead as mentioned, but I can’t guarantee this will resolve the issue if there is actually some problem with your network configuration.

It may well be there is some kind of connection reset when restarting the Joplin client, but you’re also saying you can get successful syncs after the first sync as well, based on your VPN test, so that’s probably irrelevant.

So it sounds like the underlying issue is with your server. You could prove or disprove this by opening a Joplin Cloud free trial and seeing whether you get these issues when syncing to the Joplin Cloud target.

Also a disclaimer: Do not turn off the fail-safe. If it’s true that the sync is fully working intermittently and then getting the fail-safe error the rest of the time, if you turned off the fail-safe it may end up deleting all your data on the client when it was originally failing, and then when the sync does it work it will push the deletions to the server. Not something that you would want to happen! Basically the option to turn off the fail-safe is only there for if you actually want to delete everything (or almost everything) on the server

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.