Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not working since a while, it shows connecting #268

Closed
n-for-all opened this issue Apr 4, 2022 · 6 comments
Closed

It is not working since a while, it shows connecting #268

n-for-all opened this issue Apr 4, 2022 · 6 comments

Comments

@n-for-all
Copy link

n-for-all commented Apr 4, 2022

After inspecting the logs:

{"caller":"/Users/runner/work/wakatime-cli/wakatime-cli/cmd/run.go:246","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 [2604:a880:4:1d0::2a7:b000]:443: connect: no route to host","now":"2022-02-18T18:06:04+04:00","version":"v1.35.4"}

I tested the URL "https://api.wakatime.com/api/v1/users/current/heartbeats.bulk"in the browser and shows unauthorized

@alanhamlett
Copy link
Member

alanhamlett commented Apr 4, 2022

The error is:
dial tcp [2604:a880:4:1d0::2a7:b000]:443: connect: no route to host

Do you have a firewall that could be blocking the plugin from connecting out to the api?

It's expected for that url to show unauthorized in your browser, because it only accepts POST requests and requires an api key.

@n-for-all
Copy link
Author

I don't have any firewall, i have only avira antivirus which shouldn't be an issue, i guess the issue is from the latest update in macos, are you using python somewhere in the code?

I tested the commad from nodejs script, it worked, i guess the issue is from the extension and not outside, i can try to replace api.wakatime.com with the ip address and check if that works

@alanhamlett
Copy link
Member

alanhamlett commented Apr 5, 2022

are you using python somewhere in the code?

Nope, we don't use Python in this extension anymore. The extension does download a Go binary from https://github.com/wakatime/wakatime-cli/releases/tag/v1.38.0 into ~/.wakatime/, which is the program that's generating that no route to host log message.

I tested the commad from nodejs script, it worked

Which command?

i can try to replace api.wakatime.com with the ip address and check if that works

It's already using the correct ip (2604:a880:4:1d0::2a7:b000) for the WakaTime API. That's our ipv6 address, so maybe it's something related to ipv6. Does this url work in your browser:
https://[2604:a880:4:1d0::2a7:b000]/api/v1/meta

@n-for-all
Copy link
Author

Ok great, so i deleted and resinstalled the extension, and restarted visual studio, the extension intialized, but when i open another or new workspace the extension get stuck at wakatime initializing, inspecting the developer tools, it shows below, not sure if it is related

image

i guess it is fine to be only for 1 workspace, untill possibly the next update you might fix r support multi workspace

thanks for the support

@alanhamlett
Copy link
Member

Might be fixed in v18.0.9. It's possible two workspaces (each workspace loads it's own vscode-wakatime) opened at the same time would corrupt wakatime-cli.zip since they both would download that file at the same time. Appending a random string to the filename will prevent that.

After updating can you open multiple workspaces without errors?

@n-for-all
Copy link
Author

I updated and restarted, 2 out of 3 workspace loaded, i restarted vscode again only 1 loaded, seems completely random, but reloading the window seems to work and it gets initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants