Skip to content

VS Code v1.60.2 and Wakatime Extension v1.27.0 - MethodNotAllowed Error #48

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

Closed
jimmybrancaccio opened this issue Sep 23, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@jimmybrancaccio
Copy link

I have VS Code v1.60.2 and v1.27.0 of the Wakatime extension. Ever since the 21st (about 2 days ago) the extension has failed to upload heartbeats to my Hakatime instance. I enabled debug mode in Hakatime but that didn't seem to provide any extra logs, and then I enabled debug mode for the extension and I am seeing this:

{
    "caller": "/Users/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199",
    "func": "runCmd",
    "level": "error",
    "message": "failed to run command: offline sync failed: api error: invalid response status from \"https://hakatime.mydomain.com/api/v1/users/current/heartbeats.bulk\". got: 200, want: 201/202. body: \"{\\\"responses\\\":[[{\\\"data\\\":{\\\"id\\\":\\\"69994\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"69995\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"69996\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"69997\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"69998\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"69999\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"70000\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"70001\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"70002\\\"}},201],[{\\\"data\\\":{\\\"id\\\":\\\"70003\\\"}},201]]}\"",
    "now": "2021-09-23T16:37:32-05:00",
    "version": "v1.27.0"
}

{
    "caller": "/Users/runner/work/wakatime-cli/wakatime-cli/pkg/api/diagnostic.go:28",
    "func": "SendDiagnostics",
    "level": "debug",
    "message": "sending diagnostic data to api at https://hakatime.mydomain.com/api/v1/plugins/errors",
    "now": "2021-09-23T16:37:32-05:00",
    "version": "v1.27.0"
}

{
    "caller": "/Users/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:235",
    "func": "sendDiagnostics",
    "level": "error",
    "message": "failed to send diagnostics: invalid response status from \"https://hakatime.mydomain.com/api/v1/plugins/errors\". got: 400, want: 201. body: \"{\\\"error\\\":\\\"MethodNotAllowed\\\",\\\"message\\\":\\\"Ensure that the Content-Type header field is set correctly\\\"}\"",
    "now": "2021-09-23T16:37:32-05:00",
    "version": "v1.27.0"
}

Any ideas on this? It does look like the Wakatime extension was updated very recently, so maybe it's that?

If there's any other information I can provide to help troubleshoot this please let me know!

@jimmybrancaccio jimmybrancaccio changed the title VS Code - MethodNotAllowed Error VS Code v1.60.2 and Wakatime Extension v1.27.0 - MethodNotAllowed Error Sep 23, 2021
@mujx
Copy link
Owner

mujx commented Sep 24, 2021

Yep it seems some recent updates on the VS Code edit had caused some issues. I will address them soon.

I'm not sure if downgrading your plugin is an option until the issue fixed.

@mujx mujx added the bug Something isn't working label Sep 24, 2021
@mujx mujx closed this as completed in c798777 Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants