[GH-ISSUE #1767] bookmarks moved #1181

Closed
opened 2026-02-25 22:39:14 +03:00 by kerem · 15 comments
Owner

Originally created by @lazymonkey2 on GitHub (Nov 13, 2024).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1767

Which version of floccus are you using?

5.3.3

How many bookmarks do you have, roughly?

1400

Are you using other means to sync bookmarks in parallel to floccus?

no

Sync method

Google Drive

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

firefox, edge, chrome

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

I sync bookmarks between my three browsers (merge).
after a sync I found that some bookmarks are moved from one folder to a different one:

  • in firefox I have 13 bookmarks in a certain folder.
  • in edge the bookmarks are synced correctly
  • in chrome the 13 bookmarks are moved in a different folder
  • the name of the original folder in firefox and the destination (wrong) folder in chrome is the same -> ai (is it relevant?)
  • even after multiple syncs the bookmarks in chrome are not moved to the correct folder
  • to find differences I exported bookmarks from the three browsers in html format, then I removed some useless data in the html files (like timestamps and icons data) and then I compared the html files using winmerge.

Expected Behavior

synced bookmarks correctly

To Reproduce

I don't know. It's just happening when I sync my bookmarks.
I'll attach a screenshot of the difference in html files, and redacted logs.

bug bookmarks moved

floccus-5.3.3-2024-11-13-redacted-firefox.log

floccus-5.3.3-2024-11-13-redacted-edge.log

floccus-5.3.3-2024-11-13-redacted-chrome.log

Debug log provided

  • I have provided a debug log file
Originally created by @lazymonkey2 on GitHub (Nov 13, 2024). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1767 ### Which version of floccus are you using? 5.3.3 ### How many bookmarks do you have, roughly? 1400 ### Are you using other means to sync bookmarks in parallel to floccus? no ### Sync method Google Drive ### Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please. firefox, edge, chrome ### 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 I sync bookmarks between my three browsers (merge). after a sync I found that some bookmarks are moved from one folder to a different one: - in firefox I have 13 bookmarks in a certain folder. - in edge the bookmarks are synced correctly - in chrome the 13 bookmarks are moved in a different folder - the name of the original folder in firefox and the destination (wrong) folder in chrome is the same -> ai (is it relevant?) - even after multiple syncs the bookmarks in chrome are not moved to the correct folder - to find differences I exported bookmarks from the three browsers in html format, then I removed some useless data in the html files (like timestamps and icons data) and then I compared the html files using winmerge. ### Expected Behavior synced bookmarks correctly ### To Reproduce I don't know. It's just happening when I sync my bookmarks. I'll attach a screenshot of the difference in html files, and redacted logs. ![bug bookmarks moved](https://github.com/user-attachments/assets/deb63d93-b923-4d57-ac30-945f8399899c) [floccus-5.3.3-2024-11-13-redacted-firefox.log](https://github.com/user-attachments/files/17734073/floccus-5.3.3-2024-11-13-redacted-firefox.log) [floccus-5.3.3-2024-11-13-redacted-edge.log](https://github.com/user-attachments/files/17734076/floccus-5.3.3-2024-11-13-redacted-edge.log) [floccus-5.3.3-2024-11-13-redacted-chrome.log](https://github.com/user-attachments/files/17734077/floccus-5.3.3-2024-11-13-redacted-chrome.log) ### Debug log provided - [X] I have provided a debug log file
Author
Owner

@github-actions[bot] commented on GitHub (Nov 13, 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 a few years ago, 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!
To continue the development and maintenance of this project in a sustainable way it is expected that you donate to the project when opening a ticket,
if you're not a donor already. You can find donation options at https://floccus.org/donate/. Thank you!

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 Nextcloud 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:2473806074 --> @github-actions[bot] commented on GitHub (Nov 13, 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 a few years ago, 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! To continue the development and maintenance of this project in a sustainable way it is expected that you donate to the project when opening a ticket, if you're not a donor already. You can find donation options at <https://floccus.org/donate/>. Thank you! 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 Nextcloud 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 (Nov 13, 2024):

the name of the original folder in firefox and the destination (wrong) folder in chrome is the same

very interesting, thank you for the detailed description!

I think the name of the folder is relevant. When two folders with the same name are moved to a different location in the same sync run, there is currently no way for the diff algorithm to differentiate them and they may get mixed up, iff the sync runs without any cache available. So, it's a low chance that this happens but there is a chance.

Quick fix would be

  1. Reset cache in the profile settings in all browsers
  2. sync once in all browsers
  3. sort out / remove the duplicates in one browser
<!-- gh-comment-id:2474112014 --> @marcelklehr commented on GitHub (Nov 13, 2024): > the name of the original folder in firefox and the destination (wrong) folder in chrome is the same very interesting, thank you for the detailed description! I think the name of the folder is relevant. When two folders with the same name are moved to a different location in the same sync run, there is currently no way for the diff algorithm to differentiate them and they may get mixed up, iff the sync runs without any cache available. So, it's a low chance that this happens but there is a chance. Quick fix would be 1. Reset cache in the profile settings in all browsers 2. sync once in all browsers 3. sort out / remove the duplicates in one browser
Author
Owner

@marcelklehr commented on GitHub (Dec 7, 2024):

When two folders with the same name are moved to a different location in the same sync run, there is currently no way for the diff algorithm to differentiate them and they may get mixed up

I've since implemented a similarity measure that helps the diff algorithm detect which folder is more likely to match when multiple folders have the same name and there is no cache, so this issue should not happen anymore. Thank you again for reporting! 💙

<!-- gh-comment-id:2525028258 --> @marcelklehr commented on GitHub (Dec 7, 2024): > When two folders with the same name are moved to a different location in the same sync run, there is currently no way for the diff algorithm to differentiate them and they may get mixed up I've since implemented a similarity measure that helps the diff algorithm detect which folder is more likely to match when multiple folders have the same name and there is no cache, so this issue should not happen anymore. Thank you again for reporting! :blue_heart:
Author
Owner

@lazymonkey2 commented on GitHub (Dec 12, 2024):

hello,
I've got this issue again, on floccus v5.4.0, so please take a look at it.
it happened again on two folders with the same name, but nested into two different subfolders.

I think the diff engine should use the full path of folders to be able to differentiate two folders with same name.
in this last case if the diff had used the full path it probably have synced correctly.

this should work as expected except maybe when there are two folders with the same name and located in the same subfolder.

<!-- gh-comment-id:2538724514 --> @lazymonkey2 commented on GitHub (Dec 12, 2024): hello, I've got this issue again, on floccus v5.4.0, so please take a look at it. it happened again on two folders with the same name, but nested into two different subfolders. I think the diff engine should use the full path of folders to be able to differentiate two folders with same name. in this last case if the diff had used the full path it probably have synced correctly. this should work as expected except maybe when there are two folders with the same name and located in the same subfolder.
Author
Owner

@marcelklehr commented on GitHub (Dec 12, 2024):

Damn

I think the diff engine should use the full path of folders to be able to differentiate two folders with same name.

Mmh, I don't think this is going to work as the issue is about diffing moved folders, so I believe this happens when folders are moved. Can you confirm this?

I will look into this again.

<!-- gh-comment-id:2538733816 --> @marcelklehr commented on GitHub (Dec 12, 2024): Damn > I think the diff engine should use the full path of folders to be able to differentiate two folders with same name. Mmh, I don't think this is going to work as the issue is about diffing moved folders, so I believe this happens when folders are moved. Can you confirm this? I will look into this again.
Author
Owner

@lazymonkey2 commented on GitHub (Dec 12, 2024):

I believe this happens when folders are moved. Can you confirm this?

no. in my specific case the folders with same name are not moved.

what is going wrong for me is when I add a new bookmark to an existing folder, which by chance has the same name as another folder, but these two folders are located into different subfolders, like this example:

1st folder full path:
/toolbar/dev/security

2nd folder full path:
/toolbar/pc/security

for my specific issue these two "security" folders are already present in both pc 1 and pc 2.
but in a more general case it's possibile that the folder on pc 2 is not present, and must be created by sync engine.

so on pc 1 I add a new bookmark to first "security" folder, then on pc 2 after sync I find the new bookmark added to the 2nd folder instead of the first one.

I don't know the internals of your sync engine, but I still believe that the full path can univocally identify a folder or a bookmark.

with the exception of two different folders with same path:

/toolbar/pc/security
/toolbar/pc/security

(security here is a folder).

it's possible to create two folders with same name in the same subfolder (just tested in chrome and firefox).
maybe you can tell them apart by looking at the order in which they appear (like "first security folder" and "second security folder").

Another problematic case could be two bookmarks with the same name and url in the same folder.

/toolbar/pc/security/new_bookmark
/toolbar/pc/security/new_bookmark

(here new_bookmark is a bookmark, not a folder).

it's possible to create (probably unintentionally) two identical bookmarks in the same folder by using drag and drop.

Maybe the bookmark APIs have access to other meta information, like for example the creation timestamp? could it be useful?
but that infomation could be local to each different pc, so I'm not sure it could be used to identifiy different objects with same name or url.

<!-- gh-comment-id:2539001760 --> @lazymonkey2 commented on GitHub (Dec 12, 2024): > I believe this happens when folders are moved. Can you confirm this? no. in my specific case the folders with same name are not moved. what is going wrong for me is when I add a new bookmark to an existing folder, which by chance has the same name as another folder, but these two folders are located into different subfolders, like this example: 1st folder full path: /toolbar/dev/security 2nd folder full path: /toolbar/pc/security for my specific issue these two "security" folders are already present in both pc 1 and pc 2. but in a more general case it's possibile that the folder on pc 2 is not present, and must be created by sync engine. so on pc 1 I add a new bookmark to first "security" folder, then on pc 2 after sync I find the new bookmark added to the 2nd folder instead of the first one. I don't know the internals of your sync engine, but I still believe that the full path can univocally identify a folder or a bookmark. with the exception of two different folders with same path: /toolbar/pc/security /toolbar/pc/security (security here is a folder). it's possible to create two folders with same name in the same subfolder (just tested in chrome and firefox). maybe you can tell them apart by looking at the order in which they appear (like "first security folder" and "second security folder"). Another problematic case could be two bookmarks with the same name and url in the same folder. /toolbar/pc/security/new_bookmark /toolbar/pc/security/new_bookmark (here new_bookmark is a bookmark, not a folder). it's possible to create (probably unintentionally) two identical bookmarks in the same folder by using drag and drop. Maybe the bookmark APIs have access to other meta information, like for example the creation timestamp? could it be useful? but that infomation could be local to each different pc, so I'm not sure it could be used to identifiy different objects with same name or url.
Author
Owner

@marcelklehr commented on GitHub (Dec 12, 2024):

so on pc 1 I add a new bookmark to first "security" folder, then on pc 2 after sync I find the new bookmark added to the 2nd folder instead of the first one.

Can you try resetting the cache in floccus via "Trigger sync from scratch"? It could be that there's still a wrong mapping going on between the two folders that was never removed even though the establishing of the mapping is now prevented.

<!-- gh-comment-id:2539116436 --> @marcelklehr commented on GitHub (Dec 12, 2024): > so on pc 1 I add a new bookmark to first "security" folder, then on pc 2 after sync I find the new bookmark added to the 2nd folder instead of the first one. Can you try resetting the cache in floccus via "Trigger sync from scratch"? It could be that there's still a wrong mapping going on between the two folders that was never removed even though the establishing of the mapping is now prevented.
Author
Owner

@marcelklehr commented on GitHub (Dec 15, 2024):

Floccus uses IDs to uniquely identify bookmarks and folders. To track which local folder is equivalent to which server folder there are mapping records. These could be set in the wrong way in previous versions, though. This is why I'm asking you to reset the cache and sync from scratch to reestablish those mapping records.

<!-- gh-comment-id:2543772896 --> @marcelklehr commented on GitHub (Dec 15, 2024): Floccus uses IDs to uniquely identify bookmarks and folders. To track which local folder is equivalent to which server folder there are mapping records. These could be set in the wrong way in previous versions, though. This is why I'm asking you to reset the cache and sync from scratch to reestablish those mapping records.
Author
Owner

@cjpalermo21 commented on GitHub (Dec 17, 2024):

Yes this happens all the time ... I realized it and began renaming my folders something unique (because, if there are two folders with the same name, all the bookmarks get dumped into one of them).

<!-- gh-comment-id:2547486142 --> @cjpalermo21 commented on GitHub (Dec 17, 2024): Yes this happens all the time ... I realized it and began renaming my folders something unique (because, if there are two folders with the same name, *all* the bookmarks get dumped into one of them).
Author
Owner

@marcelklehr commented on GitHub (Dec 18, 2024):

all the bookmarks get dumped into one of them

You mean all bookmarks from all folders? 🤔

<!-- gh-comment-id:2551927557 --> @marcelklehr commented on GitHub (Dec 18, 2024): > all the bookmarks get dumped into one of them You mean all bookmarks from all folders? :thinking:
Author
Owner

@cjpalermo21 commented on GitHub (Dec 18, 2024):

No - but, say I have one folder in Long Island > Sports and another in Canada > Sports ... one of the two Sports folders will be empty; and all the bookmarks will end up in the other one.

<!-- gh-comment-id:2551939734 --> @cjpalermo21 commented on GitHub (Dec 18, 2024): No - but, say I have one folder in Long Island > Sports and another in Canada > Sports ... one of the two Sports folders will be empty; and all the bookmarks will end up in the other one.
Author
Owner

@marcelklehr commented on GitHub (Dec 19, 2024):

Yes, I've tried to fix this in v5.4.0. The effects of that fix might
only be visible after resetting the cache once, though.

<!-- gh-comment-id:2552948047 --> @marcelklehr commented on GitHub (Dec 19, 2024): Yes, I've tried to fix this in v5.4.0. The effects of that fix might only be visible after resetting the cache once, though.
Author
Owner

@marcelklehr commented on GitHub (Feb 5, 2025):

Closing this as I consider it fixed. Please comment here or open a new issue if you continue to experience this in 2025.

<!-- gh-comment-id:2636286527 --> @marcelklehr commented on GitHub (Feb 5, 2025): Closing this as I consider it fixed. Please comment here or open a new issue if you continue to experience this in 2025.
Author
Owner

@cjpalermo21 commented on GitHub (Feb 5, 2025):

Thanks Marcel - it seems that deleting the file from the google drive and
resetting the cache - when there's an issue - seems to clear it up (so
far)! :P

On Wed, Feb 5, 2025 at 5:08 AM Marcel Klehr @.***>
wrote:

Closing this as I consider it fixed. Please comment here or open a new
issue if you continue to experience this in 2025.


Reply to this email directly, view it on GitHub
https://github.com/floccusaddon/floccus/issues/1767#issuecomment-2636286527,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMJHXY4QMXNFRPZLBBHZELD2OHPLJAVCNFSM6AAAAABRWUSTKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZWGI4DMNJSG4
.
You are receiving this because you commented.Message ID:
@.***>

<!-- gh-comment-id:2638174379 --> @cjpalermo21 commented on GitHub (Feb 5, 2025): Thanks Marcel - it seems that deleting the file from the google drive and resetting the cache - when there's an issue - seems to clear it up (so far)! :P On Wed, Feb 5, 2025 at 5:08 AM Marcel Klehr ***@***.***> wrote: > Closing this as I consider it fixed. Please comment here or open a new > issue if you continue to experience this in 2025. > > — > Reply to this email directly, view it on GitHub > <https://github.com/floccusaddon/floccus/issues/1767#issuecomment-2636286527>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AMJHXY4QMXNFRPZLBBHZELD2OHPLJAVCNFSM6AAAAABRWUSTKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZWGI4DMNJSG4> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@github-actions[bot] commented on GitHub (Feb 6, 2026):

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:3857150437 --> @github-actions[bot] commented on GitHub (Feb 6, 2026): 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#1181
No description provided.