Closed pcuci closed 3 years ago
I have the latest b9 version running, everything seems ok for other watcher servers.
workbench.main.js:238 [Extension Host] Error: Request failed with status code 502
at createError (C:\Users\PCuciureanu\.vscode\extensions\lindraupe.aw-watcher-vscode-0.4.0\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\PCuciureanu\.vscode\extensions\lindraupe.aw-watcher-vscode-0.4.0\node_modules\axios\lib\core\settle.js:18:12)
at IncomingMessage.handleStreamEnd (C:\Users\PCuciureanu\.vscode\extensions\lindraupe.aw-watcher-vscode-0.4.0\node_modules\axios\lib\adapters\http.js:201:11)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1090:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Perhaps relate to: https://github.com/ActivityWatch/aw-webui/pull/76
and https://forum.activitywatch.net/t/bucket-and-event-design-fo-vs-code-extension/120/13
looks like connecting to the aw-server is a recurring issue(?)
Do you have a proxy set-up on your computer? Sounds like that could be the culprit.
I don't know any scenario that the actual aw-server itself returns a 502 so my guess is that the request is sent to the proxy instead which returns a 502 because then the proxy will try to access the aw-server on localhost which does not exist. Just a guess though.
I'm using WSL on Windows 10, and I have the same error, I don't know how to configure it. I have the server running locally, all is working, except this
@johnnestebann What do you mean with "I am running WSL", what are you running on WLS exactly? Is ActivityWatch running on host and vscode on WSL, the opposite or is everything running in WSL?
Regardless, this error occurs because the watchers (essentially http clients) can't access aw-server (essentially a http server). So if one part is in WSL and one isn't it's likely that you need to configure something to allow them to talk to each other (as WSL2 runs inside a VM if I recall correctly, if you are running WSL1 however I think there should not be any issues. Not fully sure though as I'm not a WSL user and find that to be a very strange environment to work with compared to "just " windows or "just" linux).
I have the server running on Windows 10, and VSCode installed on it; but I use docker inside WSL2, so I develop with VSCode and the Remote WSL function. I installed this extension not locally, but inside WSL on VSCode. I suppose it doesn recognize the "localhost" because they are different subnets
I suppose it doesn recognize the "localhost" because they are different subnets
Exactly, so I'd consider this more of a WSL issue rather than an ActivityWatch issue since they are essentially two different computers.
Good luck!
Not sure where to dig out for more logs...