floccus: Nextcloud Syncing stuck

Which version of floccus are you using?

4.17.1

Sync method

Nextcloud Bookmarks

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Firefox (different versions; different platforms (Mac & Windows))

Which version of Nextcloud Bookmarks are you using? (if relevant)

11.0.4 (and earlier)

Which version of Nextcloud? (if relevant)

25.0.1 (and earlier)

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

This case is a variant of #1252, but with Nextcloud-Bookmarks being the sync endpoint.

From my post in #1252:

Now, for quite some time, I also experience this “lock” on multiple devices (all Firefox). From my recent observations I encounter this situation regularly (if not always?), when the particular Windows or Mac host is woke from hibernation, I notice that Floccus shows a current sync operation, but without anything happening. In fact, it stays in that state basically permanently. How long this state persisted can be seen on the others share “Last synchronized” message, which not seldom shows “x days ago” - with a configured sync interval of 1h!

Since this situation does not recover automatically as I would conclude from your FAQ message about stale locks and the 30min lock override, I assume that this is not related to a lock file present on the server.

Expected Behavior

No sync deadlock.

To Reproduce

I’m not sure how the initial deadlock happens. As it appears, one of the participating floccus clients eventually sets a lock, but doesn’t clear that afterwards.

One thing that can be reproduced quite easily is the dysfunction of the automatic lock-removal (after 30min):

  • create a manual lock on the particular bookmark folder by setting a current timestamp via SQL: UPDATE bookmarks_root_folders SET locked_time = NOW() WHERE bookmarks_root_folders.user_id = 'myusername'
  • after this no syncing is performed anymore (All HTTP requests for POST /index.php/apps/bookmarks/public/rest/v2/lock are returned with code 423).
  • This state remains stable for hours. No client tries to break the lock with a DELETE request.

Debug log provided

  • I have provided a debug log file

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Looks like I’m having the same issue on a fresh NextCloud 27+ and Floccus in Firefox installed, all up to date.

curl 'https://******.org/nc/index.php/apps/bookmarks/public/rest/v2/lock' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0' -H 'Accept: */*' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Authorization: Basic c2ls****lsTw==' -H 'Origin: moz-extension://c0574878-ded3-4b7a-9ce7-49411a7d046e' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'Content-Length: 0' -H 'TE: trailers'
{"status":"error","data":"Resource is already locked"}

I’m having the same issue here.

Just to elaborate, this is what I see in Nextcloud log files:

256.89.204.94 - myuser [20/Dec/2023:01:09:25 +0100] "PROPFIND /remote.php/dav/files/myuser/PersonalMarc HTTP/1.1" 207 9819 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:09:43 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:45 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:47 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:49 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:51 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:53 +0100] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 149 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:09:53 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:09:54 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:09:58 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:02 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:08 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:12 +0100] "PROPFIND /remote.php/dav/files/myuser/ HTTP/1.1" 207 256 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:10:15 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:23 +0100] "PROPFIND /remote.php/dav/files/myuser/ HTTP/1.1" 207 261 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:10:24 +0100] "PROPFIND /remote.php/dav/files/myuser/ HTTP/1.1" 207 1354 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:10:25 +0100] "PROPFIND /remote.php/dav/files/myuser/parisOVH1 HTTP/1.1" 207 710 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:10:25 +0100] "PROPFIND /remote.php/dav/files/myuser/PersonalMarc HTTP/1.1" 207 9818 "-" "Mozilla/5.0 (Linux) mirall/3.11.0-20231212.130516.f91ae00cf-1.0~jammy1 (Nextcloud, ubuntu-5.15.0-91-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)"
256.89.204.94 - myuser [20/Dec/2023:01:10:39 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:40 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:42 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"
256.89.204.94 - myuser [20/Dec/2023:01:10:44 +0100] "POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423 54 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0"

And it actually never finished the first sync. On another computer, I had this issue at first, but after restarting Firefox a few times it actually went through and completed the synchronization.

So, what I observed in the log files, floccus first posts a lock and it’s successful (status 200), then it GETs a bunch of url (e.g. "GET /index.php/apps/bookmarks/public/rest/v2/bookmark?url=https%3A%2F%2Fez.analog.com%2Fc...), followed by a

GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 
GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 

And finally an indefinite amount of of POST locks with status 423.

POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423
POST /index.php/apps/bookmarks/public/rest/v2/lock HTTP/1.1" 423

If I force restart the sync, I can actually see how it DELETES the lock, and the cycle starts once again.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bot, please don’t close 😉