ActivityWatch / aw-watcher-vscode

Mozilla Public License 2.0
193 stars 27 forks source link

Can't create bucket #9

Closed pcuci closed 3 years ago

pcuci commented 5 years ago

Not sure where to dig out for more logs...

image

pcuci commented 5 years ago

I have the latest b9 version running, everything seems ok for other watcher servers.

image

image

pcuci commented 5 years ago
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)
pcuci commented 5 years ago

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(?)

johan-bjareholt commented 5 years ago

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.

johnnestebann commented 3 years ago

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

johan-bjareholt commented 3 years ago

@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).

johnnestebann commented 3 years ago

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

johan-bjareholt commented 3 years ago

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!