stripe-react-native
stripe-react-native copied to clipboard
Android Release mode crash when calling initPaymentSheet
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Build on Android Release Mode
- Call the function
initPaymentSheet - It should crashes the app
Expected behavior App should not crash
Smartphone (please complete the following information):
- Device: Samsung Galaxy A13
- OS: Android 14
Additional context
- I have a bare react-native app (some expo libraries are used).
- iOS is perfectly fine.
- Android works well in debug build on a real device, but crashes in release mode.
- I am using:
react-native: "0.79.2"
@stripe/stripe-react-native: "0.46.0"
I also tried with @stripe/stripe-react-native: "0.45.0", same crash
I could circumvent the issue by using @stripe/stripe-react-native: "0.43.0" ✅
- I see this error when using logcat:
android Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
@PierreCapo can you provide the full stack track and the compose version you are using?
@PierreCapo can you also provide your kotlin version
@tjclawson-stripe kotlinVersion used is "2.0.21".
@porter-stripe excuse-me I don't understand your question:
- Given I am using react-native, I haven't registered anywhere in my project any jetpack compose version (I am not super used to Android native dev, so let me know if I am missing something):
This is my android/build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.1.12297006"
kotlinVersion = "2.0.21"
}
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com' } // required by react-native-image-crop-picker
maven { url "https://www.jitpack.io" } // required by react-native-image-crop-picker
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
// -- Required by Firebase: https://rnfirebase.io/#configure-firebase-with-android-credentials
classpath ("com.google.gms:google-services:4.3.15")
// -- Required by Crashlytics
classpath ("com.google.firebase:firebase-crashlytics-gradle:2.9.9")
}
}
apply plugin: "com.facebook.react.rootproject"
- For the full stack track, given I used logcat to get the error message on my Release app, I just had this error line and nothing more.
I’m also seeing this crash in our Expo/React Native app when using stripe-react-native 0.45.0 or 0.46.0 in a production (Hermes+TurboModules) build. Downgrading to 0.43.0 immediately fixes it.
Environment: stripe-react-native: 0.45.0 → 0.46.0 (crashes), 0.43.0 (works)
Expo SDK: 53.0.17 React Native: 0.79.5 Android OS: 11 (Moto E20, arm) Hermes engine: enabled New Architecture (TurboModules/JSI): enabled
Reproduction steps
Build a release APK with npx expo prebuild && ./gradlew assembleRelease
Install on device via adb install -r app-release.apk
Observe immediate SIGABRT in the mqt_v_js thread
F libc : Fatal signal 6 (SIGABRT) …
Abort message: 'JNI ERROR (app bug): attempt to use stale Local 0x1 (should be 0x5)'
…
#12 libreactnative.so facebook::react::NativeStripeSdkModuleSpecJSI::NativeStripeSdkModuleSpecJSI(...)