Open iboalali opened 10 months ago
Thank's for your report!
Does this happen every time or only sometimes?
We will have a look at in the near future.
Only sometimes for now (a few dozens). Because we just release the new version widely this number will increase.
It did not occur while testing internally, only now with our customers
I see this same error on our app too. There exists a lot of Mapbox issues about this topic. The most mentioned cause is that the navigation view is growing with every update. So long time navigations are crashing with this error, while the notification is too big after (for example) 100 updates.
But I'm still working on a solution on this. But it's very hard to test and reproduce. Feel free to provide a solution to everyone.
I just reduced the complexity of the notification with a custom implementation. It helped a lot, but didn't prevent the crashes. My latest attempt is to wrap it with a try-catch for now, until we find a solution.
try {
notificationManager.notify(NavigationConstants.NAVIGATION_NOTIFICATION_ID, notificationBuilder!!.build())
} catch (e: RuntimeException) {
// to catch two different exceptions, TransactionTooLargeException and
// DeadSystemException (API 24+) re-thrown as Runtime exception
Timber.e(e)
}
Android: 7 - 13 Android API: 24 - 33 Maplibre Navigation SDK version: 2.0.0
Stacktrace
NavigationNotification
implementation.Steps to trigger behavior
Expected behavior
Updating notification without crash
Actual behavior
Crashing while updating notification