-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
[ActivityWatch] Error while sending heartbeat #12
Comments
Have the same issue |
That's unfortunate, we should never send something undefined to sendHeartbeat. Maybe vscode has changed their API somehow? Do you have logs which are not minimized? The path to the source file is just a single row rather than multiple as well as hiding information inside the "..." |
Now I seem to get this error, however I don't have any problem accessing Activity watch web UI, nor does my Activity watch Web Watcher seem to have an issue. To note, I am on a VPN using Cisco AnyConnect. This may or not be connected to the original issue.
|
VPNs might indeed break activitywatch. Could you shortly disable it just to see if it works? It is possible to explicitly tell programs to ignore the proxy settings, but I'm not sure how to do that for vscode specifically. |
I have this issue and am not using any VPN. If there is something we can grab to help with this (logs, where?) let us know! |
The log above just says that it cannot connect to aw-server (running on localhost:5600) so it's clear what the issue is, the question is what keeps it from connecting. |
Tried off of VPN, same error. |
Just installed it and get the same error as well. |
I tried to reproduce this today on my machine but was not able to, so there is some difference between platforms.
|
I'm using windows 10 with aw-server (not rust). I checked again after deleting the buckets. It seems the problem still occurs but it also send heartbeats successfully sometimes, but most of the time it results in error. I might need to learn a things or two about the development of vs code extension to debug this problem for my machine. |
Adding to my last comment, I checked the extension a little. All I could trace back is sometime the axios post method doesn't get any response form the server and a and here, |
Hm, strange that aw-server doesn't respond in 10 seconds. We could update to latest aw-client-js which is probably a good idea anyway, might or might not fix the issue. The new version does increase the default timeout to 30s though so if it fixes the problem it might be either because the root cause is fixed or because the timeout simply makes the issue occur less often. |
For now I have made this workaround, though its preety bad programming wise but it gets the job done. Provided the server is actually running and well and error is just a random no response event, we can try again if the error happens. For this I have called this method aw-watcher-vscode/src/extension.ts Line 60 in c7aa891
again if the error is triggered for initial bucket creation/checking. and silenced this aw-watcher-vscode/src/extension.ts Line 120 in c7aa891
notification line (making it |
The first change sounds good, recreating the bucket if it fails until it succeeds. The second change only silences the issue rather than fixing anything, so that's not a good idea in my opinion. |
The heartbeat gets stacked, so if it fails to send one moment then it will be sent it in next successful try. That's why I silenced the notification. It's working for a last couple of days properly. |
I realized that it might be because of aw-client-js not supporting pre-merge heartbeats which is only supported on aw-client-python right now. |
@johan-bjareholt That doesn't explain why it only started happening recently though (it seems anyway). I assumed something happened in a recent version of VSCode. |
@ErikBjare Well, at least it's easy to test which one it is. So if someone who had this issue, could you test it with aw-server-rust and see if it works better? |
I just tried it. I still have the same error, but it doesn't happen much. |
Reporting same issue here with extension v0.5.0 and vscode v1.58.2 |
@johan-bjareholt After investigating it seems the issue is with post methods themselves, it is not receiving a response. |
@iDevLP If the server is not responding it's because it's busy handling some other large request. Could you investigate what request that is? Maybe use Wireshark or if it's a request from the web-ui you could look at the Firefox/Chrome debug network tab with F12. |
@johan-bjareholt Hello, I think I found the root cause and I explained it here ActivityWatch/activitywatch#664 |
The issue seems with aw-server itself when a browser connects to it. if you open the dashboard, the post methods never work again until you close the dashboard and the browser I just found a workaroud for this issue until it gets fixed. if you opened the dashboard, just close the browser. don't open the dashboard if you are using vscode or you can open it and close it alongside the browser quickly before post requests from the extension reaches timeout. if you ever open the dashboard remember to close the browser. |
Any progress? |
Experiencing same error. |
Not much more information, Developer tools console has three related errors:
But a lot of logs for seeming successful sends
The text was updated successfully, but these errors were encountered: