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

[BUG] R8 fails because of missing classes after upgrade to 20.34.3 #7569

Closed
AndreasBoehm opened this issue Nov 2, 2023 · 5 comments · Fixed by #7570
Closed

[BUG] R8 fails because of missing classes after upgrade to 20.34.3 #7569

AndreasBoehm opened this issue Nov 2, 2023 · 5 comments · Fixed by #7570
Labels

Comments

@AndreasBoehm
Copy link

Summary

R8 fails because of missing classes after upgrade to 20.34.3

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /bitrise/src/app/build/outputs/mapping/[REDACTED]/missing_rules.txt.
ERROR: R8: Missing class com.stripe.android.financialconnections.FinancialConnectionsSheet$Companion (referenced from: com.stripe.android.payments.financialconnections.DefaultFinancialConnectionsPaymentsProxy com.stripe.android.payments.financialconnections.FinancialConnectionsPaymentsProxy$Companion$create$2.invoke())
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheet$Configuration (referenced from: void com.stripe.android.payments.financialconnections.DefaultFinancialConnectionsPaymentsProxy.present(java.lang.String, java.lang.String, java.lang.String))
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheet (referenced from: com.stripe.android.financialconnections.FinancialConnectionsSheet com.stripe.android.payments.financialconnections.DefaultFinancialConnectionsPaymentsProxy.financialConnectionsSheet and 3 other contexts)
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Canceled (referenced from: java.lang.Object com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel$onConnectionsResult$1.invokeSuspend(java.lang.Object))
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Completed (referenced from: java.lang.Object com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel$onConnectionsResult$1.invokeSuspend(java.lang.Object))
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Failed (referenced from: java.lang.Object com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel$onConnectionsResult$1.invokeSuspend(java.lang.Object))
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheetResult (referenced from: com.stripe.android.financialconnections.FinancialConnectionsSheetResult com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel$onConnectionsResult$1.$result and 6 other contexts)
Missing class com.stripe.android.financialconnections.FinancialConnectionsSheetResultCallback (referenced from: com.stripe.android.payments.financialconnections.DefaultFinancialConnectionsPaymentsProxy com.stripe.android.payments.financialconnections.FinancialConnectionsPaymentsProxy$Companion$create$2.invoke() and 2 other contexts)
Missing class com.stripe.android.financialconnections.R$drawable (referenced from: int com.stripe.android.paymentsheet.paymentdatacollection.ach.TransformToBankIcon$Companion.invoke(java.lang.String))
Missing class com.stripe.android.financialconnections.model.BankAccount (referenced from: com.stripe.android.financialconnections.model.BankAccount com.stripe.android.paymentsheet.paymentdatacollection.ach.USBankAccountFormScreenState$VerifyWithMicrodeposits.paymentAccount and 8 other contexts)
Missing class com.stripe.android.financialconnections.model.FinancialConnectionsAccount (referenced from: com.stripe.android.financialconnections.model.FinancialConnectionsAccount com.stripe.android.paymentsheet.paymentdatacollection.ach.USBankAccountFormScreenState$MandateCollection.paymentAccount and 8 other contexts)
Missing class com.stripe.android.financialconnections.model.FinancialConnectionsSession (referenced from: com.stripe.android.financialconnections.model.FinancialConnectionsSession com.stripe.android.payments.bankaccount.navigation.CollectBankAccountResponse.financialConnectionsSession and 23 other contexts)
Missing class com.stripe.android.financialconnections.model.PaymentAccount (referenced from: void com.stripe.android.paymentsheet.paymentdatacollection.ach.USBankAccountFormViewModel.handleCollectBankAccountResult(com.stripe.android.payments.bankaccount.navigation.CollectBankAccountResultInternal))

Android version

Android 14

Impacted devices

Pixel 7

Installation method

gradle dependency

implementation "com.stripe.payments-core:20.34.3"
implementation "com.stripe.paymentsheet:20.34.3"

Dependency Versions

kotlin: 1.9.10
stripe-android: 20.34.3
Android Gradle Plugin: 8.1.2
Gradle: 8.4

@jaynewstrom-stripe
Copy link
Collaborator

Thanks for raising this @AndreasBoehm

I fixed the issue going forward here: #7570

But you can work around this locally by adding financial connections (implementation 'com.stripe: financial-connections:20.34.3')to your build.gradle (this will enable us bank account as an eligible payment method in PaymentSheet). Or you can add the dontwarn to your proguard rules in your own build (-dontwarn com.stripe.android.financialconnections.**).

@AndreasBoehm
Copy link
Author

Thank you for your quick response and for your help @jaynewstrom-stripe

@AndreasBoehm
Copy link
Author

Hi @jaynewstrom-stripe ,

this issue is still present.

@jaynewstrom-stripe
Copy link
Collaborator

This is my fault. I put the rule in the wrong file. I'll get it updated here, but the work arounds still exist.

@StefMa
Copy link
Contributor

StefMa commented Dec 12, 2023

@jaynewstrom-stripe this issue is still present.
We are using com.stripe:stripe-android:20.35.2 and I still getting

# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheet$Companion
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheet$Configuration
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheet
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Canceled
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Completed
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheetResult$Failed
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheetResult
-dontwarn com.stripe.android.financialconnections.FinancialConnectionsSheetResultCallback
-dontwarn com.stripe.android.financialconnections.R$drawable
-dontwarn com.stripe.android.financialconnections.model.BankAccount
-dontwarn com.stripe.android.financialconnections.model.FinancialConnectionsAccount
-dontwarn com.stripe.android.financialconnections.model.FinancialConnectionsSession
-dontwarn com.stripe.android.financialconnections.model.PaymentAccount

The problem is the location of the *.txt file 😅
It has to be top-level of the module. Not in module/src. I will create a PR in a minute...
See also
Screenshot 2023-12-12 at 12 04 44 PM
(taken from https://github.com/search?q=repo%3Astripe%2Fstripe-android%20consumer-rules.txt&type=code)

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

Successfully merging a pull request may close this issue.

3 participants