mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-25 14:16:12 +03:00
[GH-ISSUE #956] WebDAV Sync problems #624
Labels
No labels
browser-specific
bug
correctness issues
enhancement
feature: Google Drive
feature: Linkwarden
feature: git
feature: nextcloud-bookmarks
feature: tabs
feature: webdav
help wanted
native-app
priority: high
priority: low
priority: medium
pull-request
question
question
stale
upstream
waiting for more information
wontfix
🙁 Not following issue template
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/floccus#624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DerDanilo on GitHub (Sep 13, 2021).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/956
Describe the bug
Sometimes the webdav sync seems to be broken. On some occasions floccus reported that everything was fine and synced, when in fact, nothing was fine. Trying a manual sync didn't solve the issues either.
Restarting the browser, checking network connections etc. didn't solve the issue either.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Floccus should detect if there is a sync error and report it. This seems either a sync issue or the algo doesn't properly detect if there is a sync error.
Desktop
Server
(please complete the following information)
Note: Please write down the actual version numbers instead of writing 'latest'.
Debug log
Sometimes the following error appears once one starts trying to force a sync (dangerous actions)
FYI: Seafile release a patch to fix "[fix] Fix WebDAV error if a file is moved immediately after uploading". This may be related to the problem.
But still I would expect floccus to detect sync errors.
Apart from that it showed that it tried setting/getting the .lock file and nothing more.
Additional context
I hope that there is room for improvement with the webdav sync algo and to detect if there are sync issues. Maybe with some kind of checksum file stored in the server where the bookmarks file is actually stored.
The lock file makes sense but sometimes it seems that floccus cannot remove it, whereas other webdav applications can just edit the file manually and it just works.
Also this error sometimes messed up all bookmarks, maybe because floccus actually thinks that everything is fine, when in fact it is not.
Thanks!
@mnalis commented on GitHub (Sep 13, 2021):
@DerDanilo Can you elaborate what exactly does the "nothing was fine" mean? Did it erase all bookmarks on the nextcloud? Did it erase all bookmarks in the browser? Did it crash the browser? Something else? What exactly? It would be great if you could provide example how it looked before sync, and how it looks after sync. Or at least explain in detail what exactly happens, what was the difference, and why were you unhappy with the results.
To the best of my knowledge, floccus does look at the error codes returned by the server and tries to handle them appropriately. There might be a bug in the floccus (or in the server) that causes that to fail, but troubleshooting that needs much more information. Or you might have older buggy version of floccus active somewhere which interferes.
What I would do is:
@DerDanilo commented on GitHub (Sep 18, 2021):
Thanks for your patience, very busy these days. Please be assured that I'll answer to your questions even if it may take a couple of weeks sometimes. Excuse me for the switch between I and we, which might be confusing sometimes. Floccus is awesome and I am really happy about this product!
Easy things first: We basically did what you suggested in your list to resolve the issue, being happy having file versioning and therefore a way to jump back a few days where everything was fine. It is still a mess and requires a lot of time to clean up.
I cannot really show examples of what had happend because I didn't create any screenshots and this might also be a GDRP violation. Anyways I'll try to explain in more details.
Basically bookmarks were suddenly messed up. Bookmarks from one folder were in another folder. Already deleted bookmarks were back, some in the folder they were before, some in another folder were they don't belong. Renamed bookmarks were present with their old and their new name. Having a couple of thousand bookmarks one can imagine the mess with something like this. The 50% safety didn't trigger so floccus doesn't seem to have detected those severe differences.
Sometimes floccus is unresponsive and even crashes the browser. A forced browser restart is the only thing that brings back floccus (and the browser). This is valid for all systems we use (Linux, Mac and Windows).
Then there is also the problem that floccus syncs (automatic or manual) and confirms a successfull sync, but in fact it did nothing. No file change on the server side and nothing really in the floccus logs except something like "writing .lock...". But even the lock file was not written on the server. All this while other applications work just fine with webDAV to the same target. I would expect floccus to make sure that it did really sync and throw an error if there was no real sync. Restarting the webbrowser did solve the issue sometimes but not always so I'd rule that mostly out.
Maybe it could read the bookmark file again after a sync, looking for a timestemp or version mark or something.
General information:
Here are some more infos about our webDAV targes:
This is a lot of information that you may be able to work with already.
Thanks for your time improving the floccus.
@mnalis commented on GitHub (Sep 18, 2021):
@DerDanilo it seems that there are multiple groups of people using multiple floccus instances on multiple servers. Which is great (that you have many of them using floccus, not that they are having problems)! But for debugging the problem, it makes it very hard if not impossible to try to debug something with such a broad scope.
I would thus advise you to find one simplest case/configuration where the problem happens, and then it becomes possible for developers to try to debug that one case.
So out of that group of people/browsers that have the problems; it would be best if you would try to find one case in which:
When you choose that one case, than you will know exactly the version of browsers, server etc. (and can reported them in this bug) and proceed with instructions given before.
Only when the problem is (hopefully) found and fixed at that one case, can you proceed to see if that fixes all the other cases for other users too, or are there some other bugs that remain in some of them (in which case whole procedure would be repeated again with one new test case)
@DerDanilo commented on GitHub (Sep 23, 2021):
Thanks for your time to check this in detail. However I don't have the time currently to do all those tests. It may take several month until I can post more information. I saw some other posts that reported issues with webdav that looked quiet similar, maybe some of those may already point into the right direction.
Hint: To what I can say already most problems seem to have to do with the .lock file not being written/read/deleted correctly when using webdav.
I'll post more info once I find time. Thanks for your patience in advance!
@creesch commented on GitHub (Sep 27, 2021):
I might have a small bit of additional information. I used to have nextcloud set up with desktop sync and had floccus syncing to both the bookmarks app and to the file through webdav as backup (as the bookmarks app doesn't have versioning). From time to time the nextcloud desktop app would report issues with the bookmarks lock file. This did seem to coincide with it attempting to sync during or shortly after floccus did sync bookmarks.
I haven't enabled webdav sync of bookmarks anymore but I think that anyone who wants to look into the issue should be able to reproduce it this way.
@dmotte commented on GitHub (Jul 27, 2022):
I think I have found the cause of this problem.
My setup: NGINX as WebDAV server and Floccus on Chrome.
Looking at the NGINX logs, I noticed that sometimes the server response status is
304 Not Modifiedeven if the file changed:So I tried to edit my NGINX configuration to prevent
304responses as a workaround. This is mylocation /config section:Notice the last 4 lines. Now everything is working! :)
BTW I think that this problem should be handled client-side by Floccus, maybe by setting the
Pragma: no-cacheandCache-Control: no-cacheheaders for everyGETrequest (see https://stackoverflow.com/a/29246795). These are the headers set by Chrome when the user pressesCTRL+F5to reload a web page. In this way the server won't reply304again because we are explicitly requesting to retransmit the wholebookmarks.xbelfile content.I think that a possible fix would be adding the noted headers to the
downloadFileWebanddownloadFileNativefunctions of the filesrc/lib/adapters/WebDav.tsfile. Let me know what you think 😉@marcelklehr commented on GitHub (Jul 27, 2022):
Wow, this is a great find! Thank you for taking the time to look into this!
I think technically if you run a web server that caches stuff, you're responsible that it doesn't cache stuff it shouldn't cache. HTTP doesn't specify that everything should be cached by default. But I see that this is a problem that people are far too likely to run into with floccus to not take it into account.
If you'd be willing to submit a pull request that would be awsome ❤️
@dmotte commented on GitHub (Jul 30, 2022):
@marcelklehr thanks! Sorry for the late reply. I will try to submit a pull request in the next days :)
@github-actions[bot] commented on GitHub (Aug 5, 2023):
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.