eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 185 forks source link

Full navigation crashes on android 14 #336

Closed reubendeekay closed 7 months ago

reubendeekay commented 10 months ago

I get this error on Android 14 when trying to do full Navigation. The embedded navigation still works well so its not an issue with setup. Unable to start activity ComponentInfo{com.daride.driver/com.eopeter.fluttermapboxnavigation.activity.NavigationActivity}: java.lang.SecurityException: com.daride.driver: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts

Here is my stack trace I/Mapbox ( 8054): [nav-native]: No PersistentConfig found at /data/user/0/com.daride.driver/files/mbx_nav/tiles/navigation/config.json [ ] I/Mapbox ( 8054): [nav-native]: No PersistentConfig found at /data/user/0/com.daride.driver/files/mbx_nav/tiles/navigation/config.json [ +2 ms] I/Mapbox ( 8054): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_01_07-03_00_07 [{"map":{"tileset_version":"2024_01_07-03_00_07"}}] [ +1 ms] I/Mapbox ( 8054): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_01_07-03_00_07 [{"map":{"tileset_version":"2024_01_07-03_00_07"}}] [ +1 ms] W/Mapbox ( 8054): [nav-sdk]: [BillingController] [code: TokenValidationFailed, message: Token validation failed for: this-can-be-skip-since-we-set-it-later] [ +37 ms] W/Mapbox ( 8054): [config_service]: Unexpected HTTP response code is received: 401 [ +3 ms] I/TextToSpeech( 8054): Connected to TTS engine [ +7 ms] W/Mapbox ( 8054): [config_service]: Unexpected HTTP response code is received: 401 [ +2 ms] W/Mapbox ( 8054): [config_service]: Unexpected HTTP response code is received: 401 [ +1 ms] I/TextToSpeech( 8054): Setting up the connection to TTS engine... [ +80 ms] W/Mapbox ( 8054): [events_service]: Failed to flush 0 event(s): events dispatch disabled [ +1 ms] W/System ( 8054): A resource failed to call destroy. [ ] W/System ( 8054): A resource failed to call destroy. [ ] W/System ( 8054): A resource failed to call destroy. [ +26 ms] E/Mapbox ( 8054): [events_service]: Events sending aborted [ +1 ms] E/Mapbox ( 8054): [nav-sdk]: [MapboxMetricsReporter] Failed to send Turnstile event: [code: Unauthorized, message: Not Authorized] [ +108 ms] I/Process ( 8054): Sending signal. PID: 8054 SIG: 9 [ +178 ms] Service protocol connection closed. [ ] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device (file:///data/user/0/com.daride.driver/code_cache/driver_applicationCNXMXO/driver_application/) [ +253 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed

samargy commented 10 months ago

Also getting the same error. Please fix!

reubendeekay commented 10 months ago

You can fix the issue by setting the compileSDK to 33. However the package needs to be upgraded to support >=34

samargy commented 10 months ago

Was the issue you were getting happening when the X button was clicked? Since my map was rendering however, crashed when the X button is clicked.

reubendeekay commented 10 months ago

It wasnt the same issue but downgrading fixed my issue. Android 14 has alot of changes, I would advice to stick to sdk 33 until the package is updated

DohanResponse24 commented 10 months ago

Thanks for the reply. change back to 33 works for me as well

samargy commented 10 months ago

Sticking to 33 didn't fix for me.

antonzk commented 10 months ago

Encountering a broader challenge during app publishing related to the proper usage demonstration of Foreground service permissions. The issue extends to the necessity of recording a video to showcase the correct implementation of these permissions. Unfortunately, on Android 14, recording such videos seems to be unattainable due to platform restrictions.

Any insights or workarounds for addressing this constraint on Android 14 would be greatly appreciated.

image

eopeter commented 10 months ago

Record it using the emulator or a screen capture tool out of Android studio

eopeter commented 7 months ago

Stale issue message

ffkarine commented 2 months ago

I'm also getting the "One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts" on startNavigation since I upgraded compileSdkVersion from 33 to 34.

It is a Google Play requirement to target at least API 34 (Android 14), so downgrading back to 33 it's NOT an option!