laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.24k stars 4.92k forks source link

Cannot perform filesystem sync on Android 11 after copying from Desktop #4457

Closed washbz250 closed 3 years ago

washbz250 commented 3 years ago

I am trying to sync between Android and Windows 10 with Syncthing/copying the Joplin folder and am unable to. I get the error "Cannot acquire sync lock: either the lock could be written but not read back. Or it was expired before it was read again."

Syncing with other options (Dropbox/OneDrive), however, does not give me this error.

I have tried deleting/recreating the locks folder (as suggested by a previous user although I now believe it was for a different issue), clearing App Data/Cache, force stopping the app, re-installing the app, and finally exporting and re-importing on the Desktop version then copying the folder back to Android.

Joplin also has all of the correct permissions.

Environment

Joplin version: 1.7.3 and 1.7.10 Platform: Android and Windows OS specifics: Android 11 and Windows 10

Steps to reproduce

  1. Sync to Filesystem with Desktop app
  2. Copy synced folder to Android after completion of sync
  3. Open Joplin on Android and set it up for Filesystem sync
  4. Synchronize

Describe what you expected to happen

Expected files to synchronize.

Logfile

Date,Level,Message
02-02T18:51:02,30,"""RevisionService::maintenance: Done in 144ms""
02-02T18:51:02,30,"""RevisionService::collectRevisions: Created revisions for 0 notes""
02-02T18:51:02,30,"""RevisionService::maintenance: Starting...""
02-02T18:51:02,30,"""RevisionService::maintenance: Service is enabled""
02-02T18:50:24,30,"""DecryptionWorker: cannot start because no master key is currently loaded.""
02-02T18:50:23,30,"""Total folders: 1""
02-02T18:50:23,30,"""Total notes: 5""
02-02T18:50:23,30,"""Total resources: 3""
02-02T18:50:23,20,"""There was some errors:""
02-02T18:50:23,20,"""Error: Cannot acquire sync lock: either the lock could be written but not read back. Or it was expired before it was read again.
index.android.bundle:1140:6123
y@index.android.bundle:109:587
index.android.bundle:109:1890
l@index.android.bundle:1140:1023
f@index.android.bundle:125:155
index.android.bundle:125:864
y@index.android.bundle:130:581
C@index.android.bundle:130:947
callImmediates@index.android.bundle:130:3004
value@index.android.bundle:27:2919
index.android.bundle:27:1095
value@index.android.bundle:27:2611
value@index.android.bundle:27:1065
value@[native code]
value@[native code]""
02-02T18:50:23,30,"""Operations completed: ""
02-02T18:50:23,10,"""Error: Cannot acquire sync lock: either the lock could be written but not read back. Or it was expired before it was read again.
index.android.bundle:1140:6123
y@index.android.bundle:109:587
index.android.bundle:109:1890
l@index.android.bundle:1140:1023
f@index.android.bundle:125:155
index.android.bundle:125:864
y@index.android.bundle:130:581
C@index.android.bundle:130:947
callImmediates@index.android.bundle:130:3004
value@index.android.bundle:27:2919
index.android.bundle:27:1095
value@index.android.bundle:27:2611
value@index.android.bundle:27:1065
value@[native code]
value@[native code]""
02-02T18:50:23,30,"""Sync target info:", "{"version":2}""
02-02T18:50:23,30,"""Starting scheduled sync""
02-02T18:50:23,30,"""Preparing scheduled sync""
02-02T18:50:22,30,"""ResourceService::deleteOrphanResources:", "[]""
02-02T18:50:22,30,"""ResourceService::indexNoteResources: Completed""
02-02T18:50:22,30,"""RevisionService::maintenance: Done in 125ms""
02-02T18:50:22,30,"""RevisionService::collectRevisions: Created revisions for 0 notes""
02-02T18:50:22,30,"""RevisionService::maintenance: Starting...""
02-02T18:50:22,30,"""RevisionService::maintenance: Service is enabled""
02-02T18:50:22,30,"""ResourceService::indexNoteResources: Start""
02-02T18:50:01,30,"""SearchEngine: Updated FTS table in 84ms. Inserted: 5. Deleted: 0""
02-02T18:50:01,30,"""SearchEngine: Updating FTS table...""
02-02T18:49:56,30,"""Synchroniser is missing credentials - manual sync required to authenticate.""
02-02T18:49:56,30,"""Saving updated Dropbox auth.""
02-02T18:49:56,30,"""Preparing scheduled sync""
02-02T18:49:56,30,"""RevisionService::maintenance: Done in 239ms""
02-02T18:49:56,30,"""RevisionService::collectRevisions: Created revisions for 0 notes""
02-02T18:49:55,30,"""RevisionService::maintenance: Service is enabled""
02-02T18:49:55,30,"""RevisionService::maintenance: Starting...""
02-02T18:49:52,30,"""DecryptionWorker: cannot start because no master key is currently loaded.""
02-02T18:49:51,30,"""RevisionService::runInBackground: Starting background service with revision collection interval 30000""
02-02T18:49:51,30,"""Application initialized""
02-02T18:49:51,30,"""SearchEngine: Updating FTS table...""
02-02T18:49:51,30,"""Running migration: 33""
02-02T18:49:51,30,"""Running migration: 27""
02-02T18:49:51,30,"""ResourceFetcher: Auto-added resources: 0""
02-02T18:49:51,30,"""Running migration: 20""
02-02T18:49:51,30,"""ResourceFetcher: Auto-add resources: Mode: always""
02-02T18:49:51,30,"""Trying to load 0 master keys...""
02-02T18:49:51,30,"""Loaded master keys: 0""
02-02T18:49:51,30,"""Loading folders...""
02-02T18:49:51,30,"""Sync target: 7""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: mermaid/mermaid_render.js => /data/user/0/net.cozic.joplin/files/pluginAssets/mermaid/mermaid_render.js""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: mermaid/mermaid.min.js => /data/user/0/net.cozic.joplin/files/pluginAssets/mermaid/mermaid.min.js""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/katex.css => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/katex.css""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Typewriter-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Typewriter-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Size4-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Size4-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Size3-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Size3-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Size2-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Size2-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Size1-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Size1-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Script-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Script-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_SansSerif-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_SansSerif-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_SansSerif-Italic.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_SansSerif-Italic.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_SansSerif-Bold.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_SansSerif-Bold.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Math-Italic.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Math-Italic.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Math-BoldItalic.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Math-BoldItalic.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Main-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Main-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Main-Italic.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Main-Italic.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Main-BoldItalic.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Main-BoldItalic.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Main-Bold.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Main-Bold.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Fraktur-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Fraktur-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Fraktur-Bold.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Fraktur-Bold.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Caligraphic-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Caligraphic-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_Caligraphic-Bold.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_Caligraphic-Bold.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: katex/fonts/KaTeX_AMS-Regular.woff2 => /data/user/0/net.cozic.joplin/files/pluginAssets/katex/fonts/KaTeX_AMS-Regular.woff2""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: highlight.js/atom-one-light.css => /data/user/0/net.cozic.joplin/files/pluginAssets/highlight.js/atom-one-light.css""
02-02T18:49:51,30,"""PluginAssetsLoader: Copying: highlight.js/atom-one-dark-reasonable.css => /data/user/0/net.cozic.joplin/files/pluginAssets/highlight.js/atom-one-dark-reasonable.css""
02-02T18:49:51,30,"""PluginAssetsLoader: Importing assets to /data/user/0/net.cozic.joplin/files/pluginAssets""
02-02T18:49:51,30,"""db.ftsEnabled = ", "1""
02-02T18:49:51,30,"""FTS check succeeded""
02-02T18:49:51,30,"""KeychainService: checking if keychain supported""
02-02T18:49:51,30,"""KeychainService: could not set test password - keychain support will be disabled""
02-02T18:49:51,30,"""Database is ready.""
02-02T18:49:51,30,"""Loading settings...""
02-02T18:49:51,30,"""Initializing tables...""
02-02T18:49:51,30,"""New version: 34. Previously recorded version: 0""
02-02T18:49:51,30,"""Migration failed with fallback and will not be repeated - saving version number""
02-02T18:49:51,30,"""Converting database to version 34""
02-02T18:49:51,30,"""Converting database to version 33""
02-02T18:49:51,30,"""Converting database to version 32""
02-02T18:49:51,30,"""Converting database to version 31""
02-02T18:49:51,30,"""Converting database to version 30""
02-02T18:49:51,30,"""Converting database to version 29""
02-02T18:49:51,30,"""Converting database to version 28""
02-02T18:49:51,30,"""Converting database to version 27""
02-02T18:49:51,30,"""Converting database to version 26""
02-02T18:49:51,30,"""Converting database to version 25""
02-02T18:49:51,30,"""Converting database to version 24""
02-02T18:49:51,30,"""Converting database to version 23""
02-02T18:49:51,30,"""Converting database to version 22""
02-02T18:49:51,30,"""Converting database to version 21""
02-02T18:49:51,30,"""Converting database to version 20""
02-02T18:49:51,30,"""Converting database to version 19""
02-02T18:49:51,30,"""Converting database to version 18""
02-02T18:49:51,30,"""Converting database to version 17""
02-02T18:49:51,30,"""Converting database to version 16""
02-02T18:49:51,30,"""Converting database to version 15""
02-02T18:49:51,30,"""Converting database to version 14""
02-02T18:49:51,30,"""Converting database to version 13""
02-02T18:49:51,30,"""Converting database to version 12""
02-02T18:49:51,30,"""Converting database to version 11""
02-02T18:49:51,30,"""Converting database to version 10""
02-02T18:49:51,30,"""Converting database to version 9""
02-02T18:49:51,30,"""Converting database to version 8""
02-02T18:49:51,30,"""Converting database to version 7""
02-02T18:49:51,30,"""Converting database to version 6""
02-02T18:49:51,30,"""Converting database to version 5""
02-02T18:49:51,30,"""Converting database to version 4""
02-02T18:49:51,30,"""Converting database to version 3""
02-02T18:49:51,30,"""Converting database to version 2""
02-02T18:49:51,30,"""Converting database to version 1""
02-02T18:49:51,30,"""Upgrading database from version 0""
02-02T18:49:51,30,"""Current database version", "null""
02-02T18:49:51,30,"""Checking for database schema update...""
02-02T18:49:51,30,"""Database was open successfully""
02-02T18:49:51,30,"""Starting application net.cozic.joplin-mobile (prod)""
02-02T18:49:51,30,"""====================================""
================================================================================
type,id,updated_time,sync_time,is_conflict

Screenshot_20210202-185858

Fabick75 commented 3 years ago

I've the same issue with my setup: two android devices, a raspberry pi3 and a linux workstation. After few notes update, the "locks" path disappear and I need to recreate manually inside joplin storage, to make things work again

washbz250 commented 3 years ago

I've the same issue with my setup: two android devices, a raspberry pi3 and a linux workstation. After few notes update, the "locks" path disappear and I need to recreate manually inside joplin storage, to make things work again

So for me the "locks" folder stays the whole time, but I had seen in one of the bug reports where someone got the same error and they deleted/remade that folder and the error was resolved (so I tried that). After looking further into it though, I believe it was a separate issue that was resolved with a subsequent update of Joplin.

My issue happens both initially upon installing the app with no data, and happens when I sync via something else (OneDrive/Dropbox/etc.) first, then try to sync to a folder that either has data in it or is empty (I've tried both).

I'm thinking it is something specific to the Android version as my Windows version is able to sync the same notes and all perfectly fine using Filesystem sync

Fabick75 commented 3 years ago

Just to make a quick test, now I've set in the .ignore file of syncthing the path "/locks" on all my systems. This could solve the problem ? We will see

stale[bot] commented 3 years ago

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.

stale[bot] commented 3 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.