Skip to content

Conversation

georgy-komarov
Copy link
Contributor

@georgy-komarov georgy-komarov commented Mar 31, 2022

This PR is an attempt to fix import error when data[0] type is url
Error message: msg=json decoding failed: "Error in $.data[0].type: Value can only be one of ['file', 'app', 'domain']"

If we look at the docs, we'll see that is correct. However Wakatime Chrome plugin also sends url type. It is now missing in the docs.
Here is an example:

{
    "branch": null,
    "category": "browsing",
    "created_at": "2022-03-01T00:18:29Z",
    "cursorpos": null,
    "dependencies": [],
    "entity": "http://localhost:8060",
    "id": "9e4a69c0-a4d1-4c6e-9d06-75a4f586bc31",
    "is_write": null,
    "language": null,
    "lineno": null,
    "lines": null,
    "machine_name_id": "f13d8c4b-fd8d-43ab-87db-75cf06ccc303",
    "project": "frontend",
    "time": 1646093909.0,
    "type": "url",
    "user_agent_id": "1efe69f2-4c95-4c76-b778-d790901ecb86",
    "user_id": "d820e1be-34c6-423b-b5c1-9060fed2e97d"
}

I am not a haskell developer. That's why not quite sure if these changes are correct.
I'll try to build an image and check if everything is working.
UPD. It now works great. However, I had to update ubuntu image for Dockerfile.arm up to 21.04 version.

@georgy-komarov georgy-komarov changed the title Add UrlType heartbeat type Add url heartbeat type Apr 1, 2022
@mujx
Copy link
Owner

mujx commented Apr 3, 2022

Thanks a lot @georgy-komarov for the fix!

@mujx mujx merged commit 96747c7 into mujx:master Apr 3, 2022
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

Successfully merging this pull request may close these issues.

2 participants