-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Android sync gets permanently stuck whilst seemingly doing nothing #8402
Comments
Same here, except it never worked. |
I am also experiencing this issue for a while now and was looking for solutions. The syncing on the mobile app gets stuck indefinitely up until an error "Cannot acquire exclusive lock because the following clients have a sync lock on the target" appears. Do not know why this happens as no other device is syncing. My sync target is Dropbox. This only happens on the android app. |
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. |
Update: the issue is still present, fix seems to be going on desktop app and manually triggering sync, syncing on android app then works. |
This is so frustrating. It seems like it's not even syncing, it just gets stuck doing nothing, but saying it's syncing. From checking the log, it doesn't appear to be trying to sync. The only way to make it realise that it isn't syncing is to force the lock to happen, as described before. One thing I've noticed is sometimes after a successful sync it will immediately say "Syncing" again, could be related? |
Same issue on Android 13 syncing to dropbox... |
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. |
Still a problem. |
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. |
No it hasn't magically fixed itself. |
Hi, please prioritize this bug.
This is very frustrating and it happens every time you try to sync. Before it was once in while. Mobile:
Desktop:
Server: dropbox |
Don't connect Dropbox directly from Joplin Android. https://discourse.joplinapp.org/t/i-solved-android-stopped-syncing/33988?u=ranicloudy |
Trying to trace down how to reproduce the behaviour here. I have a suspicion that the behaviour is caused by syncing mobile client with unresolved conflicts. Can anyone confirm or deny? |
I think it happens to me regardless of if there are conflicts. |
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. |
This is still an issue. I still have to do often the workaround from https://www.reddit.com/r/joplinapp/comments/p9pqsh/comment/j5yqje8/
|
Same situation here sadly.
|
If the error mentions a sync lock, this is another possible workaround (originally written for OneDrive, but should also apply to Dropbox):
Additionally:
But from the comments above, the issue doesn't seem to resolve after a few minutes... If deleting the lock file helps, there may be a bug in lock file expiration. |
@personalizedrefrigerator thank you. This workaround just worked for me. The issue does seem to have something to do with lock expiration since behaviour persists seemingly indefinitely Any tip how can one track down the process for lock to fail to expire? I have a feeling (based on what people stated in the past related to the issue) it happens during the desktop update on new version (from 2.12 to 2.13, from 2.13 to 2.14 etc) but mobile app stays on previous version. I'll try testing this hypothesis with various parameters but at this point I'm as good as blind guessing. Upd this hypothesis was wrong |
I just got in the same situation, phone stopped sync couple of days ago. There is no error message, just stuck in syncing or cancelling if you try. Resolved by deleting the files locks directory. |
I have now had it happen in the Desktop app (Windows)! It just appeared to be syncing forever, and couldn't be cancelled. Then I remembered this bug, and the same fix worked but in reverse. I opened the Android app and told it to sync, then the desktop app got locked out of sync, and then it was able to sync afterwards. |
@laurent22 seems like this could be a candidate for a deeper look? Seems that the lock simply isn't released or that the behavior to nuke the /locks files could be defaulted to? |
Perhaps here: https://github.com/laurent22/joplin/blob/dev/packages/lib/services/synchronizer/LockHandler.ts#L136 |
I feel like this post (that I made) may have some useful info: In short, there may be stale files in joplin's sync location (in my case dropbox) |
@robme same issue here. I'm using Windows + Android + Dropbox, and the sync was hanging on Windows. The "reverse" fix did the trick for me--thanks! |
@slimygorilla72, thank you for sharing this as a clue as I am using Dropbox as my sync destination. (I am NOT using Dropsync.) I had this issue yesterday (10/10/2024) on my Android phone, which I resolved by manually re-setting up sync on the device. I had this same issue today on a different Android device (Boox tablet) after using Joplin and syncing without issues on my phone, Windows, and Mac devices. After getting stuck in the endless sync loop on my Boox tablet, I made sure to quit out of any open instances of Joplin across all devices, but the issue persisted. I then opened Joplin on Mac and experienced the same behavior (but on my Android phone, it appeared that sync was working fine). To cut to the chase, I checked Dropbox\Apps\Joplin\locks and saw I had FIVE lockfiles in place, one of which had a modified date of 10/10/2024 (yesterday's date). The other four locks were from dates in 2021, 2022, and 2023. I closed Joplin on all my devices, trashed all the lockfiles, and tried sync again from my Boox tablet. Lo and behold, sync started running! It has since finished and my \locks folder is now empty. Not sure why those lockfiles had stuck around, but they didn't seem to be getting in the way. However, they could be clues to uncovering the root cause of this issue. |
Possibly related: #11188 — sync state was not being reset to |
Thanks for the link to your work @personalizedrefrigerator, I would guess what observed is caused by what you are fixing. I wish I had a more exact idea of what I did around the time that latest lockfile was modified on 10/10 to be certain, but I suppose if your updates don't fix it (unlikely), I can troubleshoot again. I don't understand all of the code you wrote but from what I can understand, the sync function looks more robust and resilient now - great work :) |
I'm splitting this from #8123 since it is a different issue.
This is a long-term issue going on for years described elsewhere on the internet e.g.
Environment
Joplin version: 2.11.31
Platform: Android 13
OS specifics: using Dropbox as sync mechanism, encryption enabled
Steps to reproduce
This happens randomly, so I don't know the exact cause.
It will continue like this forever. The only way to resolve it is to force it to get locked out by repeatedly force closing the app and opening it whilst also syncing on another device. This isn't always easy because if there is nothing to sync on desktop then it's very quick, so you have to get the timing just right to cause it to lock. After being locked out, it will regain the ability to sync.
Describe what you expected to happen
It should always be able to sync. The app is essentially unusable when this happens almost every day. I don't always have the ability to get to a computer to do the fix.
Logfile
The text was updated successfully, but these errors were encountered: