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.24k stars 137 forks source link

WakaTime Initializing forever in Remote-WSL2 #391

Closed ishiko732 closed 4 months ago

ishiko732 commented 4 months ago

I have enabled the Wakatime extension on 'WSL: Ubuntu-24.04,' but it remains stuck at the Initializing stage. I attempted to resolve this by cloning the repository using git clone https://github.com/wakatime/wakatime-cli/releases/download/v1.90.0/wakatime-cli-linux-amd64.zip and copying it to ~/.vscode-server/extensions/wakatime.vscode-wakatime-24.5.0/wakatime-cli. I then granted permissions using sudo chmod 755 ./wakatime-cli but the issue persists. Additionally, I noticed that every time I reload the VS Code window, it downloads wakatime-cli' + this.randStr() + '.zip' in the ~/.wakatime folder. image

~/.wakatime folder : image Additionally, if I don't manually place the wakatime-cli file in '~/.vscode-server/extensions/wakatime.vscode-wakatime-24.5.0/wakatime-cli', the wakatime.log file does not appear.

~/.wakatime/wakatime.log:

{"caller":"cmd/run.go:158","func":"cmd.Run","level":"warning","message":"one of the following parameters has to be provided: --config-read, --config-write, --entity, --offline-count, --print-offline-heartbeats, --sync-offline-activity, --today, --today-goal, --useragent, --version","now":"2024-05-26T13:31:39+08:00","os/arch":"linux/amd64","version":"v1.90.0"}

~/.vscode-server/extensions/wakatime.vscode-wakatime-24.5.0 folder: image

KiritaniAyaka commented 4 months ago

Try to place the executable file you unzipped to ~/.wakatime/wakatime-cli then restart VS Code. It works for me.

ishiko732 commented 4 months ago

Try to place the executable file you unzipped to ~/.wakatime/wakatime-cli then restart VS Code. It works for me.

I tried setting up a proxy in Ubuntu and added the proxy settings in VS Code, and it started working.