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

Failing to sync - "offline sync failed: api error" #235

Closed pzelnip closed 3 years ago

pzelnip commented 3 years ago

I got my weekly report today and it indicated there was no coding activity for the week. Following the troubleshooting guide I looked in my ~/.wakatime.log file, and saw a bunch of errors that read:

{
   "caller":"/Users/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:194",
   "func":"runCmd",
   "level":"error",
   "message":"failed to run command: offline sync 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\": dial tcp: lookup api.wakatime.com on 192.168.1.1:53: read udp 192.168.1.250:61530->192.168.1.1:53: i/o timeout",
   "now":"2021-09-13T12:52:42-07:00",
   "version":"v1.26.0"
}

Any suggestions? If it helps/matters I'm running:

Version: 1.60.0 Commit: e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff Date: 2021-09-01T10:54:53.442Z Electron: 13.1.8 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 19.6.0 Wakatime extension version: v17.0.0

pzelnip commented 3 years ago

Looking at the Wakatime dashboard it looks like I haven't had coding activity recorded since September 3rd (10 days ago).

pzelnip commented 3 years ago

This seems similar to https://github.com/wakatime/vscode-wakatime/issues/223 though the error I see in that log file seems slightly different.

gandarez commented 3 years ago

Are you behind a proxy or connected to VPN?

pzelnip commented 3 years ago

Yup, it appears as though that was the issue, while connected to a VPN it errored, upon disconnecting it appears to work now. Cheers!