Closed duhow closed 8 months ago
Is this reproducible and if so: how?
It's the first time I have seen a crash from the app. Unlocked the phone and found it. I suspect that Gadgetbridge may have triggered it?
Was any data recorded aka did OpenTracks crash immediately after triggering record? And you triggered it via Gadgetbridge. This implies the screen was off when you started the recording?
I did not open OpenTracks app for weeks. Just did some exercise with my Mi Band, get my phone 10 minutes later, unlock it, and find this crash report.
OK. Could you try if this is always crashing or only sometimes? I don't have this setup at hand.
Thank you very much, Dennis, for your valueable tool. This helps me to increase the value of my otherwise rather dumb Mi Band 5. I've got the same/similar error: I see a full-screen error screen with an OpenTracks error.
I assume this happens whenever I move and my paired Mi Band 5 autodetect walking as activity: This causes a request to Gadgetbridge to start a recording. Of course the phone is locked at this moment.
This reproducible: @dennisguse
Exception in thread "main": android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{c7c0eb u0 de.dennisguse.opentracks/.services.TrackRecordingService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Nota bene: I've been using this combination since quite a long time. So this error only has become visible since some update in the past month. Never seen this error before. Not sure if update from GB or OpenTracks.
@bentolor Can you check that this PR fixes the issue? https://github.com/OpenTracksApp/OpenTracks/pull/1855
I don't have a device at hand that I can use for testing :/
Thanks @dennisguse for your quick reaction!
I just installed the nightly APK attached to the merge request, installed it on my phone, changed the package name in GB to *.nightly
and then successfully executed the testcase above without any errors.
Buuuuut: Then I revert my changes above and tried to reproduce and… was not able to reproduce.
Since our last conversation my F-Droid upgraded OT from v4.11.0 to v4.11.1: Could this patch already have fixed the issue? Otherwise it seems my reproduce is only stable under some circumstances and I'm unable to actually confirm or deny the fix is working.
Not sure how to proceed from here on: Is it safe to merge the change anyway?
v4.11.1 is broken and v4.11.2 reverts the initial fix. The recording was just stopped when the screen is turned as the recording service was started incorrectly.
This PR contains a (hopefully) correct fix. Can you try it for a real recording (outdoor, screen off, more than 10min; started and stopped via watch)?
Let me check I'm able to reproduce. Might take some time until I get the opportunity. Thank you for your support!
Sorry for my lack of feedback @dennisguse , but I struggled to actually replicate the issue stably, even though I was able to reproduce it stably when I wrote my comment above.
So it seems some additional state comes into play. I've successfully run nightly and yet not observed the issue, but I cannot confirm it really addresses it. So hope this works.
Thanks for your support and finger-crossed this solves the issue.
@bentolor Thanks. Hope it is solved; if it occurs again, just re-open the issue :D
App information
Device information
Firmware
Cause of error