Unable to connect to server with aw-watcher-web-firefox

After installing the Firefox extension I can’t make a connection to the aw-server.
Connected: :heavy_multiplication_x:

aw-server is running, and is running without problems. I can connect with the new edge extension. aw-watcher-web-firefox shows in the ActivityWatch Buckets, but there is no raw data (Eventcount: 0).

Debugging of the app indicates the following errors:

TypeError: PrecompiledScript.executeInGlobal: Argument 1 is not an object. 2 ExtensionContent.jsm:568:25
Unchecked lastError value: Error: ID already exists: open-browser-action 10 ExtensionCommon.jsm:764
    withLastError resource://gre/modules/ExtensionCommon.jsm:764
    create chrome://browser/content/child/ext-menus.js:148

Some comments:
I am running Firefox: “In permanent private browsing mode, cookies and site data will always be cleared when Firefox is closed.”
Furthermore settings are as follows:
image

Clarifying the error:

When checking the network (in debugging mode), the following error is thrown:

TypeError: win.windowGlobalChild is null
storage.js:3545:18
    getWindowFromInnerWindowID resource://devtools/server/actors/storage.js:3545
    observe resource://devtools/server/actors/storage.js:3587
TypeError: can't access dead object
5 storage.js:3545:18
    getWindowFromInnerWindowID resource://devtools/server/actors/storage.js:3545
    observe resource://devtools/server/actors/storage.js:3587
Unchecked lastError value: Error: ID already exists: open-browser-action 4 ExtensionCommon.jsm:764
    withLastError resource://gre/modules/ExtensionCommon.jsm:764
    create chrome://browser/content/child/ext-menus.js:148
TypeError: can't access dead object3 storage.js:3545:18
    getWindowFromInnerWindowID resource://devtools/server/actors/storage.js:3545
    observe resource://devtools/server/actors/storage.js:3587

Could it be a followup on https://github.com/ActivityWatch/aw-watcher-web/issues/32?

In the meantime I have discovered the source of the problem:

When Firefox is set to remember history, the connection is fine and data is received on the server.
If set to Never Remember History, no data is received. Probably because “Firefox will use the same settings as private browsing, and will not remember any history as you browse the Web.”

Has https://github.com/ActivityWatch/activitywatch/issues/1 already been implemented?

Double checked the error now. Seems like there is some blocker between aw-watcher-web-firefox and aw-server:

Unchecked lastError value: Error: ID already exists: open-browser-action 2 ExtensionCommon.jsm:764
    withLastError resource://gre/modules/ExtensionCommon.jsm:764
    create chrome://browser/content/child/ext-menus.js:148
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 webrequest.js:107
    onBeforeRequest moz-extension://cdd3e26f-3d4b-40a8-a865-7e9879c55537/js/webrequest.js:107

That’s very interesting, had no idea that setting could change the behavior of the extension APIs we are using. Will need to continue looking into this more. I’ll re-open the Github issue.

We never look at the browsing history in aw-watcher-web, we only look at the title and URL of the tab when you switch tabs. So it’s surprising (but certainly possible) that it does not work as expected with that setting changed.