stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.25k stars 637 forks source link

Fatal Exception: java.lang.NoSuchMethodError No static method performImeAction$default [CRASH] #8599

Closed afsalkodasseri closed 2 months ago

afsalkodasseri commented 2 months ago

Summary

App is crashing due to the paymentSheet Dialog crash. Using the latest version of stripe library (com.stripe:stripe-android:20.44.2)

Crash is happening only for the users who turned on the Accessibility Menu in their phone. We can bypass this crash when disable the Accessibility Menu.

Crash Log

Fatal Exception: java.lang.NoSuchMethodError
No static method performImeAction$default(Landroidx/compose/ui/semantics/SemanticsPropertyReceiver;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V in class Landroidx/compose/ui/semantics/SemanticsPropertiesKt; or its super classes (declaration of 'androidx.compose.ui.semantics.SemanticsPropertiesKt' appears in /data/app/~~LTnzjRb8zEMz4rcWeoaVBA==/com.conzumex.musewatch-X1L2hSXv2URfjAC_KA4StQ==/base.apk)
keyboard_arrow_up
arrow_right
androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$semanticsModifier$1.invoke (CoreTextField.kt:532)

Android version

All version getting the same

Impacted devices

All devices with Accessibility Menu turned on

Dependency Versions

com.stripe:stripe-android:20.44.2

afsalkodasseri commented 2 months ago

WhatsApp Image 2024-06-06 at 7 06 12 PM (1)

hint : Accessibility Menu is replacing the IME button in the navigation bar

samer-stripe commented 2 months ago

Hey @afsalkodasseri! Are you using Jetpack Compose in your project? If so, what version?

afsalkodasseri commented 2 months ago

no i am not using jetpack compose. my whole project is in java and i am using some 3 kotlin files. but no compose elements

samer-stripe commented 2 months ago

Are you using Lifecycle 2.8? Can you try upgrading to 2.8.2 and see if that fixes the issue. Lifecycle 2.8 forcibly upgrades our Compose usage to 1.7 which isn't stable yet.

muazdev26 commented 2 months ago

I have decreased the lifecycle version to 2.7.0 and the crash is not happening on my side.

afsalkodasseri commented 2 months ago

@samer-stripe i have used these..these are the latest versions till june 12th.

`implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.1'

implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.1'`

I will try after update it to 2.8.2.

Which one you prefer ? 2.8.2 or any older stable version ?

samer-stripe commented 2 months ago

@afsalkodasseri Either 2.8.2 or 2.7.0 should be fine.

afsalkodasseri commented 2 months ago

2.8.2 giving the same crash. but it works when i downgraded to 2.7.0. If you are not able to fix the crash from your library, please mention this case as a warning in your documentations. Everyone will use the latest libraries in their app. Recently i have upgraded to latest one. And also new developers will face this issue defenitely.

NB: it is not happening for all users, only for the users have already enabled the Accessibility Menu in their phone. But unfortunately most of the samsung and Google pixel devices turned on this by default i guess. our customers from these devices facing this issue mostly. I am not sure they turned on this settings by default.

It will good if you look into this issue.

Thanks for your replies 😊

afsalkodasseri commented 2 months ago

Fixed when downgraded the lifecycle version to 2.7.1

scruffyfox commented 1 month ago

Downgrading a depedency isnt a fix. This issue shouldn't be closed.

scruffyfox commented 4 days ago

@samer-stripe has there been any movement/fix on this?