floccusaddon/floccus

Help testing: v4.0.0-alpha.3

Closed this issue ยท 35 comments

Hello everyone,

in light of two recently reported bugs that demonstrated some deeper issues with the syncing algorithm (#425, #436). I have taken to refactoring the syncing process used by floccus. The preliminary fruits of this endeavor are ready to be tested as part of the v4.0.0-alpha.2 pre-release.

If you would like to help test this new generation of floccus,

  1. make a backup of your bookmarks
  2. download and install the respective extension file
  3. take it for a spin

Notes

Your previously configured accounts are currently not being migrated to the new version, yet. I will implement this for the final release, though. The legacy nextcloud sync backend is deprecated and no longer supported as it violates some invariants, which is hard to work around.

If you have any questions, remarks, and most importantly observations from testing the new version, please leave a comment in this issue.

Cheers,
Marcel

Would you please provide what to test as a checklist so that we could notice what might be wrong?

The main changes are in the sync algorithm, so moving things around etc. to provoke the algorithm would be great :)

TCB13 commented

Loaded the extension unpacked to get around the untrusted warning. Now:

image

Do I need to delete my xbel file from previous version?

TCB13 commented

^ deleted previous xbel, removed and added the account again, keeps giving me the same error.

TCB13 commented

So, small update. The issue I reported at #436 doesn't seem to happen with floccus v3.5.2. I download that version manually from here , installed and it worked just fine. I believe whatever is causing this issue was some change after that particular version.

Last version on firefox gave these warnings on Nextcloud-Folders (non-legacy) sync:

E020: Could not parse server response. Is the bookmarks app installed on your server?
JSON.parse: unexpected character at line 1 column 1 of the JSON data

Version 4.0.0-alpha.1 xpi, loaded into firefox dev (signing override) seems to be syncing just fine.

edit
Legacy managed to get passed, just nextcloud-folders gives these errors

@TCB13 Awesome! We have a new error message. That's progress. The bug that you ran into with v3.5.3 likely was in v3.5.2 as well, but may not have manifested in your situation (one of the changes was an async control flow correction, which may have lead to you experiencing the race condition that was there all along).

I'll correct myself:
It looked to run fine, but it doesn't.
It doesnt sync.
On firefox dev. it ends up being no debug log at-all
on firefox esr. it ended to up with a bunch of panics.

So we have 1 version (3.) that either eats bookmarks or doesn't work at all.
and 1 version (4.
) that doesn't work at all period.

It seems the QC is so far off that i'll look for other solutions.

TCB13 commented

So, small update. The issue I reported at #436 doesn't seem to happen with floccus v3.5.2. I download that version manually from here , installed and it worked just fine. I believe whatever is causing this issue was some change after that particular version.

Update: I noticed that floccus v3.5.2 is able to sync but my bookmarks got duplicated on the XBEL file. On the browser they are fine, no duplications. Newer versions seems to have fixed that issue but maybe they also added the syncing problem.

@TCB13 Could you send me the log for the new error you're getting in v4.0.0-alpha.1?

Nevermind, I've just successfully replicated this ๐Ÿ’ช

@TCB13 v4.0.0-alpha.2 should have a fix for the new error.

TCB13 commented

Here is what I'm getting with 4.0.0v2:

image

Could you send me the logs of this, please? ๐Ÿ™ (You can use my private nextcloud drop, or send them via mail, if you want)

TCB13 commented

I would but it kinda contains a dump of all my bookmarks and not much information except for this:

2020-02-13T17:48:29.666Z COMPARE { localItem:   - #51[websitename](https://example.org) parentId: 49,
  cacheItem: undefined,
  serverItem:   - #185[websitename](https://example.org) parentId: 183 }
2020-02-13T17:48:29.666Z Bookmark unchanged
2020-02-13T17:48:29.668Z Syncing failed with a.moved is not a function
a.moved is not a function
a.moved is not a function
a.moved is not a function

I also get a lot of:

2020-02-13T17:48:29.710Z create branch: This bookmark was moved here from somewhere else in from tree

However I didn't move anything.

@TCB13 The logs are quite integral for me to trace what happened. To mitigate privacy concerns, however, you could anonymize the logs by replacing all instances of [.*?] with [XXX] and all instances of (.*?) with (XXX). That should remove all sensitive information (please be sure check, though).

@TCB13 Any possibility of a redacted debug log?

TCB13 commented

Hey @marcelklehr I've been really busy and I'll get that for you soon. Anyway I've noticed that this mess might be caused by using browsers with different languages. I've noticed that I have duplicate bookmarks for the "other bookmarks" folder because in one of my computers that folder has another name (since the browser isn't in English). I'll try to sort this mess out soon.

I've been really busy and I'll get that for you soon.

Awesome :)

I've noticed that I have duplicate bookmarks for the "other bookmarks" folder because in one of my computers that folder has another name (since the browser isn't in English). I'll try to sort this mess out soon.

Mmh, there are measures in place to prevent this (i.e. by normalizing the names of the root folders), but those might fail if you're not using Chrome or Firefox.

TCB13 commented

I'm using Brave and Firefox... should work fine in both I guess.

@marcelklehr did you get my email?

Thanks for sending the log! It looks like there's an inconsistent cache state that could be responsible. My recommendation would be to try

  1. back up your bookmarks
  2. Trigger a sync from scratch in the account settings (this might cause duplicates and other unwanted effects, if the versions on server and client differ a lot. Expect to either clean that up, or start with a clean slate on the server and do a sync from scratch then).

Hopefully this fixes the error.

TCB13 commented

@marcelklehr I tried removing the server file, browser extension re-sync everything and eventually it always ends up in the issue I sent you. I really believe it was related to the folder mess caused by different browser languages and/or some issue with Brave.

Since I wasn't very happy with Brave, today I moved to Firefox in all my machines (running in English). I have installed v3.5.3 from the Firefox extras page and cleaned my bookmarks. So far everything seems to sync properly.

In a week I'll report back how my Firefox and v3.5.3 are behaving. After that (or if I get sync issues) I'll upgrade to 4.x and see how it goes.

In a week I'll report back how my Firefox and v3.5.3 are behaving. After that (or if I get sync issues) I'll upgrade to 4.x and see how it goes.

Great. There are definitely bugs in v3 that are fixed in v4-alpha, though. As I was vexed by not being able to reproduce your error, I created a fuzz test that hits the sync algorithm with random mutations of the bookmarks tree and was able to tease out some more bugs, which are likely related to your error. Thus, say hello to v4.0.0-alpha.3.

TCB13 commented

As I was vexed by not being able to reproduce your error,

I strongly believe it was related to the browser language. My desktop was set to English and the laptop had Brave in Portuguese. I guess that's what messed up my bookmarks.

Right now I'm running Firefox in English and everything is syncing properly so far.

I have finally been able to purge all bugs I could find using fuzz testing and am happy to announce the release of v4

@marcelklehr Whats currently the compatibility with Nextcloud?

@Ornias1993 Nothing has changed on that front. These are all the combinations that are regularly tested: https://travis-ci.org/marcelklehr/floccus/builds/657290209

TCB13 commented

So... Apparently my Firefox upgraded automatically to 4.0.1 and now I'm getting this:

It's not possible to move Places root folders.

Ah, I see. v4.0.2 fixes this.

TCB13 commented

Ah, I see. v4.0.2 fixes this.

4.0.2 under Firefox seems to freeze when the sync starts. Tried to remove the account and added again, same result.

@TCB13 Can you specify 'freeze'? As in unresponsive? What exactly freezes?

TCB13 commented

@marcelklehr progress bar stuck at the beginning (5%?) and no recent logs.

TCB13 commented

@marcelklehr I notice that there was a lock file, I removed it and now it is working properly.

Ah, I see. It would have notified you after a while, I think.

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.