-
Notifications
You must be signed in to change notification settings - Fork 370
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]: consumer-proguard-rules.pro - Out of date for version 5.0.0 #1810
Comments
see also my coment here #1779 (comment) |
Hello @michael-winkler thank you for reaching out! We'll look into this and get back to you as soon as possible. |
Any news? @jennantilla |
I tried to convert the rules by myself.
I dont know the new correct lines for these:
And here is the rest which i converted:
|
Maybe this line is needed to:
|
I am getting the following error even though I have defined all the proguard rules. Also i see on firebase crashlytics. |
|
@Petr-Kubista Please provide more details that OneSignal can find the bug. |
It would be great if we also can see a new file like this https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/consumer-proguard-rules.pro which contains all new rules. |
@michael-winkler the situation is described in a related issue: |
@Petr-Kubista Which class is it not able to find? I am no longer able to reproduce the issue on 5.0.1 |
@emawby I think @Petr-Kubista means this one: |
I am not able to reproduce that problem on 5.0.1. Does your app have any custom proguard rules set? |
I can verify that the issue still happens on 5.0.1 using the included consuer-proguard rules. |
@jdonlan can you clarify what you mean by "included consumer-proguard rules". Do you have custom rules that are running? Are you getting this error or something else?
|
I'm using these rules: https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/consumer-proguard-rules.pro provided in your repo.
|
With 5.0.1 and the above proguard rules, I can init OneSignal and even show an In-App notification, but then get this crash shortly after. |
@jdonlan This looks like a separate issue with an InAppMessage crashing when trying to be displayed. Could you kindly create a separate issue on the repository for this problem? |
It isn't though, as this ticket is concerning proguard rules and this issue only occurs after minification. |
Oh I see ok I am able to successfully display InAppMessages in my testing as well. I don't believe that you should need to add those proguard rules to your app yourself since the relevant rules are already included in 5.0.1 of the SDK. Are you able to get the same issue on a blank app with just a OneSignal integration? |
I have been able to confirm functionality in 5.0.1 and that it no longer crashes related to proguard. I'll open a separate ticket with the above, as I get the same crash without custom proguard rules on debug builds now. |
@emawby Why are the rules below not added for the new proguard rules?
Do we really not longer need them? And what is with the rest of rules? Not all old rules are added to new rules that. But why? |
@emawby For me it's still not working on OneSignal 5.0.1:
This is happening during |
@Petr-Kubista If possible could you share your code that initializes/sets up OneSignal. I would like to reproduce the crash to figure out exactly which service interface is missing. |
@emawby I have this function being called in
|
@Petr-Kubista I am still not able to reproduce unfortunately. Just to confirm is this still only happening for release builds? If you enable minify in your debug config do you still get the issue? If possible could you enable verbose logging that might help identify which service is not being found |
@emawby I am really sorry, it must have been another build clogging up the LogCat for me, I had another app with a different build variant installed and I missed the package name in the logs (it's very similar) and that one had the 5.0.0 version of OneSignal in it. So please disregard, I can't reproduce the error either. |
@Petr-Kubista Thank you for investigating! Closing as fixed in 5.0.1 |
@emawby Why no answer for my question here? Edit: Found it by myself here: |
I was getting the same error mentioned in #1811, adding these two lines to my project's
|
@theonetheycallneo that's a different error, see #1857 |
btw this is still not fixed in version 5.0.4. no idea how you can close as fixed... |
What happened?
Out of date for version 5.0.0
https://github.com/OneSignal/OneSignal-Android-SDK/blob/main/OneSignalSDK/onesignal/consumer-proguard-rules.pro
We regret to inform you that the current Consumer ProGuard rules included in your project for OneSignal version 5.0.0 are no longer up to date. This is due to recent changes in class and method names within the OneSignal SDK.
To ensure the smooth functioning and proper optimization of your application, it's imperative to update the ProGuard rules in accordance with the latest version of OneSignal. Failing to do so might lead to unexpected behavior, decreased performance, or even app crashes.
Steps to reproduce?
-
What did you expect to happen?
Updated proguard rules for OneSignal version 5.0.0
OneSignal Android SDK version
5.0.0
Android version
13, 12, 11, 10, 9, 8, 7.1, 7.0, 6, 5.1, 5.0, 4.4, 4.3 or below
Specific Android models
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: