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] Regarding Proguard #9151

Closed
omertanveer opened this issue Aug 29, 2024 · 2 comments
Closed

[BUG] Regarding Proguard #9151

omertanveer opened this issue Aug 29, 2024 · 2 comments
Labels

Comments

@omertanveer
Copy link

omertanveer commented Aug 29, 2024

Hi,

Locally the debug build with stripe integration with flow controller is working fine. But when making a beta build for which we are using proguard, I end up with a crash:

Fatal Exception: n40.p0
Function 'loadPaymentOption' (JVM signature: loadPaymentOption$paymentsheet_release(Lcom/stripe/android/paymentsheet/model/PaymentOption;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;) not resolved in class com.stripe.android.paymentsheet.model.PaymentOptionFactory: internal final suspend fun loadPaymentOption(paymentOption: com.stripe.android.paymentsheet.model.PaymentOption): android.graphics.drawable.Drawable defined in com.stripe.android.paymentsheet.model.PaymentOptionFactory | loadPaymentOption$paymentsheet_release(Lcom/stripe/android/paymentsheet/model/PaymentOption;Lu30/d;)Ljava/lang/Object;

z30.x$c.invoke (KFunctionImpl.kt:316)
z30.r0$a.invoke (ReflectProperties.java:19)
z30.x.C (KFunctionImpl.kt:8)
z30.x.toString (KFunctionImpl.kt:3)
kotlin.jvm.internal.j.toString (FunctionReference.java:7)

java.lang.StringBuilder.append (StringBuilder.java:179)
com.stripe.android.paymentsheet.model.PaymentOption.toString (PaymentOption.kt:45)
java.lang.String.valueOf (String.java:4092)

java.lang.StringBuilder.append (StringBuilder.java:179)
bt.j0.onPaymentOption (R8$$SyntheticClass:17)
com.stripe.android.paymentsheet.flowcontroller.DefaultFlowController.onPaymentOptionResult$paymentsheet_release (DefaultFlowController.kt:94)
com.stripe.android.paymentsheet.flowcontroller.DefaultFlowController$1.onActivityResult (DefaultFlowController.kt:1)
com.stripe.android.paymentsheet.flowcontroller.DefaultFlowController$1.onActivityResult (DefaultFlowController.kt:2)
g.f.b (ActivityResultRegistry.kt:49)
androidx.activity.ComponentActivity.onActivityResult (ComponentActivity.kt:3)

androidx.fragment.app.FragmentActivity.onActivityResult (FragmentActivity.java:6)

Can someone please help with anything that can be added to proguard to avoid this crash from happening?

@omertanveer
Copy link
Author

Had to add this to proguard rules for now to prevent crash:
-keep class kotlin.Metadata {*;}
-keep class kotlin.coroutines.Continuation

@jaynewstrom-stripe
Copy link
Collaborator

Sounds like you were able to solve the issue. Please reopen if you have other questions.

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

No branches or pull requests

2 participants