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 with R8 full mode enabled #1052

Closed
dnaka91 opened this issue Apr 17, 2022 · 2 comments
Closed

Crash with R8 full mode enabled #1052

dnaka91 opened this issue Apr 17, 2022 · 2 comments

Comments

@dnaka91
Copy link

dnaka91 commented Apr 17, 2022

Describe the bug
When enabling the full mode of R8, I directly get a crash when starting the app.

After some debugging, I found out that the problem is a reflection access through StubCreator. With full mode enabled, it modifies the ErrorReporter interface and turns it into something else (not important into what I guess, just not an interface anymore).

Expected behavior
The call should not fail.

Version

  • Android: 12 (32)
  • ACRA: 5.9.1

Possible solution
I got my app working again, by adding a rule to keep the ErrorReporter interface. Probably this should be added to the ProGuard rules, bundled with the acra releases.

-keep interface org.acra.ErrorReporter
@F43nd1r
Copy link
Member

F43nd1r commented Apr 17, 2022

I don't see any crashes in a test app, even with full mode enabled. Do you have a reproducer?

@dnaka91
Copy link
Author

dnaka91 commented Apr 18, 2022

Could reproduce it very easily in a sample app:

  • Created a new project with Android Studio Canary with Jetpack Compose + Material3.
  • Added ACRA and called initAcra {} (without any further configuration).
  • Enable R8's full mode.

Uploaded it here for reference: https://github.com/dnaka91/acracrash

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