OpenTracksApp / OpenTracks

OpenTracks is a sport tracking application that completely respects your privacy.
https://OpenTracksApp.com
Apache License 2.0
1.06k stars 190 forks source link

Crash when start recording #1845

Closed Soft1Soft1 closed 9 months ago

Soft1Soft1 commented 9 months ago

IT is reproducible. The same reaction like in last Version. By every start it Crashs. and i had to stopp it in the settings->app->opentracks->stop always (or so) So the app cant be used anymore.

App information

Device information

Firmware

Cause of error

Exception in thread "main": java.lang.RuntimeException: Android14: Please grant permissions LOCATION and NEARBY DEVICES (manually)
    at de.dennisguse.opentracks.services.TrackRecordingService.startSensors(TrackRecordingService.java:218)
    at de.dennisguse.opentracks.services.TrackRecordingService.startRecording(TrackRecordingService.java:194)
    at de.dennisguse.opentracks.services.TrackRecordingService.startNewTrack(TrackRecordingService.java:174)
    at de.dennisguse.opentracks.TrackListActivity.lambda$onCreate$6(TrackListActivity.java:182)
    at de.dennisguse.opentracks.TrackListActivity.$r8$lambda$sfL1wLWtkeS4x8K11Too1HQMWNU(Unknown Source:0)
    at de.dennisguse.opentracks.TrackListActivity$$ExternalSyntheticLambda2.onConnected(Unknown Source:2)
    at de.dennisguse.opentracks.services.TrackRecordingServiceConnection.lambda$execute$1(TrackRecordingServiceConnection.java:139)
    at de.dennisguse.opentracks.services.TrackRecordingServiceConnection$$ExternalSyntheticLambda0.onConnected(Unknown Source:4)
    at de.dennisguse.opentracks.services.TrackRecordingServiceConnection.setTrackRecordingService(TrackRecordingServiceConnection.java:120)
    at de.dennisguse.opentracks.services.TrackRecordingServiceConnection.-$$Nest$msetTrackRecordingService(Unknown Source:0)
    at de.dennisguse.opentracks.services.TrackRecordingServiceConnection$1.onServiceConnected(TrackRecordingServiceConnection.java:58)
    at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2313)
    at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2350)
    at android.os.Handler.handleCallback(Handler.java:958)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:230)
    at android.os.Looper.loop(Looper.java:319)
    at android.app.ActivityThread.main(ActivityThread.java:8893)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
dennisguse commented 9 months ago

Works as designed: this crash is intentional as the required permissions are missing. We had no time to refactor this accordingly and a crash is better than silently recording no data. Please add the missing permissions in the application settings.

Duplicate of #1781.