-
Notifications
You must be signed in to change notification settings - Fork 36
TransactionTooLargeException when persisting in-app messages #638
Description
We're seeing dramatic spikes in crashes caused by TransactionTooLargeExceptions when attempting to save activity state while this SDK is displaying an in-app message.
Fatal Exception: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 579324 bytes
at android.app.OurActivity$StopInfo.run(PendingTransactionActions.java:160)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:215)
at android.app.ActivityThread.main(ActivityThread.java:6939)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
It took a long time to identify the Iterable SDK as the cause because the exception is reported from the Android framework with no useful attribution hints. However we're now confident that the root cause was that we launched some Iterable campaigns which sent in-app messages with abnormally large HTML (>250kb), since turning them off has resulted in a dramatic reduction in crash reports.
We've now spent time going through our Iterable campaigns to ensure that all in-app HTML is a reasonable size (<100kb), but I wanted to suggest some further safeguards you could follow-up with:
- Stop persisting the HTML upon activity destruction (it's not clear to me where this is happening, though
IterableWebViewthroughIterableInAppFragmentHTMLNotificationseems a likely culprit) - Including a tool in the Iterable web console that warns against in-app messages with HTML above a reasonable size (say 100kb)