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

Firefox not recording #112

Open
hrqmonteiro opened this issue Jun 15, 2023 · 5 comments
Open

Firefox not recording #112

hrqmonteiro opened this issue Jun 15, 2023 · 5 comments

Comments

@hrqmonteiro
Copy link

image

Am i missing something? I turned off and on again and still doesn't record anything?

@ErikBjare
Copy link
Member

ErikBjare commented Jun 16, 2023

Firefox isn't logged at all? Strange.

The Firefox extension is not strictly necessary, just an extra if you want to track browser activity in more detail (include URLs, incognito & audible status).

Edit: I see now that this is probably due to running Gnome Wayland. You can read about related issues here:

@AlexanderMakarov
Copy link

It may be related to the timing of AW server turning on. If Firefox is launched on OS session start up but AW is enabled later then plugin wasn't able to connect on start and keeps running in "no server" mode.

@AlexanderMakarov
Copy link

Yep, it would be great to add "retries" let's say every 30 seconds for the logic in

client.awc = new AWClient("aw-client-web", {testing: client.testing});
(i.e. create client and try to create a bucket).

@kortschak
Copy link

kortschak commented Jul 23, 2023

It looks to me like it's sending heartbeats, but they do not contain any browser information. Setting up a netcat listener I see this:

$ nc -l 5600
OPTIONS /api/0/buckets/aw-watcher-web-firefox HTTP/1.1
Host: localhost:5600
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: POST
Access-Control-Request-Headers: content-type
Origin: moz-extension://c2bb6d29-3efe-41fb-a7ca-c0232f6b2b76
DNT: 1
Connection: keep-alive
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site

and then it drops after ~30s. I set up a REST server to listen on 5600; it does get repeated heartbeats, looking like this

{"time":"2023-07-23T13:28:58.210Z","level":"DEBUG","msg":"cel debug log","component":"rest","tag":"aw-web","value":{"Body":"","Close":false,"ContentLength":0,"Header":{"Accept":["*/*"],"Accept-Encoding":["gzip, deflate, br"],"Accept-Language":["en-US,en;q=0.5"],"Access-Control-Request-Headers":["content-type"],"Access-Control-Request-Method":["POST"],"Connection":["keep-alive"],"Dnt":["1"],"Origin":["moz-extension://c2bb6d29-3efe-41fb-a7ca-c0232f6b2b76"],"Sec-Fetch-Dest":["empty"],"Sec-Fetch-Mode":["cors"],"Sec-Fetch-Site":["cross-site"],"User-Agent":["Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0"]},"Host":"localhost:5600","Method":"OPTIONS","Proto":"HTTP/1.1","ProtoMajor":1,"ProtoMinor":1,"RequestURI":"/api/0/buckets/aw-watcher-web-firefox/heartbeat?pulsetime=80","URL":{"ForceQuery":false,"Fragment":"","Host":"","Opaque":"","Path":"/api/0/buckets/aw-watcher-web-firefox/heartbeat","RawFragment":"","RawPath":"","RawQuery":"pulsetime=80","Scheme":""}}}

but again, there is no web-page information that I would expect; note the empty Body field.

Running an nc listener with chromium gives

$ nc -l 5600           
POST /api/0/buckets/aw-watcher-web-chrome/heartbeat?pulsetime=80 HTTP/1.1
Host: localhost:5600
Connection: keep-alive
Content-Length: 152
sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112"
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=UTF-8
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
sec-ch-ua-platform: "Linux"
Origin: chrome-extension://nglaklhklhcoonedhgnpgddginnjdadi
Sec-Fetch-Site: none
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

{"data":{"url":"chrome://newtab/","title":"New Tab","audible":false,"incognito":false,"tabCount":2},"duration":0,"timestamp":"2023-07-23T04:04:27.029Z"}

Running the REST server above also gives the expected results, with POST bodies showing the same data.

@francissjr
Copy link

I'm facing the same problem. I reinstalled Activity Watch, firefox started monitoring again, but then stopped.

Untitled-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants