TransactionTooLargeException with AutofillManager

781 views Asked by At

I just got a strange stacktrace from a user:

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=42, result=-1, data=Intent { dat=content://com.android.providers.media.documents/document/image:87 flg=0x43 }} to activity {org.walleth/org.walleth.activities.ImportActivity}: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 3483676 bytes
at android.app.ActivityThread.deliverResults(ActivityThread.java:4436)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4479)
at android.app.ActivityThread.-wrap19(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1672)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6759)
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:770)
Caused by: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 3483676 bytes
at android.view.autofill.AutofillManager.updateSessionLocked(AutofillManager.java:904)
at android.view.autofill.AutofillManager.notifyValueChanged(AutofillManager.java:649)
at android.widget.TextView.notifyAutoFillManagerAfterTextChangedIfNeeded(TextView.java:9657)
at android.widget.TextView.sendAfterTextChanged(TextView.java:9641)
at android.widget.TextView.setText(TextView.java:5651)
at android.widget.TextView.setText(TextView.java:5498)
at android.widget.EditText.setText(EditText.java:113)
at android.widget.TextView.setText(TextView.java:5435)
at org.walleth.activities.ImportActivity.onActivityResult(ImportActivity.kt:192)
at android.app.Activity.dispatchActivityResult(Activity.java:7240)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4432)
... 9 more
Caused by: android.os.TransactionTooLargeException: data parcel size 3483676 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:766)
at android.view.autofill.IAutoFillManager$Stub$Proxy.updateSession(IAutoFillManager.java:468)
at android.view.autofill.AutofillManager.updateSessionLocked(AutofillManager.java:899)

Anyone else experienced this bug and perhaps found a good workaround? The only idea I have currently is to disable autofill for this textview.

1

There are 1 answers

0
Maniya Joe On

These could be the possible areas where you might encounter this issue.

  1. While deserializing huge data sent through intent.
  2. receiving bitmap files from service
  3. Receiving huge bytes from server response which you are trying to map to model class.

Possible solutions:

  1. send data in small chunks.
  2. try to compress the data before transfering through service or through intents and then decompress it back to original type.

Don't know if this clarifies your problem, but as per my understanding these could be the possibilities.