Tatsh / kate-wakatime

Kate plugin to interface with WakaTime

Home Page:https://tatsh.github.io/kate-wakatime/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nested array

Mte90 opened this issue · comments

Seems that there is an error so doesn't work with wakapi.
Check muety/wakapi#214 (comment)

commented

Could you delete ~/.wakatime.db and report back? This will delete queued entries and from what I can tell some were stored that were erroneous.

If you really want to test, disconnect your internet so Kate will queue entries (every 2 minutes). Try to get at least a few entries. Close Kate, reconnect and see if Kate can send successfully.

To see queued entries:

sqlite3 ~/.wakatime.db 'select heartbeat from heartbeat_2'

Alternatively you can delete the bad entries:

sqlite3 ~/.wakatime.db 'delete from  heartbeat_2 where heartbeat like "[%"'

Removed that file but the issue is still there as you can see from https://bin.muetsch.io/web/wakapi-101?token=NNWZBE6RKa2whIL5mKa_MX7pgSRTHtpD0u5O0fvNaa2J (the latests).

Looking it is happening just on a queue heartbeats.
I just commented the execution of that function and looking at the endpoint there are no wrong beats.

commented

You should check queued heartbeats in the database to ensure they are JSON objects and not arrays. that's where the issue is coming from. A prior buggy version of the plugin made those.