Closed samarthagarwal closed 2 years ago
Does the status bar change from Initialized
to something else when you save some changes in a file?
You should turn on debug mode and check your vscode dev console, and ~/.wakatime.log
file. Most likely it's a networking issue but we won't know for sure until checking the logs:
https://github.com/wakatime/vscode-wakatime#troubleshooting
I checked the logs and this is what I see towards the end.
{"caller":"cmd/run.go:276","func":"cmd.runCmd","level":"error","message":"failed to run command: today fetch failed: api error: 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\": dial tcp 143.244.210.202:443: connect: operation timed out","now":"2022-06-18T12:20:16+05:30","version":"v1.48.1"}
{"caller":"cmd/run.go:276","func":"cmd.runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to 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\": dial tcp 143.244.210.202:443: connect: operation timed out","now":"2022-06-18T12:27:03+05:30","version":"v1.48.1"}
Also noted that the status of wakatime plugin in the status bar is always shown as Initialized.
Do you possibly need a proxy to connect to the internet? If so, it can be set in your wakatime extension settings inside VS Code.
No. I do not need a proxy to connect to the internet. What else can I check?
Try pinging the api:
ping api.wakatime.com
Also, do you have Docker installed? I think it's also built with Go and if it can connect to websites, for ex: when checking for updates, then we should be able to get wakatime-cli working too.
Also, try adding this line to your ~/.wakatime.cfg
file to get more verbose logs:
debug = true
ping api.wakatime.com
works just fine. Also, as I checked, debug=true
is already set.
At least your stats should be safe in the offline db at ~/.wakatime.bdb
, so when we get it working they'll sync up to your dashboard.
I just noticed your wakatime-cli version is old:
"version":"v1.48.1"
If you restart vscode, then check your vscode dev console window do you see it updating to v1.53.2?
For some reason, it has started working. I checked, and my stats for last 3 days are showing in the dashboard. I really do not know what fixed it.
I use wakatime across VS Code and Android Studio. It was working fine when I last checked around June 10, 2022. I noticed it yesterday that there is no activity shown for the last 14 days in my dashboard. I reinstalled both the extensions but still it does not seem to work. The status in the IDEs is shown as "initialized".
What should I do next?