Closed Mte90 closed 3 years ago
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.
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.
Seems that there is an error so doesn't work with wakapi. Check https://github.com/muety/wakapi/issues/214#issuecomment-880004048