[GH-ISSUE #593] Floccus "Debug Logs" button does nothing #410

Closed
opened 2026-02-25 22:37:04 +03:00 by kerem · 11 comments
Owner

Originally created by @primesun on GitHub (Jul 6, 2020).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/593

Describe the bug
Clicking on the "Debug Logs" button does nothing. It does not show any debug logs.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Debug Logs'

Expected behavior
Debug logs are shown

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Browser Version 78.0.1
  • Floccus version: 4.2.5
  • Floccus sync method: nextcloud folders

Server (please complete the following information):

  • OS: Shared hosting, some flavour of Linux
  • Nextcloud version: 16.0.8
  • Bookmarks app version: 2.3.4

Debug log
Debug log button does nothing!

  • Debug log provided
Originally created by @primesun on GitHub (Jul 6, 2020). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/593 **Describe the bug** Clicking on the "Debug Logs" button does nothing. It does not show any debug logs. **To Reproduce** Steps to reproduce the behavior: 1. Click on 'Debug Logs' **Expected behavior** Debug logs are shown **Desktop (please complete the following information):** - OS: Windows 10 - Browser Firefox - Browser Version 78.0.1 - Floccus version: 4.2.5 - Floccus sync method: nextcloud folders **Server (please complete the following information):** - OS: Shared hosting, some flavour of Linux - Nextcloud version: 16.0.8 - Bookmarks app version: 2.3.4 **Debug log** Debug log button does nothing! - [ ] Debug log provided
Author
Owner

@marcelklehr commented on GitHub (Jul 19, 2020):

Mh, that's weird. Maybe downloads are saved to the downloads folder for you automatically. Can you check that folder?

<!-- gh-comment-id:660685027 --> @marcelklehr commented on GitHub (Jul 19, 2020): Mh, that's weird. Maybe downloads are saved to the downloads folder for you automatically. Can you check that folder?
Author
Owner

@primesun commented on GitHub (Jul 26, 2020):

Could not find any debug logs in the download folder.

<!-- gh-comment-id:663923757 --> @primesun commented on GitHub (Jul 26, 2020): Could not find any debug logs in the download folder.
Author
Owner

@cracket commented on GitHub (Aug 28, 2020):

I have similar problem with floccus ver 4.3.0 running on FF 79 on Ubuntu Linux with WebDav account. After error with sync the UI shows status "Syncing" along with greyed out button "Cancel Sync". "Debug Logs" button is blue and changes mouse cursor, so I assume it is active, but does not cause any action.

Tried to enable about:debugging for floccus and read out console errors from "This Firefox" (sorry I'm not a js expert, so not sure if they are relevant) which I attach below:


Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). options.js:7:125206


UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. ExtensionStorageIDB.jsm:831
    normalizeStorageError resource://gre/modules/ExtensionStorageIDB.jsm:831
    method chrome://extensions/content/child/ext-storage.js:273
    AsyncFunctionThrow self-hosted:688


Uncaught (in promise) Error: An unexpected error occurred undefined
    dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26
    (Async: promise callback)
    dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26
    dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26
    dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20
    onGetLogs moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20
    onGetLogs self-hosted:935
    Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    a moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    $emit moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    click moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20
    click self-hosted:935
    Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    a moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    _wrapper moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    (Async: EventListener.handleEvent)
    ue moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    oi moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    _e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    x moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    ln moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    _update moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    get moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    ma moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    $mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    init moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    ln moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    _update moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    get moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    ma moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    $mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    init moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7
    m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7

I assume the button should work no matter if synchronization is in progress?

<!-- gh-comment-id:682261093 --> @cracket commented on GitHub (Aug 28, 2020): I have similar problem with floccus ver 4.3.0 running on FF 79 on Ubuntu Linux with WebDav account. After error with sync the UI shows status "Syncing" along with greyed out button "Cancel Sync". "Debug Logs" button is blue and changes mouse cursor, so I assume it is active, but does not cause any action. Tried to enable about:debugging for floccus and read out console errors from "This Firefox" (sorry I'm not a js expert, so not sure if they are relevant) which I attach below: ``` Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). options.js:7:125206 UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. ExtensionStorageIDB.jsm:831 normalizeStorageError resource://gre/modules/ExtensionStorageIDB.jsm:831 method chrome://extensions/content/child/ext-storage.js:273 AsyncFunctionThrow self-hosted:688 Uncaught (in promise) Error: An unexpected error occurred undefined dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26 (Async: promise callback) dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26 dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:26 dispatch moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20 onGetLogs moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20 onGetLogs self-hosted:935 Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 a moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 $emit moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 click moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:20 click self-hosted:935 Ut moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 a moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 _wrapper moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 (Async: EventListener.handleEvent) ue moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 oi moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 _e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 x moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 ln moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 _update moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 get moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 ma moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 $mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 init moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 g moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 ln moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 _update moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 e moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 get moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 ma moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 $mount moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 init moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 m moz-extension://4fa3ce81-4f85-45d9-85c7-6e5bf28c8079/dist/js/options.js:7 ``` I assume the button should work no matter if synchronization is in progress?
Author
Owner

@primesun commented on GitHub (Aug 28, 2020):

@cracket is right. It looks like the floccus extension is using the default content security policy (since it doesn't appear to set one in manifest.json). The default CSP doesn't allow for eval to be used, according to Mozilla. And that is what the error is complaining about, the line in options.js:

buffer = eval('require(\'buffer\').Buffer')

I don't know where options.js is in the repo... (is it created by webpack??)

Edit: Looks like this eval is coming from js-base64, and they fixed it here: https://github.com/dankogai/js-base64/issues/85. Perhaps floccus can be updated to use the newer version of that dependency.

Edit2: Further, I'm not sure if that error we see in the console is actually related to the Debug logs button not working.

<!-- gh-comment-id:682337728 --> @primesun commented on GitHub (Aug 28, 2020): @cracket is right. It looks like the floccus extension is using the default content security policy (since it doesn't appear to set one in [manifest.json](https://github.com/marcelklehr/floccus/blob/develop/manifest.json)). The default CSP doesn't allow for `eval` to be used, [according to Mozilla](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_Security_Policy). And that is what the error is complaining about, the line in options.js: `buffer = eval('require(\'buffer\').Buffer')` I don't know where options.js is in the repo... (is it created by webpack??) Edit: Looks like this eval is coming from js-base64, and they fixed it here: https://github.com/dankogai/js-base64/issues/85. Perhaps floccus can be updated to use the newer version of that dependency. Edit2: Further, I'm not sure if that error we see in the console is actually related to the Debug logs button not working.
Author
Owner

@marcelklehr commented on GitHub (Aug 28, 2020):

@asabbagh thanks for the research!

<!-- gh-comment-id:682581296 --> @marcelklehr commented on GitHub (Aug 28, 2020): @asabbagh thanks for the research!
Author
Owner

@marcelklehr commented on GitHub (Sep 1, 2020):

UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. ExtensionStorageIDB.jsm:831

This seems suspicious. Perhaps the database is corrupt for some reason. Could you try reinstalling floccus?

<!-- gh-comment-id:684881395 --> @marcelklehr commented on GitHub (Sep 1, 2020): > UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. ExtensionStorageIDB.jsm:831 This seems suspicious. Perhaps the database is corrupt for some reason. Could you try reinstalling floccus?
Author
Owner

@primesun commented on GitHub (Sep 3, 2020):

I just tried uninstalling and reinstalling floccus.

Immediately after installing I clicked the Debug Logs button but nothing happened. I tried a sync, and it failed (server error 503). But now the Debug Logs button successfully downloaded a log file. A 2nd sync attempt, same failure and error, and the Debug Logs still works and gives a log file. 3rd attempt the sync succeeded, and the button still works too.

So yes it is possible that it was some sort of database corruption. It's not clear why the button did nothing the first time I clicked it before any syncs were completed, but perhaps that is intended behaviour.

Edit: Even though it is likely off topic, I should note that one of the syncs resulted in one of my bookmark folders and its contents being duplicated.

<!-- gh-comment-id:686228583 --> @primesun commented on GitHub (Sep 3, 2020): I just tried uninstalling and reinstalling floccus. Immediately after installing I clicked the Debug Logs button but nothing happened. I tried a sync, and it failed (server error 503). But now the Debug Logs button successfully downloaded a log file. A 2nd sync attempt, same failure and error, and the Debug Logs still works and gives a log file. 3rd attempt the sync succeeded, and the button still works too. So yes it is possible that it was some sort of database corruption. It's not clear why the button did nothing the first time I clicked it before any syncs were completed, but perhaps that is intended behaviour. Edit: Even though it is likely off topic, I should note that one of the syncs resulted in one of my bookmark folders and its contents being duplicated.
Author
Owner

@sixtyfive commented on GitHub (Feb 19, 2021):

Hi @marcelklehr, trying to figure out the JSON parsing problem, I also noticed that the "Debug Logs" button does nothing. It's all good now since reinstalling Floccus solved that problem, but if something like it ever happens again, it would surely be helpful to see debug logs and be able to post them here.

<!-- gh-comment-id:781990292 --> @sixtyfive commented on GitHub (Feb 19, 2021): Hi @marcelklehr, trying to figure out the JSON parsing problem, I also noticed that the "Debug Logs" button does nothing. It's all good now since reinstalling Floccus solved _that_ problem, but if something like it ever happens again, it would surely be helpful to see debug logs and be able to post them here.
Author
Owner

@marcelklehr commented on GitHub (Feb 19, 2021):

@sixtyfive Oh, that's not good. Please open a new issue with your installation details, so I can reproduce.

<!-- gh-comment-id:781992954 --> @marcelklehr commented on GitHub (Feb 19, 2021): @sixtyfive Oh, that's not good. Please open a new issue with your installation details, so I can reproduce.
Author
Owner

@sixtyfive commented on GitHub (Feb 19, 2021):

too late ... shouldn't have tried the reinstallation idea so quickly. if it ever happens again i'll investigate more! sorry, marcel!

<!-- gh-comment-id:782066901 --> @sixtyfive commented on GitHub (Feb 19, 2021): too late ... shouldn't have tried the reinstallation idea so quickly. if it ever happens again i'll investigate more! sorry, marcel!
Author
Owner

@github-actions[bot] commented on GitHub (Mar 21, 2023):

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:1477135267 --> @github-actions[bot] commented on GitHub (Mar 21, 2023): 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#410
No description provided.