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

Failed fetching today from api #388

Open
UnknownSuperficialNight opened this issue Apr 12, 2024 · 4 comments
Open

Failed fetching today from api #388

UnknownSuperficialNight opened this issue Apr 12, 2024 · 4 comments
Labels

Comments

@UnknownSuperficialNight

Getting this error and no progress shows up in wakatime dashboard

{"caller":"cmd/run.go:99","func":"cmd.Run","level":"debug","message":"command: version","now":"2024-04-13T02:56:00+12:00","os/arch":"linux/amd64","version":"v1.90.0"}
{"caller":"cmd/run.go:117","func":"cmd.Run","level":"debug","message":"command: today","now":"2024-04-13T02:56:01+12:00","os/arch":"linux/amd64","version":"v1.90.0"}
{"caller":"cmd/run.go:341","func":"cmd.runCmd","level":"error","message":"failed to run command: today fetch failed: failed fetching today from api: invalid response status from \"https://wakatime.com/api/users/current/statusbar/today\". got: 404, want: 200. body: \"{\\\"error\\\": \\\"Not found\\\"}\"","now":"2024-04-13T02:56:02+12:00","os/arch":"linux/amd64","version":"v1.90.0"}
@UnknownSuperficialNight
Copy link
Author

UnknownSuperficialNight commented Apr 12, 2024

looking through the api i can get a return not on https://wakatime.com/api/users/current/statusbar/today but i can get a return on https://wakatime.com/api/v1/users/current/status_bar/today

@alanhamlett
Copy link
Member

What's your ~/.wakatime.cfg contents? (minus your api key)

My guess is there's an api_url line in your config that's set the api base url without the v1 part.

@UnknownSuperficialNight
Copy link
Author

What's your ~/.wakatime.cfg contents? (minus your api key)

My guess is there's an api_url line in your config that's set the api base url without the v1 part.

This is my wakatime.cfg

[settings]
api_key = $(api_key)
api_url=https://wakatime.com/api
hide_branch_names=true
hide_project_folder=true
hidefilenames=false

debug = true

Should it be like this?

api_url=https://wakatime.com/api/v1

@alanhamlett
Copy link
Member

You should remove the api_url line then it will work, or yes with the v1 in the url also works.

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

No branches or pull requests

2 participants