mirror of
https://github.com/floccusaddon/floccus.git
synced 2026-04-25 14:16:12 +03:00
[GH-ISSUE #1621] android version can't fetch newly added bookmark via webdav #1070
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#1070
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 @chinagaofeng on GitHub (May 21, 2024).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1621
Which version of floccus are you using?
5.1.3
How many bookmarks do you have, roughly?
251
Are you using other means to sync bookmarks in parallel to floccus?
no
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.
msedge 125.0.2535.51
Which version of Nextcloud Bookmarks are you using? (if relevant)
No response
Which version of Nextcloud? (if relevant)
No response
What kind of WebDAV server are you using? (if relevant)
No response
Describe the Bug
strategy in PC msedge floccus ext: 始终上传本地更改并撤销来自其他浏览器的更改
strategy in Android floccus app: 始终撤消本地更改并从其他浏览器下载更改
symptom:
android version can't sync(fetch) the full bookmarks.xbel file, while the file is updated correctly in webdav folder
Expected Behavior
android version can sync correctly
To Reproduce
Debug log provided
@github-actions[bot] commented on GitHub (May 21, 2024):
Hello 👋
Thank you for taking the time to open this issue with floccus. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and I created floccus and have been maintaining it ever since.
I currently work for Nextcloud which leaves me with less time for side projects like this one
than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself.
I look forward to working with you on this issue
Cheers 💙
@marcelklehr commented on GitHub (May 21, 2024):
What do you actually see when you say it can't sync?
@chinagaofeng commented on GitHub (May 21, 2024):
the sync progress normally, no error, but nothing change in the content: the newly added item witch shown in webdav file can not be sync to phone
@marcelklehr commented on GitHub (May 21, 2024):
Can you erify in the bookmarks file in webdav whether the problem is that floccus in edge does not push or that the android app does not pull? Please post a redacted log of that failing sync run here then.
@slavexe commented on GitHub (May 26, 2024):
I just installed the android app from fdroid and set it up with webdav. None of my bookmarks sync to the android app even though syncing between firefox browsers on different machines using the extension works perfectly. Interestingly, when I press the sync button in the android app and then attempt to sync shortly after from the firefox extension on a different machine, the firefox extension will warn me that all my bookmarks will get deleted if I continue with the sync. So from what I can tell it seems the android app attempts to completely erase the contents of the file on the webdav server when it tries to sync. This behavior seems to match what happened here #1624.
@kolinger commented on GitHub (May 27, 2024):
I have similar issues between Chrome Floccus and Android Floccus. I already have existing data on both sides. If I add something from Android - it works correctly in the Chrome but the opposite is broken - if I add something from Chrome, not only Android doesn't sees it but it overrides WebDAV state with it's own, thus effectively deletes anything what comes from WebDAV/other sources. Chrome pushes changes to WebDAV just fine and Android does react to it as well but instead of sync it just overrides WebDAV with what Android currently has.
This would also explain the reports form others where new/empty Android Floccus deletes everything since it just pushes it's own current (empty) state.
@marcelklehr commented on GitHub (May 27, 2024):
Can you please try if this is still happening with v5.1.4?
@kolinger commented on GitHub (May 27, 2024):
I tried with 5.1.4 and it's intermittent. Most of the time I see case where Chrome does change (doesn't matter if adds, removes, edits), .xbel has the change and Android overrides it with it's own state regardless. It did work correctly couple times but I don't see any pattern between when it does and doesn't.
This log captures when .xbel gets 1 new bookmark and Android decided it should be removed: floccus-5.1.4-2024-05-27-redacted.log. It doesn't happen right away - first sync doesn't seem to do anything in the UI but second sync does the remove stuff. So it's seems like Android gets it wrong and thinks his local tree is newer than WebDAV .xbel but that's not the case.
@marcelklehr commented on GitHub (May 27, 2024):
I think this may have to do with the tree reloading code I added recently...
@kolinger commented on GitHub (May 27, 2024):
I think this started from 5.1.2, 5.1.1 is fine.
@marcelklehr commented on GitHub (May 27, 2024):
Spot on! That's when the tree reloading was introduced. I'm building an alpha version with a possible fix, so you can test.
@kolinger commented on GitHub (May 27, 2024):
I tried to revert changes made in0c6a74don top of 5.1.4 and it didn't fix it, it's still broken (this actually makes since I can reproduce the problem with Floccus opened the whole time so the resume doesn't even gets triggered), so I'm puzzled what change is the cause, did 5.1.2 change anything else?EDIT: I take this back, if I revert all the changes from
0c6a74d(not only the resume stuff) then 5.1.4 works@kolinger commented on GitHub (May 27, 2024):
I see that
treeChangedcondition inside LOAD_TREE is satisfied during sync and that's for sure not correct, this should be satisfied only on resume. I guess sync is successful, it calls LOAD_TREE and the LOAD_TREE sees that sync changed the tree so it restores old tree and this old tree gets synced next time thus it will erase any external changes? Something along those lines anyway... That would explain why it seems from the UI like first sync doesn't do anything and the next sync does the override.@marcelklehr commented on GitHub (May 27, 2024):
floccus-build-v5.1.5-alpha.1.zip
@kolinger commented on GitHub (May 27, 2024):
I'm not sure if that's just me but the 5.1.5-alpha1 gives me just loading logo as if the app crashed. Deleted data, clean install and still logo.
Logcat says this. The chunks are broken?
@marcelklehr commented on GitHub (May 28, 2024):
Ah, damn. I didn't check the build 🙈 But since you built it yourself we know it works.
@marcelklehr commented on GitHub (May 28, 2024):
Ive released https://github.com/floccusaddon/floccus/releases/tag/v5.1.5 which should fix this. Please confirm
@kolinger commented on GitHub (May 28, 2024):
5.1.5 didn't fix it, I did clean install and first thing it did was to delete all my stuff, so for sure not correct, basically the same thing as 5.1.2-5.1.4. So it seems there is deeper problem or even multiple issues. I tested 5.1.4 with all
0c6a74dreverted that does work but I didn't find a way to fix the reload/resume I just know that original implementation did trigger the stuff for resume even when running sync and that wasn't correct for sure but if that was the issue or only issue I don't know.@marcelklehr commented on GitHub (May 28, 2024):
I think the issue is because the resume handler is inside the Vue component created hook. It might be that this creates a loop
@kolinger commented on GitHub (May 28, 2024):
I did remove App.addListener and it didn't change anything.
I see now you didn't revert everything from
src/ui/store/native/actions.jsasync [actions.LOAD_TREE], you did leaveawait tree.load()behind. That wasn't originally there it's new addition. That's mistake I did too when manually reverting the0c6a74d. But If I take 5.1.5 and remove this addition then it starts to work... Calling load tree inside load tree?So I think the fix is - the code that reloads tree needs to be in the resume listener only, not in actions LOAD_TREE or it needs to call it's own action like RELOAD_TREE? Otherwise the code for resume is execute during sync and that breaks everything... I don't see anything wrong with original implementation it's just in wrong place (inside LOAD_TREE)?
@marcelklehr commented on GitHub (May 28, 2024):
Yes, you're right! Thanks for getting to the bottom of this! 💙
@marcelklehr commented on GitHub (May 28, 2024):
So, https://github.com/floccusaddon/floccus/releases/tag/v5.1.7 should finally fix this
@kolinger commented on GitHub (May 28, 2024):
Yes it did, I can confirm fresh install of 5.1.7 did first pull from WebDAV successfully. If I make change in browser, the Android floccus sees it, if I make change in Android the browser sees it as well so WebDAV sync now works both ways as expected.
@github-actions[bot] commented on GitHub (May 29, 2025):
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.