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

Missing consumer rules on 6.4.4 #5359

Closed
matteinn opened this issue Aug 16, 2024 · 4 comments
Closed

Missing consumer rules on 6.4.4 #5359

matteinn opened this issue Aug 16, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@matteinn
Copy link
Contributor

matteinn commented Aug 16, 2024

Describe the bug

I recently bumped the SDK version from 6.3.2 to the latest 6.4.4 and started getting R8 errors.

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/vagrant/git/androidApp/build/outputs/mapping/prodRelease/missing_rules.txt.
ERROR: R8: Missing class io.getstream.chat.android.previewdata.PreviewMessageData (referenced from: void io.getstream.chat.android.compose.ui.components.reactionpicker.ComposableSingletons$ReactionsPickerKt$lambda-2$1.invoke(androidx.compose.runtime.Composer, int))
Missing class io.getstream.chat.android.previewdata.PreviewUserData (referenced from: io.getstream.chat.android.compose.state.userreactions.UserReactionItemState io.getstream.chat.android.compose.previewdata.PreviewUserReactionData.user1Reaction(androidx.compose.runtime.Composer, int) and 3 other contexts)

This is the suggested workaround but it's not working, furthermore I can't see that code when browsing the dependencies used by my app:

# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn io.getstream.chat.android.previewdata.PreviewMessageData
-dontwarn io.getstream.chat.android.previewdata.PreviewUserData

Can you please advise on what to do?

You have the same issue reported by your CI, please don't ignore it.

SDK version

    implementation("io.getstream:stream-chat-android-state:6.4.4")
    implementation("io.getstream:stream-chat-android-offline:6.4.4")
    implementation("io.getstream:stream-chat-android-compose:6.4.4")
    implementation("io.getstream:stream-android-push-firebase:1.1.8")

To Reproduce
Steps to reproduce the behavior:

  1. Run the app with R8 enabled

Expected behavior
App is successfully built

Device:

  • Vendor and model: doesn't matter
  • Android version: doesn't matter

Screenshots
None

@matteinn matteinn added the bug Something isn't working label Aug 16, 2024
@JcMinarro
Copy link
Member

Hello @matteinn
Thang to report it.
We already fixed it here and will be ready on the next release.
In the meantime you can try by adding:

## Stream Chat Android PreviewData Proguard Rules
-keep class io.getstream.chat.android.previewdata.** { *; }

@matteinn
Copy link
Contributor Author

Thank you!
Unfortunately that's not working, and at this point I'm not sure it will work with the new release too 🧐
The weird thing is that the previewdata module is not showing up in the External Libraries section of Android Studio, that might be the reason why that rule added to my app isn't changing anything.

@JcMinarro
Copy link
Member

I think it can be explained by this
@skydoves could you check if we need anything else to fix R8/Proguard issues related to the preview data artifact??

@matteinn
Copy link
Contributor Author

matteinn commented Sep 6, 2024

This is fixed in 6.5.0

@matteinn matteinn closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants