[GH-ISSUE #1621] android version can't fetch newly added bookmark via webdav #1070

Closed
opened 2026-02-25 22:38:55 +03:00 by kerem · 24 comments
Owner

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

  1. add a new item in PC, then sync
  2. in webdav folder, view the bookmars.xbel, the new item exists. till now, 50% success
  3. then sync in android, nothing happen, the new item can't be fetch, even manually clear cache

Debug log provided

  • I have provided a debug log file
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 1. add a new item in PC, then sync 2. in webdav folder, view the bookmars.xbel, the new item exists. till now, 50% success 3. then sync in android, nothing happen, the new item can't be fetch, even manually clear cache ### Debug log provided - [ ] I have provided a debug log file
kerem 2026-02-25 22:38:55 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@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 💙

<!-- gh-comment-id:2121949284 --> @github-actions[bot] commented on GitHub (May 21, 2024): Hello :wave: 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 :blue_heart:
Author
Owner

@marcelklehr commented on GitHub (May 21, 2024):

android version can't sync(fetch)

What do you actually see when you say it can't sync?

<!-- gh-comment-id:2122212287 --> @marcelklehr commented on GitHub (May 21, 2024): > android version can't sync(fetch) What do you actually see when you say it can't sync?
Author
Owner

@chinagaofeng commented on GitHub (May 21, 2024):

android version can't sync(fetch)

What do you actually see when you say it can't sync?

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

<!-- gh-comment-id:2122289529 --> @chinagaofeng commented on GitHub (May 21, 2024): > > android version can't sync(fetch) > > What do you actually see when you say it can't sync? 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
Author
Owner

@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.

<!-- gh-comment-id:2122571908 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2132328853 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2132679682 --> @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.
Author
Owner

@marcelklehr commented on GitHub (May 27, 2024):

Can you please try if this is still happening with v5.1.4?

<!-- gh-comment-id:2132688300 --> @marcelklehr commented on GitHub (May 27, 2024): Can you please try if this is still happening with v5.1.4?
Author
Owner

@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.

<!-- gh-comment-id:2132746215 --> @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](https://github.com/floccusaddon/floccus/files/15451805/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.
Author
Owner

@marcelklehr commented on GitHub (May 27, 2024):

I think this may have to do with the tree reloading code I added recently...

<!-- gh-comment-id:2132748481 --> @marcelklehr commented on GitHub (May 27, 2024): I think this may have to do with the tree reloading code I added recently...
Author
Owner

@kolinger commented on GitHub (May 27, 2024):

I think this started from 5.1.2, 5.1.1 is fine.

<!-- gh-comment-id:2132752290 --> @kolinger commented on GitHub (May 27, 2024): I think this started from 5.1.2, 5.1.1 is fine.
Author
Owner

@marcelklehr commented on GitHub (May 27, 2024):

I think this started from 5.1.2

Spot on! That's when the tree reloading was introduced. I'm building an alpha version with a possible fix, so you can test.

<!-- gh-comment-id:2132827142 --> @marcelklehr commented on GitHub (May 27, 2024): > I think this started from 5.1.2 Spot on! That's when the tree reloading was introduced. I'm building an alpha version with a possible fix, so you can test.
Author
Owner

@kolinger commented on GitHub (May 27, 2024):

I tried to revert changes made in 0c6a74d on 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

<!-- gh-comment-id:2132840172 --> @kolinger commented on GitHub (May 27, 2024): ~~I tried to revert changes made in 0c6a74d on 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
Author
Owner

@kolinger commented on GitHub (May 27, 2024):

I see that treeChanged condition 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.

<!-- gh-comment-id:2132949274 --> @kolinger commented on GitHub (May 27, 2024): I see that `treeChanged` condition 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.
Author
Owner

@marcelklehr commented on GitHub (May 27, 2024):

floccus-build-v5.1.5-alpha.1.zip

<!-- gh-comment-id:2133038480 --> @marcelklehr commented on GitHub (May 27, 2024): [floccus-build-v5.1.5-alpha.1.zip](https://github.com/floccusaddon/floccus/files/15453730/floccus-build-v5.1.5-alpha.1.zip)
Author
Owner

@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.

2024-05-27 11:25:48.542 11951-13748 Capacitor               usap64                               D  Handling local request: http://localhost/js/81.js
2024-05-27 11:25:48.542 11951-13748 Capacitor               usap64                               E  Unable to open asset URL: http://localhost/js/81.js
2024-05-27 11:25:48.544 11951-13748 chatty                  usap64                               I  uid=10625(org.handmadeideas.floccus) ThreadPoolForeg identical 2 lines
2024-05-27 11:25:48.544 11951-13748 Capacitor               usap64                               E  Unable to open asset URL: http://localhost/js/81.js
2024-05-27 11:25:48.546 11951-13748 Capacitor               usap64                               D  Handling local request: http://localhost/js/native.js
2024-05-27 11:25:48.557 11951-13748 Capacitor               usap64                               D  Handling local request: http://localhost/favicon.ico

Logcat says this. The chunks are broken?

<!-- gh-comment-id:2133057040 --> @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. ``` 2024-05-27 11:25:48.542 11951-13748 Capacitor usap64 D Handling local request: http://localhost/js/81.js 2024-05-27 11:25:48.542 11951-13748 Capacitor usap64 E Unable to open asset URL: http://localhost/js/81.js 2024-05-27 11:25:48.544 11951-13748 chatty usap64 I uid=10625(org.handmadeideas.floccus) ThreadPoolForeg identical 2 lines 2024-05-27 11:25:48.544 11951-13748 Capacitor usap64 E Unable to open asset URL: http://localhost/js/81.js 2024-05-27 11:25:48.546 11951-13748 Capacitor usap64 D Handling local request: http://localhost/js/native.js 2024-05-27 11:25:48.557 11951-13748 Capacitor usap64 D Handling local request: http://localhost/favicon.ico ``` Logcat says this. The chunks are broken?
Author
Owner

@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.

<!-- gh-comment-id:2134387323 --> @marcelklehr commented on GitHub (May 28, 2024): Ah, damn. I didn't check the build :see_no_evil: But since you built it yourself we know it works.
Author
Owner

@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

<!-- gh-comment-id:2134410959 --> @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
Author
Owner

@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 0c6a74d reverted 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.

<!-- gh-comment-id:2134476234 --> @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 0c6a74d reverted 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.
Author
Owner

@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

<!-- gh-comment-id:2134514117 --> @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
Author
Owner

@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.js async [actions.LOAD_TREE], you did leave await tree.load() behind. That wasn't originally there it's new addition. That's mistake I did too when manually reverting the 0c6a74d. 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)?

<!-- gh-comment-id:2134567011 --> @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.js` `async [actions.LOAD_TREE]`, you did leave `await tree.load()` behind. That wasn't originally there it's [new addition](https://github.com/floccusaddon/floccus/commit/0c6a74d0f9c65a562493626773cb99be4df06c62#diff-693fc47db0a3dd4ab7fe773bc1c64be73180fda24e7ff60bd3503866b7f00947). That's mistake I did too when manually reverting the 0c6a74d. 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)?
Author
Owner

@marcelklehr commented on GitHub (May 28, 2024):

Yes, you're right! Thanks for getting to the bottom of this! 💙

<!-- gh-comment-id:2134584848 --> @marcelklehr commented on GitHub (May 28, 2024): Yes, you're right! Thanks for getting to the bottom of this! :blue_heart:
Author
Owner

@marcelklehr commented on GitHub (May 28, 2024):

So, https://github.com/floccusaddon/floccus/releases/tag/v5.1.7 should finally fix this

<!-- gh-comment-id:2134632372 --> @marcelklehr commented on GitHub (May 28, 2024): So, https://github.com/floccusaddon/floccus/releases/tag/v5.1.7 should finally fix this
Author
Owner

@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.

<!-- gh-comment-id:2134652708 --> @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.
Author
Owner

@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.

<!-- gh-comment-id:2917908439 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#1070
No description provided.