vanBassum / Wakatime.Unity

A Wakatime plugin for Unity
MIT License
40 stars 7 forks source link

Thread was being aborted. Error processing heartbeat(s) #16

Closed Rabadash8820 closed 2 months ago

Rabadash8820 commented 1 year ago

I've been seeing this message a lot with this package. I can't reproduce it reliably, but it mostly happens when I first load up my project in a new Editor session. The below error and warning always occur together.

My environment:

Warning:

[Wakatime.Run] Exception when running processC:\Users\shund\Downloads\wakatime-cli-windows-amd64.exe
Thread was being aborted.
UnityEngine.Debug:LogWarning (object)
Wakatime.Logger:Log (Wakatime.LogLevels,string,string) (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Logging/Logging.cs:32)
Wakatime.ProcessRunner:Run () (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Utils/ProcessRunner.cs:111)
Wakatime.ProcessRunner:RunInBackground (string) (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Utils/ProcessRunner.cs:39)
Wakatime.WakatimeCliHandler:ProcessHeartbeats () (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Handlers/WakatimeCliHandler.cs:110)
Wakatime.WakatimeCliHandler:<.ctor>b__13_0 (object,System.Timers.ElapsedEventArgs) (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Handlers/WakatimeCliHandler.cs:36)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()

Error:

[Wakatime.Thread was being aborted.] Error processing heartbeat(s).
UnityEngine.Debug:LogError (object)
Wakatime.Logger:Log (Wakatime.LogLevels,string,string) (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Logging/Logging.cs:29)
Wakatime.WakatimeCliHandler:ProcessHeartbeats () (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Handlers/WakatimeCliHandler.cs:124)
Wakatime.WakatimeCliHandler:<.ctor>b__13_0 (object,System.Timers.ElapsedEventArgs) (at ./Library/PackageCache/com.vanbassum.wakatime@691a6ca453/Editor/Handlers/WakatimeCliHandler.cs:36)
System.Threading._ThreadPoolWaitCallback:PerformWaitCallback ()
vanBassum commented 1 year ago

Hello,

As far as I can deduct from the logging, the wakatime cli is aborting prematurely. I am not sure why this happens.

Is there more information in the log? I would expect there is also a log "Could not send heartbeat." and after that the output from the CLI.

In case that's not available, Could you test this with the log level on debug? If you do that, the wakatime cli will be visible. This will give more information about what's happening.

Rabadash8820 commented 1 year ago

Sure, I'll set log level to debug. It may take a couple sessions to repro but I'll post any additional logs when I have them.

vanBassum commented 1 year ago

Have you encountered this problem again? I haven't been using unity as much lately but my planning is to use Unity more in the next couple of months. Maybe ill encounter the same issue, I haven't seen this myself yet.

vanBassum commented 2 months ago

I will close this issue, since it has been stale for a long time now. If the issue still persists, please re-open the issue.