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.27k stars 142 forks source link

Network problem sending heartbeats macos #413

Closed alanhamlett closed 3 days ago

alanhamlett commented 4 days ago
          The same issue with MacOS

[WakaTime][ERROR] Error: Command failed: /../.wakatime/wakatime-cli-darwin-arm64 --entity /../Templates/treact/public/index.html --plugin "vscode/1.85.1 vscode-wakatime/24.9.1" --lineno 13 --cursorpos 5 --lines-in-file 79 --alternate-project treact --project-folder /.../Templates/treact --write

sudo ~/.wakatime/wakatime-cli-darwin-arm64 --version ===> v1.105.2 sudo ~/.wakatime/wakatime-cli --version ===> v1.105.2 wakatime.vscode-wakatime version 24.9.1 Visual Studio Code - Insiders version 1.96.0-insider Visual Studio Code version Version: 1.85.1

The same issue with MacOS

[WakaTime][ERROR] Error: Command failed: /../.wakatime/wakatime-cli-darwin-arm64 --entity /../Templates/treact/public/index.html --plugin "vscode/1.85.1 vscode-wakatime/24.9.1" --lineno 13 --cursorpos 5 --lines-in-file 79 --alternate-project treact --project-folder /.../Templates/treact --write

sudo ~/.wakatime/wakatime-cli-darwin-arm64 --version ===> v1.105.2 sudo ~/.wakatime/wakatime-cli --version ===> v1.105.2 wakatime.vscode-wakatime version 24.9.1 Visual Studio Code - Insiders version 1.96.0-insider Visual Studio Code version Version: 1.85.1

More info log:

{"level":"error","now":"2024-11-21T09:49:29+07:00","caller":"cmd/run.go:344","func":"github.com/wakatime/wakatime-cli/cmd.runCmd","message":"failed to run command: sending heartbeat(s) failed: won't send heartbeat due to backoff without proxy","version":"v1.105.0","os/arch":"darwin/arm64","file":"/../cadence.ts","time":1732157369.035973,"plugin":"vscode/1.96.0-insider vscode-wakatime/24.8.0","lineno":43,"is_write":true}
{"level":"debug","now":"2024-11-21T10:07:27+07:00","caller":"cmd/run.go:106","func":"github.com/wakatime/wakatime-cli/cmd.RunE","message":"command: version","version":"v1.105.0","os/arch":"darwin/arm64"}

Originally posted by @AstaDK in https://github.com/wakatime/vscode-wakatime/issues/412#issuecomment-2496511153

alanhamlett commented 4 days ago

@AstaDK I moved your issue here because it's unrelated to the other issue.

Your error message says the plugin is rate limiting itself, which is normal when it can't connect to the api. You need to delete your ~/.wakatime/wakatime-internal.cfg file then check the new logs in ~/.wakatime/wakatime.log to find the real error message:

https://wakatime.com/faq#finding-error-messages-in-logfiles

AstaDK commented 3 days ago

@AstaDK I moved your issue here because it's unrelated to the other issue.

Your error message says the plugin is rate limiting itself, which is normal when it can't connect to the api. You need to delete your ~/.wakatime/wakatime-internal.cfg file then check the new logs in ~/.wakatime/wakatime.log to find the real error message:

https://wakatime.com/faq#finding-error-messages-in-logfiles

I deleted ~/.wakatime/wakatime-internal.cfg and check the new log error {"level":"error","now":"2024-11-26T08:44:10+07:00","caller":"cmd/run.go:347","func":"github.com/wakatime/wakatime-cli/cmd.runCmd","message":"failed to run command: sending heartbeat(s) failed: won't send heartbeat due to backoff without proxy","version":"v1.106.0","os/arch":"darwin/arm64","file":"/../src/api/middlewares/validators/schemas/activity.ts","time":1732585450.397133,"plugin":"vscode/1.96.0-insider vscode-wakatime/24.9.1","lineno":10,"is_write":true} {"level":"debug","now":"2024-11-26T08:44:23+07:00","caller":"cmd/run.go:143","func":"github.com/wakatime/wakatime-cli/cmd.RunE","message":"command: heartbeat","version":"v1.106.0","os/arch":"darwin/arm64"} {"level":"error","now":"2024-11-26T08:44:23+07:00","caller":"cmd/run.go:347","func":"github.com/wakatime/wakatime-cli/cmd.runCmd","message":"failed to run command: sending heartbeat(s) failed: won't send heartbeat due to backoff without proxy","version":"v1.106.0","os/arch":"darwin/arm64","file":"cat","time":1732585463.1484,"plugin":"wakatime-zsh-plugin/0.2.2","is_write":true}

@alanhamlett Do you have any suggestions?

AstaDK commented 3 days ago

I've attempted to delete ~/.wakatime/wakatime-internal.cfg several times, and now the Waka debug logs do not display any errors.

alanhamlett commented 3 days ago

No errors logged means it's working. Must have been a temporary network issue, as I'm seeing data received from VSCode for your account.