-
Notifications
You must be signed in to change notification settings - Fork 371
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
[Bug]: SDK Crashes on release/app bundle build when not all onesignal modules are included: Service interface i6.a could not be instantiated #1969
Comments
@CarlBarks thank you for the detailed reproduction steps! We're looking into this more and will get back to you as soon as possible. |
Also experiencing this when building a release build with R8 enabled. |
@CarlBarks I noticed you said you are using 5.1.1 but the gradle files you shared all show 5.0.0. Can you confirm which version of OneSignal you are using? @sebastinto are you still seeing crashes due to missing classes only when R8 is enabled? These missing class issues due to minification should have been fixed in 5.0.1 in this PR: |
@jkasten2 I am unfortunately. Using Release 5.1.15. The error I'm getting:
Using these rules fixes the issue (which isn't surprising since this preserves every OneSignal class):
|
@sebastinto Thanks for the details, I was able to reproduce as well now, but only if |
@jkasten2 Interesting! The project I tested on is using AGP 8.5.0 (it also explicitly declares |
Hey @jkasten2 , as @sebastinto mentioned, we also experienced this in higher versions of OneSignal, despite my log being from an earlier one. |
Quick update, PR #2136 has been merged into main to address this issue. It will be included in the next release. I'll reply again once released and close this issue then. |
Fix is now available in release 5.1.16. |
What happened?
The application crashes on startup with the following error. It happens only on release/app bundle builds with proguard enabled and works as expected on debug builds.
OneSignal SDK Version is at
5.1.1
but also happens on5.1.0
.Similar issues that were studied are #1810 and #1857 but no proguard rules helped fix the issue.
OneSignal is initiated as
OneSignal.initWithContext(this, one_signal_app_id)
Steps to reproduce?
Include only the partial onesignal module dependencies
Build a release build / app bundle with proguard enabled
Application crashes with error
Service interface i6.a could not be instantiated
App works as expected in debug mode
Error disappears when all module dependencies are included
or the full sdk package
What did you expect to happen?
As explained in the Migration Guide and since the modules
In App
andLocation
are not used by the app, I expected that a partial declaration of dependencies would be sufficient.The issue resolves after depending on the whole OneSIgnal SDK, so I suspect something related to proguard rules or internal dependencies of the modules causes the inability to depend on the partial sdk.
OneSignal Android SDK version
5.1.1
Android version
13
Specific Android models
No response
Relevant log output
Two warnings before the crash helped pinpoint the issue to the missing modules:
Code of Conduct
The text was updated successfully, but these errors were encountered: