floccusaddon / floccus

:cloud: Sync your bookmarks privately across browsers and devices
https://floccus.org
Mozilla Public License 2.0
5.78k stars 241 forks source link

Floccus does not remember saved options for the account. #315

Closed bhlevca closed 5 years ago

bhlevca commented 5 years ago

Software versions

Steps to reproduce

  1. open Options for the account
  2. select 60 min sync interval and click on trigger from scratch
  3. save the changes pressing the Save button
  4. Open Options again and all the save changes are not saved

    Expected outcome

The checkmark and the 60 min sync interval are not there

Actual outcome

The sync interval is still empty and the checkmark is not selected

Debug log

unavailable

marcelklehr commented 5 years ago

I can't replicate this. Note that the "trigger sync from scratch" checkbox always clears itself when saving, as that information is used directly.

bhlevca commented 5 years ago

I understand, I did not know about the "trigger sync from scratch" behaviour. The other one I cannot reproduce either. I may have been something transient.

On another note, I have varied succes with synchronisation. Sometimes take a long long time and seems stuck there, sometimes it fails. Now that I think about it is possible that my settings with nextcloud server being behind a difficult to configure HAProxy setup may be the problem for me.

marcelklehr commented 5 years ago

If it helps, I've copied a guide below on how to check the live debug log.

Firefox

Chrome

bhlevca commented 5 years ago

It worked, but it always worked if I delete the xbel file and the lock. It took 17 sec from almost 4000 bookmarks. That's a great improvement!!!

Here are a few observations:

In general 3.3.1 is much improved and floccus can finally be used as a main sync tool. It woerk now even in kiwi browser.

Below is the log from the successful initial run to create a new xbel file on the server:

Starting sync process for account bogdan@nextcloud.hlevca.com
Account.js:124 Apparently not initialized, because: TypeError: Error in invocation of bookmarks.getSubTree(string id, function callback): No matching signature.
    at chrome-promise.js:58
    at new Promise (<anonymous>)
    at Object.getSubTree (chrome-promise.js:46)
    at Account._callee8$ (Account.js:121)
    at tryCatch (polyfill.js:6900)
    at Generator.invoke [as _invoke] (polyfill.js:7138)
    at Generator.prototype.(anonymous function) [as next] (chro```
@me-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/polyfill.js:6952:21)
    at asyncGeneratorStep (Account.js:11)
    at _next (Account.js:11)
    at Account.js:11
Account.js:99 initializing account 15607090491210.6232021107737717
Account.js:124 Apparently not initialized, because: TypeError: Error in invocation of bookmarks.getSubTree(string id, function callback): No matching signature.
    at chrome-promise.js:58
    at new Promise (<anonymous>)
    at Object.getSubTree (chrome-promise.js:46)
    at Account._callee8$ (Account.js:121)
    at tryCatch (polyfill.js:6900)
    at Generator.invoke [as _invoke] (polyfill.js:7138)
    at Generator.prototype.(anonymous function) [as next] (chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/polyfill.js:6952:21)
    at asyncGeneratorStep (Account.js:11)
    at _next (Account.js:11)
    at Account.js:11
Logger.js:12 onSyncStart: begin
Logger.js:12 https://nextcloud.hlevca.com/remote.php/webdav/bookmarks.xbel.lock
WebDav.js:69 GET https://nextcloud.hlevca.com/remote.php/webdav/bookmarks.xbel.lock 404 (Not Found)
_callee$ @ WebDav.js:69
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
downloadFile @ background-script.js:24353
_callee2$ @ WebDav.js:98
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
checkLock @ background-script.js:24390
_callee4$ @ WebDav.js:142
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
obtainLock @ background-script.js:24564
_callee7$ @ WebDav.js:254
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
onSyncStart @ WebDav.js:270
_callee9$ @ Account.js:142
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
(anonymous) @ Account.js:11
(anonymous) @ Account.js:11
sync @ background-script.js:16829
_callee10$ @ Controller.js:229
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ Controller.js:5
_next @ Controller.js:5
Promise.then (async)
asyncGeneratorStep @ Controller.js:5
_next @ Controller.js:5
(anonymous) @ Controller.js:5
(anonymous) @ Controller.js:5
syncAccount @ Controller.js:233
window.syncAccount @ background-script.js:4
_callee2$ @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24760
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24661
_next @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24663
Logger.js:12 https://nextcloud.hlevca.com/remote.php/webdav/bookmarks.xbel.lock
WebDav.js:69 GET https://nextcloud.hlevca.com/remote.php/webdav/bookmarks.xbel 404 (Not Found)
_callee$ @ WebDav.js:69
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
downloadFile @ background-script.js:24353
_callee6$ @ WebDav.js:202
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
pullFromServer @ background-script.js:24707
_callee7$ @ WebDav.js:257
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
Promise.then (async)
asyncGeneratorStep @ WebDav.js:8
_next @ WebDav.js:8
(anonymous) @ WebDav.js:8
(anonymous) @ WebDav.js:8
onSyncStart @ WebDav.js:270
_callee9$ @ Account.js:142
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
Promise.then (async)
asyncGeneratorStep @ Account.js:11
_next @ Account.js:11
(anonymous) @ Account.js:11
(anonymous) @ Account.js:11
sync @ background-script.js:16829
_callee10$ @ Controller.js:229
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ Controller.js:5
_next @ Controller.js:5
Promise.then (async)
asyncGeneratorStep @ Controller.js:5
_next @ Controller.js:5
(anonymous) @ Controller.js:5
(anonymous) @ Controller.js:5
syncAccount @ Controller.js:233
window.syncAccount @ background-script.js:4
_callee2$ @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24760
tryCatch @ polyfill.js:6900
invoke @ polyfill.js:7138
prototype.(anonymous function) @ polyfill.js:6952
asyncGeneratorStep @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24661
_next @ chrome-extension://fnaicdffflnofjppbagibeoednhnbjhg/dist/js/options.js:24663
Logger.js:12 onSyncStart: completed
Logger.js:12 Filtered out the following duplicates before syncing []
Logger.js:12 COMPARE {localItem: Folder, cacheItem: Folder, serverItem: Folder}
Logger.js:12 Checking subtree
Logger.js:12 onSyncComplete
Logger.js:12 Folder {type: "folder", id: 0, parentId: undefined, title: "root", children: Array(0)}
Logger.js:12 No changes to the server version necessary
Logger.js:12 Successfully ended sync process for account bogdan@nextcloud.hlevca.com
tessus commented 5 years ago

I just wanted to create a new issue, but found this one. I'm not 100% sure, if they are related, so if they are not, please let me know and I open a new one.

image

When I uncheck the Enabled option for a sync item (so that it isn't synced automatically), and restart the browser, it's checked again.

marcelklehr commented 5 years ago

@tessus I think that's probably unrelated (and I cannot reproduce this at the moment) -- a new issue would be good :)

tessus commented 5 years ago

@marcelklehr ok, last time I restarted the brower, the account was still disabled. maybe this only happened when the add-on was updated. I will open a new issue, if it happens again.

marcelklehr commented 5 years ago

The problem is that subsequent syncs take much longer (minutes). Also, creating the tree structure from the xbel file in Firefox browser takes long minutes.

I can't reproduce this. With 5000 bookmarks an XBEL sync run is quite fast for me.

Also, often Firefox seems to "forget" to remove the lock file, after a firefox initial sync : E023: Unable to clear lock file, consider deleting bookmarks.xbel.lock manually.

This can happen when a different floccus instance is syncing at the same time.

Sometimes before the "/Bookmars Bar" selected directory a nextcloud string is appended, but I still have to figure out when that happens.

Mmmh. That sounds weird.

bhlevca commented 5 years ago

The problem is that subsequent syncs take much longer (minutes). Also, creating the tree structure from the xbel file in Firefox browser takes long minutes.

I can't reproduce this. With 5000 bookmarks an XBEL sync run is quite fast for me. Same here it does not happen all the time. I don't know why, perhaps a busy and under-powered server?

E023: Unable to clear lock file, consider deleting bookmarks.xbel.lock manually.

This can happen when a different floccus instance is syncing at the same time. This is what I thought, but I waited and closed any other possible browser that may want to sync and the lock file did not get deleted. However, after I updated all the browsers to v3.3.1 I cannot reproduce it anymore

Sometimes before the "/Bookmars Bar" selected directory a nextcloud string is appended, but I still have to figure out when that happens.

Mmmh. That sounds weird. Really weird, It happened a few times, but I cannot reproduce it anymore.

Anyway, this version is good, it is stable, fast and I can finally rely only on it and I can finally delete eversync from my browsers. Thanks

marcelklehr commented 5 years ago

Cool. Thanks for your feedback. Feel free to open a new issue if something new comes up :)

github-actions[bot] commented 1 year ago

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.