floccusaddon / floccus

:cloud: Sync your bookmarks privately across browsers and devices
https://floccus.org
Mozilla Public License 2.0
5.87k stars 241 forks source link

Updating addon during sync leaves lock file in place #1249

Closed SlaveOfCats closed 2 years ago

SlaveOfCats commented 2 years ago

Which version of floccus are you using?

4.17.0, 4.17.1

Sync method

WebDAV

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

Firefox 101.0.1

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

No response

Which version of Nextcloud? (if relevant)

23.0.8

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

Nextcloud as a WebDAV server

Describe the Bug

I started Firefox and manually checked for Add-on updates. There was a new version of floccus, so I clicked the Update button, but failed to notice that floccus was syncing my bookmarks at the same time. Afterward, the sync itself seemed fine, but the lock file was not deleted from the WebDAV server. When I opened one of my other Firefox installations, it started but never completed syncing.

In the end, I closed all instances of Firefox, manually deleted the lock file, and then restarted Firefox instances. All instances of Firefox were able to sync.

Expected Behavior

When updating the add-on during a sync, I'd expect one of the following:

To Reproduce

I can't reproduce this myself due to the dependence on having a new update to the add-on.

Debug log provided

marcelklehr commented 2 years ago

Yeah, interrupting sync runs often leaves a remnant lock file. In case of an update it may indeed possible to gracefully abort the sync run.

SlaveOfCats commented 2 years ago

Just to add a similar case that recently happened: I shut down Firefox while floccus was syncing and the lockfile was left behind. I deleted the lockfile when I noticed it (the next time I started FF), and all was well after that.

marcelklehr commented 2 years ago

Floccus should recover and ignore the lock file after a certain time, but avoiding remnant lock files altogether is near to impossible.

github-actions[bot] commented 1 year ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.