Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect sync: some bookmarks moved into another folder #1395

Open
1 task done
lazymonkey2 opened this issue May 31, 2023 · 7 comments
Open
1 task done

incorrect sync: some bookmarks moved into another folder #1395

lazymonkey2 opened this issue May 31, 2023 · 7 comments

Comments

@lazymonkey2
Copy link

Which version of floccus are you using?

4.19.1

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 113.0.2, Edge 113.0.1774.57, Chrome 113.0.5672.127

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 have found an error in the synchronizarion.

I have synced from Firefox (push up) to Edge (pull down) and to Chrome (pull down).
Then I exported bookmarks to HTML files and compared them using WinMerge (after removing useless data like icon data and timestamps).

It seems that the XBEL file created during the push up from Firefox is correct.

The pull down process in Edge has read the XBEL file and then generated almost correct bookmarks.
There are differences that seems related mainly to special bookmarks like chrome:// and chrome-extension://
There are also some missing bookmarks but at least some of them were duplicated in the same folder, so I think the sync process ignored them on purpose.
In any case I didn't have time to fully analyze these differences (this bug report is about the other errors, in particular it's about the differences found in bookmarks in Edge and Chrome after the sync from Firefox.)

The pull down process in Chrome has read the XBEL file and then generated wrong bookmarks, and this is the issue I have tried to analyze and I'm reporting here. Since the XBEL source file is the same for Edge and Chrome I was expecting to get exactly the same bookmarks on the two broesers, instead there are differences.

This is the log of push up in Firefox (redacted):
floccus-4.19.1-2023-05-30-firefox-redacted.log

This is the log of pull down in Edge (redacted):
floccus-4.19.1-2023-05-30-edge-redacted.log

This is the log of pull down in Chrome (redacted):
floccus-4.19.1-2023-05-30-chrome-redacted.log

The bookmarks of Edge and Chrome are almost the same, except seven bookmarks that are moved from one folder to another one.

This is the list of moved bookmarks (taken from the exported bookmarks in the HTML file):
list of moved bookmarks.txt

In Edge these seven bookmarks are located in a particular folder (1) and in Chrome they were located into a different folder (2).

The two folders have the same name "browser" but are located into two different subfolders: the first one is in the toolbar, and the second one is in another folder (3) that is in the toolbar:

folder (1) located in -> toolbar -> browser -> bookmarks
folder (2) located in -> toolbar -> folder (3) -> browser -> bookmarks

Maybe it is just a coincidence that the name of the two folders is the same.

I have tried to understand the Chrome pull down log, to identify the folders:

folder (1) is #11370 (parent folder 1) -> d4c3e8a11256ab82a4fc72560eb4a2b0e87bad820c290dd9b03616de240aa6db
folder (2) is #11230 (parent folder 9050) -> d4c3e8a11256ab82a4fc72560eb4a2b0e87bad820c290dd9b03616de240aa6db
folder (3) is #9050 (parent id 1) -> ef260e9aa3c673af240d17a2660480361a8e081d1ffeca2a5ed0e3219fc18567

I'm not sure these infos are totally correct thought.

Please can you fix the issue?
Thanks.

Expected Behavior

bookmarks in edge and chrome should be exactly the same.

To Reproduce

see previous description.

Debug log provided

  • I have provided a debug log file
@github-actions github-actions bot added this to Backlog in Floccus May 31, 2023
@github-actions
Copy link

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
Copy link
Member

Hello also from my present self 👋

this is a tough one.

Some remarks, mostly for my future self: I've looked at the logs and traced the code and so far 2 possible causes for this presented themselves:

  1. Somehow during the initial scan to produce the diff or some other time a mapping is (erroneously) created for the two folders, causing the reverted MOVE to actually be same as the original moves.
  2. When mapping the MOVE actions it might swap the parentIds instead of properly mapping them.

Both seem unlikely. no 2 even more so than no 1. But I couldn't find a reason why a mapping would be created for these two, even though the have the same title, they are on a different level, haven't been moved...

Next step for me is to try and reproduce this.

Also: What happens when you move the bookmarks in question back to where they belong and pull sync again?

@lazymonkey2
Copy link
Author

Also: What happens when you move the bookmarks in question back to where they belong and pull sync again?

Hello, I did another test:

First I pushed up in edge.
Then I pulled down in chrome.
The bookmarks were moved in the wrong folder, like before.
Then I moved the bookmarks in the correct folder, and did a second pull down.
Now the bookmarks remained in the correct folder!
To be sure I pulled down a third time and the bookmark remained in the correct folder.

I was thinking that pull down was like a "full replace" of old bookmarks, but it seems it's not the case.

Here is the log from edge:
floccus-4.19.1-2023-06-12-redacted.log

Here are the logs from chrome:
floccus-4.19.1-2023-06-12-redacted-1.log

floccus-4.19.1-2023-06-12-redacted-2.log

floccus-4.19.1-2023-06-12-redacted-3.log

@marcelklehr
Copy link
Member

I was thinking that pull down was like a "full replace" of old bookmarks, but it seems it's not the case.

Yes, that would have been easier for cases like this, perhaps, but my goal was for normal merge-sync to not be disrupted by the occasional pushes and pulls, which requires applying those as a diff not as a full tree replacement...

@lazymonkey2
Copy link
Author

my goal was for normal merge-sync to not be disrupted by the occasional pushes and pulls

yes, that makes sense.

@lazymonkey2
Copy link
Author

any news? bug is still happening.
thanks.

@marcelklehr marcelklehr moved this from In progress to Triaging in Floccus Dec 6, 2023
@marcelklehr
Copy link
Member

I'm sorry for the big delay on my part, I haven't had a lot of time and energy the last months. Can you try this with v5.1.1? There's a good chance it might have been fixed by a change I've done recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triaging
Floccus
Triaging
Development

No branches or pull requests

2 participants