Exclusive lock error

Hi Community,

Just tried to upgrade Joplin (from v2.2.7 to v2.3.3) this morning (Win10 21H1 19043.1165 laptop) when I received this strange error message:

Error
The sync target could not be upgraded due to an error. For support, please copy the complete content of this page and paste it in the forum: https://discourse.joplinapp.org/

The full error was:

Cannot acquire exclusive lock because the following clients have a sync lock on the target: (desktop #4abbb6b47e5446ac89ef43d0d5060265)

Error: Cannot acquire exclusive lock because the following clients have a sync lock on the target: (desktop #4abbb6b47e5446ac89ef43d0d5060265)
    at LockHandler.<anonymous> (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\services\synchronizer\LockHandler.js:223:31)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\services\synchronizer\LockHandler.js:5:58)

Is there any manual operation I can do to fix this issue?

Thanks in advance for any help!

This looks like the same issue - just have to wait for the lock to time out unless you can release it yourself.

I got the same error today on my Android phone. I closed Joplin on my PC and laptop, retried to sync and the error vanished. Or was it just a coincidence ? :slight_smile:
Now everything's working as expected.
(Note : I updated all my Joplin installations yesterday)

No, it's expected. Sync locks expire so if you try a bit later it should fix itself. But I'm hoping to implement a way to avoid this error.

1 Like

You're right and everything's working fine after 15mn retry!

However, I still get this weird blank screen at first launch (must close the app and reopen to see the notes) and I now have a new issue: a large left margin displays on every note, thus reducing the available space for information... Any clue?

Thanks in advance for any help!

See here for more info: Please read this if you are wondering why there's now a margin on the note text - #2

1 Like

Many thanks Laurent, this dis the trick!

Hi there!

I am trying since yesterday and this error persists (win64 Joplin v. 2.3.5). It is occuring also in my android phone (v.2.3.4)...

Should I backup my notes and then delete the information in my webdav server?

Thanks for your help

I'm not sure what's happening exactly but sync locks expire after 3 minutes, so you could try this:

  • Close all your Joplin apps (mobile, desktop, cli)
  • Wait for 3 minutes
  • Open the desktop app and click on the upgrade banner as soon as it opens

Then the upgrade should work. If it doesn't, please post the complete error message here, along with the content of your About dialog.

Hi again!

I did it twice with 5 minutes interval. It did'nt work... this is the message I receive:

Error
The sync target could not be upgraded due to an error. For support, please copy the complete content of this page and paste it in the forum: https://discourse.joplinapp.org/

The full error was:

PUT locks/exclusive_desktop_86845757cb4a43808ee1af2fd4f7e3c2.json: Unknown error 2 (412): <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>412 Precondition Failed</title> </head> <body> <h1>412 Precondition Failed</h1> </body> </html>

Error: PUT locks/exclusive_desktop_86845757cb4a43808ee1af2fd4f7e3c2.json: Unknown error 2 (412): <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>412 Precondition Failed</title>
 </head>
 <body>
  <h1>412 Precondition Failed</h1>
 </body>
</html>

    at newError (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\WebDavApi.js:414:11)
    at WebDavApi.exec (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\WebDavApi.js:444:10)
    at async FileApiDriverWebDav.put (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\file-api-driver-webdav.js:201:10)

This is a problem with your server. You might want to check in particular if the "locks" folder exists and if it can be written too.

5 posts were split to a new topic: Error "412 Precondition Failed" with lighthttp WebDAV server

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