Closed ktavabi closed 1 year ago
Does it work if you remove the waka_
prefix from your api key?
Maybe somehow you're using an old version of the plugin before it supported the new api key format.
Actually, Unable to get api key: Error: could not read ~/.wakatime.cfg
is probably the reason. Can you delete that file and restart vscode to let it create the cfg file again? If the plugin can't read the cfg file it will think there's no api key available.
Does it work if you remove the waka_ prefix from your api key?
The original issue seems to be resolved when I remove waka_
. TBS, the API key on the user settings page clearly has waka_
prepended, which is rather confusing.
The extension is still unable to communicate with my dashboard. Below is the tail from ~/.wakatime.log...
{"caller":"cmd/run.go:270","file":".../Brewfile","func":"cmd.runCmd","is_write":true,"level":"error","lineno":93,"message":"failed to run command: sending heartbeat(s) failed: api error: failed making request to \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": Post \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused","now":"2022-12-12T14:31:36-08:00","os/arch":"darwin/arm64","plugin":"vscode/1.74.0 vscode-wakatime/22.1.0","time":1670884296.305658,"version":"v1.60.1"} {"caller":"cmd/run.go:270","func":"cmd.runCmd","level":"error","message":"failed to run command: today fetch failed: failed fetching today from api: failed to make request to \"https://api.wakatime.com/api/v1/users/current/statusbar/today\": Get \"https://api.wakatime.com/api/v1/users/current/statusbar/today\": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused","now":"2022-12-12T14:32:10-08:00","os/arch":"darwin/arm64","version":"v1.60.1"} {"caller":"cmd/run.go:270","file":"/Users/kam/.wakatime.log","func":"cmd.runCmd","level":"error","lineno":1,"message":"failed to run command: sending heartbeat(s) failed: api error: failed making request to \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": Post \"https://api.wakatime.com/api/v1/users/current/heartbeats.bulk\": proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused","now":"2022-12-12T15:03:38-08:00","os/arch":"darwin/arm64","plugin":"vscode/1.74.0 vscode-wakatime/22.1.0","time":1670886218.695998,"version":"v1.60.1"}
The error is an invalid proxy: proxyconnect tcp: dial tcp [::1]:8080: connect: connection refused
.
Try removing any proxy
line from your ~/.wakatime.cfg
and it should work after re-opening vscode.
Thanks for the FB, Alan. I got the thing to work finally after a clean environment rebuild, and minimal configuration with an API key without the waka_
prefix.
It should work with the prefix too now.
Someone else can verify that...🙃
I am having no luck getting up and running with the extension on VSCodium Version: 1.73.1 Contents of ~/.wakatime.cfg are...
I've tried reinstalling the extension and even nuked my account and created a new one but I only see a message saying Invalid API key....check wakatime.com/settings
Console returns
Is this file supposed to be written at install? In my case I have to create it and still the same issue. I know this issue is duplicated and closed, but no solutions are available in older issues.
~/.wakatime.log file contents...