wakatime / vscode-wakatime

Visual Studio Code plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/vs-code
BSD 3-Clause "New" or "Revised" License
1.23k stars 137 forks source link

Wakatime unable to get online "failed to run command: sending heartbeat(s) later due to api error: won't send heartbeat due to backoff" #239

Closed harmolipi closed 2 years ago

harmolipi commented 2 years ago

I'm trying to get up and running with WakaTime, but it doesn't seem to be able to get online. I've got the extension installed in VSCode and I've entered my API key. It's all running on my Chromebook in Linux. The WakaTime icon on my status bar just says "WakaTIme: working offline... coding activity will sync next time we are online". I checked the logs, and I basically get hundreds of lines of the following:

{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"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: lookup api.wakatime.com on 100.115.92.193:53: read udp 100.115.92.196:48964->100.115.92.193:53: i/o timeout","now":"2021-10-05T13:37:18-04:00","version":"v1.27.0"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"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: lookup api.wakatime.com on 100.115.92.193:53: read udp 100.115.92.196:46071->100.115.92.193:53: i/o timeout","now":"2021-10-05T13:39:52-04:00","version":"v1.27.0"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to api error: won't send heartbeat due to backoff","now":"2021-10-05T13:39:57-04:00","version":"v1.27.0"}
{"caller":"/home/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199","func":"runCmd","level":"error","message":"failed to run command: sending heartbeat(s) later due to api error: won't send heartbeat due to backoff","now":"2021-10-05T13:40:15-04:00","version":"v1.27.0"}

Any ideas why it doesn't seem to be able to connect to the api? Any help getting up and running would be much appreciated.

alanhamlett commented 2 years ago

The error says it's a DNS lookup timeout, when connecting to DNS server 100.115.92.193.

harmolipi commented 2 years ago

The error says it's a DNS lookup timeout, when connecting to DNS server 100.115.92.193.

Oof you're right, sorry about that - for whatever reason it was just the network I was using. Works just fine on every other network. Thank you!