-
|
Hi, Background System information Steps to Reproduce & AnalysisNote Please note that some log entries might not be in perfect chronological order, as I documented afterwards. Test 1: Natural SyncOpened the editor with pending offline heartbeats. Wakapi logSep 06 12:16:42 homepage wakapi[2010]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":200,"method":"GET","uri":"/api/users/current/statusbar/today","duration":5573646,"bytes":453,"addr":"CENSORED","user":"CENSORED"}
Sep 06 12:16:48 homepage wakapi[2010]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":201,"method":"POST","uri":"/api/users/current/heartbeats.bulk","duration":59870587,"bytes":49,"addr":"CENSORED","user":"CENSORED"}
Sep 06 12:16:48 homepage wakapi[2010]: {"time":"CENSORED","level":"INFO","msg":"generating ephemeral durations for user up until now","user":"CENSORED","from":"0001-01-01T00:00:00Z"}
Sep 06 12:16:49 homepage wakapi[2010]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":201,"method":"POST","uri":"/api/users/current/heartbeats.bulk","duration":84768071,"bytes":676,"addr":"CENSORED","user":"CENSORED"}
Sep 06 12:16:50 homepage wakapi[2010]: {"time":"CENSORED","level":"ERROR","msg":"failed to persist new ephemeral durations for user","user":"CENSORED","error":"SQL logic error: too many SQL variables (1)"}Result: Test 2: Simulated Offline, Then Online
Wakapi logSep 06 13:26:47 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":200,"method":"GET","uri":"/api/users/current/statusbar/today","duration":4688540,"bytes":2169,"addr":"CENSORED","user":"CENSORED"}
Sep 06 13:29:32 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":200,"method":"GET","uri":"/api/users/current/statusbar/today","duration":9382000,"bytes":2169,"addr":"CENSORED","user":"CENSORED"}
Sep 06 13:29:41 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":201,"method":"POST","uri":"/api/users/current/heartbeats.bulk","duration":37094858,"bytes":49,"addr":"CENSORED","user":"CENSORED"}
Sep 06 13:29:41 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"generating ephemeral durations for user up until now","user":"CENSORED","from":"0001-01-01T00:00:00Z"}
Sep 06 13:29:42 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":201,"method":"POST","uri":"/api/users/current/heartbeats.bulk","duration":1037055871,"bytes":841,"addr":"CENSORED","user":"CENSORED"}
Sep 06 13:29:42 homepage wakapi[2070]: {"time":"CENSORED","level":"ERROR","msg":"failed to persist new ephemeral durations for user","user":"CENSORED","error":"SQL logic error: too many SQL variables (1)"}
Sep 06 13:29:42 homepage wakapi[2070]: {"time":"CENSORED","level":"INFO","msg":"[request]","status":201,"method":"POST","uri":"/api/users/current/heartbeats.bulk","duration":89089669,"bytes":511,"addr":"CENSORED","user":"CENSORED"}Result:
Test 3: Manual Sync
Wakatime cli (Windows) manual syncC:\Users\CENSORED\.wakatime>wakatime-cli-windows-amd64.exe --offline-count
11
C:\Users\CENSORED\.wakatime>wakatime-cli-windows-amd64.exe --sync-offline-activity 1000
C:\Users\CENSORED\.wakatime>wakatime-cli-windows-amd64.exe --offline-count
0
C:\Users\CENSORED\.wakatime>Wakapi logSep 06 15:16:54 homepage wakapi[2120]: {"time":"CENSORED","level":"INFO","msg":"generating ephemeral durations for user up until now","user":"CENSORED","from":"0001-01-01T00:00:00Z"}
Sep 06 15:16:55 homepage wakapi[2120]: {"time":"CENSORED","level":"ERROR","msg":"failed to persist new ephemeral durations for user","user":"CENSORED","error":"SQL logic error: too many SQL variables (1)"}Result: ConclusionSync triggering isn't working as expected. But even if it would work seamlessly, the error in wakapi logs still raises my eyebrows. One idea of mine is a shell script checking at startup if i'm in my home network (Wakapi reachable) and if so, trigger a manual sync. But still those errors worry me. Note I couldn't determine a continuous output behavior. Sometimes data appears in the dashboard, sometimes not, even when the error is present. Questions for the Maintainers:
Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Note Written with support/review of AI. But analyzed, drafted and corrected manually by me :) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting 👍. I saw that error before in the context of SQLite when trying to insert too large batches of heartbeats at the same time (like many hundreds or so). But your offline cache was only 11 heartbeats big in the example and the error doesn't occur with heartbeats, but with durations. Actually looks like a bug to me. Can you please do me a favor and send the output of the following SQL query? PRAGMA table_info(durations); |
Beta Was this translation helpful? Give feedback.
-
|
Turned this into an issue (because probably a bug), see #840. |
Beta Was this translation helpful? Give feedback.
Turned this into an issue (because probably a bug), see #840.