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

TransactionTooLargeException when sending large log using mail #601

Closed
serpent7776 opened this issue Oct 23, 2017 · 4 comments
Closed

TransactionTooLargeException when sending large log using mail #601

serpent7776 opened this issue Oct 23, 2017 · 4 comments

Comments

@serpent7776
Copy link

I got android.os.TransactionTooLargeException when trying to send exception generated by anr-watchdog via email.

10-23 13:14:14.423 D/ActivityManager( 2619):  Launching com.google.android.gm, updated priority
10-23 13:14:14.433 E/JavaBinder( 2619): !!! FAILED BINDER TRANSACTION !!!  (parcel size = 585292)
10-23 13:14:14.433 W/ActivityManager( 2619): Exception in new application when starting activity com.google.android.gm/.ComposeActivityGmailExternal
10-23 13:14:14.433 W/ActivityManager( 2619): android.os.TransactionTooLargeException: data parcel size 585292 bytes
10-23 13:14:14.433 W/ActivityManager( 2619): 	at android.os.BinderProxy.transactNative(Native Method)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at android.os.BinderProxy.transact(Binder.java:503)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at android.app.ApplicationThreadProxy.scheduleLaunchActivity(ApplicationThreadNative.java:1101)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at com.android.server.am.ActivityStackSupervisor.realStartActivityLocked(ActivityStackSupervisor.java:2549)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at com.android.server.am.ActivityStackSupervisor.attachApplicationLocked(ActivityStackSupervisor.java:1346)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at com.android.server.am.ActivityManagerService.attachApplicationLocked(ActivityManagerService.java:9946)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at com.android.server.am.ActivityManagerService.attachApplication(ActivityManagerService.java:10033)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:519)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:4187)
10-23 13:14:14.433 W/ActivityManager( 2619): 	at android.os.Binder.execTransact(Binder.java:453)
10-23 13:14:14.433 I/ActivityManager( 2619): Killing 16374:com.google.android.gm/u0a98 (adj 0): error during init

I'm using dialog mode and dialog is displayed successfully, but when clicked 'OK' to send report gmail is killed and report cannot be sent.
This is due to large exception stack trace generated by anr-watchdog (585292 bytes).
This is highly unlikely in normal circumstances, but can anything be done to handle this situation?

@F43nd1r
Copy link
Member

F43nd1r commented Oct 23, 2017

Try with reportAsFile=true

@serpent7776
Copy link
Author

Thanks, that works just fine.
One thing is that the file is encoded as JSON, which is not very readable. It would be cool to be able to send the data using some easier to read format.

@F43nd1r
Copy link
Member

F43nd1r commented Nov 14, 2017

For ACRA 5.0.0, this is now possible. Example usage:

build.gradle:

dependencies {
    compile 'com.faendir.acra:acra-mail:5.0.0-alpha14'
    compile 'com.faendir.acra:acra-dialog:5.0.0-alpha14'
}

MyApplication.java:

//reportFormat is used by all senders, including mailsender
@AcraCore(reportFormat = StringFormat.KEY_VALUE_LIST)
@AcraMailSender(mailTo = "***")
@AcraDialog(
        resText = R.string.crash_dialog_text,
        resTheme = R.style.Theme_AppCompat_Light_Dialog)

@serpent7776
Copy link
Author

Awesome, thanks!

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

No branches or pull requests

2 participants