Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when MapboxTripService is starting #7888

Open
empratysg opened this issue Nov 25, 2024 · 0 comments
Open

Crash when MapboxTripService is starting #7888

empratysg opened this issue Nov 25, 2024 · 0 comments

Comments

@empratysg
Copy link

I've been getting a lot of crash reports from Firebase lately.

Here's the info I got from Firebase

It seems to be a bug related to starting Mapbox Service from the Background while running with Android Auto

I can't reproduce it yet
I'll update if I find a way to figure it out

Android API: 34
Mapbox Navigation SDK version: 2.20.2

Stack Traces

Fatal Exception: java.lang.RuntimeException: Unable to start service com.mapbox.navigation.core.trip.service.NavigationNotificationService@81f8e73 with Intent { cmp=com.sg.ncs.breeze/com.mapbox.navigation.core.trip.service.NavigationNotificationService }: java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{feee410 7408:com.sg.ncs.breeze/u0a346} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permission
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5137)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2474)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:222)
at android.os.Looper.loop(Looper.java:314)
at android.app.ActivityThread.main(ActivityThread.java:8779)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1090)

Caused by java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{feee410 7408:com.sg.ncs.breeze/u0a346} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permission
at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
at android.os.Parcel.createException(Parcel.java:3041)
at android.os.Parcel.readException(Parcel.java:3024)
at android.os.Parcel.readException(Parcel.java:2966)
at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7282)
at android.app.Service.startForeground(Service.java:775)
at com.mapbox.navigation.core.trip.service.NavigationNotificationService.notificationDataObserver$lambda-0(NavigationNotificationService.kt:23)
at com.mapbox.navigation.core.trip.service.MapboxTripService$Companion.registerOneTimeNotificationDataObserver$libnavigation_core_release(MapboxTripService.kt:45)
at com.mapbox.navigation.core.trip.service.NavigationNotificationService.onStartCommand(NavigationNotificationService.kt:50)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5119)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2474)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:222)
at android.os.Looper.loop(Looper.java:314)
at android.app.ActivityThread.main(ActivityThread.java:8779)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1090)

Caused by android.os.RemoteException: Remote stack trace:
at com.android.server.am.ActiveServices.validateForegroundServiceType(ActiveServices.java:2750)
at com.android.server.am.ActiveServices.setServiceForegroundInnerLocked(ActiveServices.java:2461)
at com.android.server.am.ActiveServices.setServiceForegroundLocked(ActiveServices.java:1752)
at com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:14064)
at android.app.IActivityManager$Stub.onTransact$setServiceForeground$(IActivityManager.java:12784)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant