Sync is broken after adding a picture to note

Operating system

Android

Joplin version

2.14.9

Desktop version info

2.14.22

Sync target

S3

Editor

Markdown Editor

What issue do you have?

After I added a pic to note on android, Sync wouldn't finish and the cancel button didn't work.

I deleted the note with pic, but Sync still wouldn't work.

I closed joplin on android, Sync on desktop also wouldn't work. Showing following error:
Error: Cannot acquire exclusive lock because the following clients have a sync lock on the target:

I'm using Cloudflare R2 as S3 storage.

Error log from Android:

06-06T21:51:03: Synchronizer: "Could not refresh lock - cancelling sync. Error was:", "Error: Lock has expired
Code: lockExpired
Error: Lock has expired
at construct (native)
at apply (native)
at _construct (address at index.android.bundle:1:2619942)
at Wrapper (address at index.android.bundle:1:2619599)
at construct (native)
at createSuperInternal (address at index.android.bundle:1:2618675)
at call (native)
at JoplinError (address at index.android.bundle:1:2619053)
at ?anon_0
(address at index.android.bundle:1:2912346)
at next (native)
at fulfilled (address at index.android.bundle:1:2907992)
at tryCallOne (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)
at anonymous (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)
at apply (native)
at anonymous (address at index.android.bundle:1:219452)
at _callTimer (address at index.android.bundle:1:218401)
at _callReactNativeMicrotasksPass (address at index.android.bundle:1:218565)
at callReactNativeMicrotasks (address at index.android.bundle:1:220540)
at callReactNativeMicrotasks (address at index.android.bundle:1:121846)
at anonymous (address at index.android.bundle:1:120939)
at guard (address at index.android.bundle:1:121687)
at flushedQueue (address at index.android.bundle:1:120850)
at invokeCallbackAndReturnFlushedQueue (address at index.android.bundle:1:120793)"
06-06T14:27:38: NoteEditor: "CodeMirror:", "error:Cannot read properties of null (reading 'style'): {}"
06-05T18:01:30: Synchronizer: "There was some errors:"
06-05T18:01:30: Synchronizer: "Error: Could not encrypt item dec5b2ccc4c745cb9dbfaae017ef6c1a: Master key is not loaded: aeca36f702b84b16bad3108dda136d40
Error: Master key is not loaded: aeca36f702b84b16bad3108dda136d40
at loadedMasterKey (address at index.android.bundle:1:1359126)
at ?anon_0
(address at index.android.bundle:1:1362896)
at next (native)
at anonymous (address at index.android.bundle:1:1357111)
at tryCallTwo (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:61:9)
at doResolve (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:216:25)
at Promise (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:82:14)
at anonymous (address at index.android.bundle:1:1356938)
at encryptAbstract
(address at index.android.bundle:1:1362756)
at ?anon_0
(address at index.android.bundle:1:1364733)
at next (native)
at anonymous (address at index.android.bundle:1:1357111)
at tryCallTwo (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:61:9)
at doResolve (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:216:25)
at Promise (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:82:14)
at anonymous (address at index.android.bundle:1:1356938)
at encryptString (address at index.android.bundle:1:1364670)
at ?anon_0
(address at index.android.bundle:1:2611646)
at next (native)
at fulfilled (address at index.android.bundle:1:2603361)
at tryCallOne (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:53:16)
at anonymous (/root/react-native/ReactAndroid/hermes-engine/.cxx/MinSizeRel/5p1x2e66/arm64-v8a/lib/InternalBytecode/InternalBytecode.js:139:27)
at apply (native)
at anonymous (address at index.android.bundle:1:219452)
at _callTimer (address at index.android.bundle:1:218401)
at _callReactNativeMicrotasksPass (address at index.android.bundle:1:218565)
at callReactNativeMicrotasks (address at index.android.bundle:1:220540)
at __callReactNativeMicrotasks (address at index.android.bundle:1:121846)
at anonymous (address at index.android.bundle:1:120939)
at __guard (address at index.android.bundle:1:121687)
at flushedQueue (address at index.android.bundle:1:120850)
at invokeCallbackAndReturnFlushedQueue (address at index.android.bundle:1:120793)"