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 while updating navigation notification: android.os.TransactionTooLargeException #355

Closed
Kahtaf opened this issue Oct 11, 2017 · 5 comments
Labels
bug Defect to be fixed.

Comments

@Kahtaf
Copy link

Kahtaf commented Oct 11, 2017

While testing 0.6.1 this morning, I received the following crash during the course of the navigation (was about half way through the route when it happened). I was not using the navigation UI, and my app wasn't showing any notifications.

FATAL EXCEPTION: main
Process: com.bitspice.automate, PID: 31082
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 609192 bytes
	at android.app.NotificationManager.notifyAsUser(NotificationManager.java:320)
	at android.app.NotificationManager.notify(NotificationManager.java:289)
	at android.app.NotificationManager.notify(NotificationManager.java:273)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationNotification.updateDefaultNotification(NavigationNotification.java:118)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationService.onNewRouteProgress(NavigationService.java:202)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationEngine$1.run(NavigationEngine.java:82)
	at android.os.Handler.handleCallback(Handler.java:789)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6541)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: android.os.TransactionTooLargeException: data parcel size 609192 bytes
	at android.os.BinderProxy.transactNative(Native Method)
	at android.os.BinderProxy.transact(Binder.java:748)
	at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:1247)
	at android.app.NotificationManager.notifyAsUser(NotificationManager.java:317)
	... 12 more

java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 609192 bytes
	at android.app.NotificationManager.notifyAsUser(NotificationManager.java:320)
	at android.app.NotificationManager.notify(NotificationManager.java:289)
	at android.app.NotificationManager.notify(NotificationManager.java:273)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationNotification.updateDefaultNotification(NavigationNotification.java:118)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationService.onNewRouteProgress(NavigationService.java:202)
	at com.mapbox.services.android.navigation.v5.navigation.NavigationEngine$1.run(NavigationEngine.java:82)
	at android.os.Handler.handleCallback(Handler.java:789)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:164)
	at android.app.ActivityThread.main(ActivityThread.java:6541)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: android.os.TransactionTooLargeException: data parcel size 609192 bytes
	at android.os.BinderProxy.transactNative(Native Method)
	at android.os.BinderProxy.transact(Binder.java:748)
	at android.app.INotificationManager$Stub$Proxy.enqueueNotificationWithTag(INotificationManager.java:1247)
	at android.app.NotificationManager.notifyAsUser(NotificationManager.java:317)
	... 12 more
@cammace
Copy link
Contributor

cammace commented Oct 11, 2017

Can you try updating to 0.6.2, we made a few changes that address a few issues in the notification. Also, which Android version are you running?

@cammace cammace added bug Defect to be fixed. navigation-core labels Oct 11, 2017
@Kahtaf
Copy link
Author

Kahtaf commented Oct 12, 2017

It was a Nexus 6P running Oreo. I upgraded to 0.6.2 and drove the same route today, but didn't see that issue. It may be fixed in this version.

However, I started seeing the blue notification that I wasn't seeing in 0.6.1. How do I turn off the notification?

@danesfeder
Copy link
Contributor

danesfeder commented Oct 12, 2017

@Kahtaf We recently reworked the notification to get it working smoothly with Android O in #298. We were using a builder that was deprecated (we now need to provide a notification channel ID). Please keep an eye out for this crash regardless, as we haven't been able to reproduce it.

There is a method to enable / disable the notification in MapboxNavigationOptions https://www.mapbox.com/android-docs/navigation/overview/navigation-options/

@Kahtaf
Copy link
Author

Kahtaf commented Oct 12, 2017

Thanks! I'll report back if this issue happens again.

@danesfeder
Copy link
Contributor

This was re-worked again in #564 @Kahtaf please let us know if you see it again.

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

No branches or pull requests

3 participants