Skip to content

Hakatime 400 Error on Sending Heartbeats #49

@jimmybrancaccio

Description

@jimmybrancaccio

Hey @mujx, thanks for looking into #48. It however appears there's still issues. I am on VSCode 1.61.0:

Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
Date: 2021-10-07T18:10:20.463Z
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 20.6.0

and Hakatime 1.6.2 but I am still getting errors. From my .wakatime.log file:

{
    "caller": "/Users/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199",
    "func": "runCmd",
    "level": "error",
    "message": "failed to run command: today fetch failed: api error: failed fetching today from api: invalid response status from \"https://hakatime.mydomain.com/api/v1/users/current/statusbar/today\". got: 404, want: 200. body: \"File not found\"",
    "now": "2021-10-10T11:41:06-05:00",
    "version": "v1.27.0"
}
{
    "caller": "/Users/runner/work/wakatime-cli/wakatime-cli/cmd/legacy/run.go:199",
    "func": "runCmd",
    "level": "error",
    "message": "failed to run command: sending heartbeat(s) later due to bad request: bad request at \"https://hakatime.mydomain.com/api/v1/users/current/heartbeats.bulk\"",
    "now": "2021-10-10T11:41:13-05:00",
    "version": "v1.27.0"
}
{
    "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: bad request: bad request at \"https://hakatime.mydomain.com/api/v1/users/current/heartbeats.bulk\"",
    "now": "2021-10-10T11:44:02-05:00",
    "version": "v1.27.0"
}

And logs from my Hakatime container:


192.168.100.1 - - [10/Oct/2021:11:48:21 -0500] "POST /api/v1/users/current/heartbeats.bulk HTTP/1.1" 400 - "" "wakatime/v1.27.0 (darwin-20.6.0-arm64) go1.17.1 vscode/1.61.0 vscode-wakatime/17.1.0",
192.168.100.1 - - [10/Oct/2021:11:48:21 -0500] "POST /api/v1/plugins/errors HTTP/1.1" 400 - "" "wakatime/v1.27.0 (darwin-20.6.0-arm64) go1.17.1 vscode/1.61.0 vscode-wakatime/17.1.0",
192.168.100.1 - - [10/Oct/2021:11:48:48 -0500] "POST /api/v1/users/current/heartbeats.bulk HTTP/1.1" 400 - "" "wakatime/v1.27.0 (darwin-20.6.0-arm64) go1.17.1 vscode/1.61.0 vscode-wakatime/17.1.0",
192.168.100.1 - - [10/Oct/2021:11:48:48 -0500] "POST /api/v1/plugins/errors HTTP/1.1" 400 - "" "wakatime/v1.27.0 (darwin-20.6.0-arm64) go1.17.1 vscode/1.61.0 vscode-wakatime/17.1.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions