-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Summary
On Android old architecture, @stripe/stripe-react-native@0.59.2 exports SYSTEM_INFO from StripeSdkModule.kt, but old-arch NativeStripeSdkModuleSpec.java does not declare it as an optional constant.
This appears to trigger React Native's debug/internal constant validation in getConstants().
Affected version
@stripe/stripe-react-native:0.59.2(latest as of 2026-03-10)
Relevant source lines
- Exports
SYSTEM_INFO:android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt(contains"SYSTEM_INFO"ingetTypedExportedConstants())- https://github.com/stripe/stripe-react-native/blob/v0.59.2/android/src/main/java/com/reactnativestripesdk/StripeSdkModule.kt#L204
- Old-arch spec optional constants are empty:
android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java- https://github.com/stripe/stripe-react-native/blob/v0.59.2/android/src/oldarch/java/com/reactnativestripesdk/NativeStripeSdkModuleSpec.java#L147
- TS spec also includes
SYSTEM_INFO:
Observed behavior
In Android debug/internal runs (old arch), app startup can fail when RN validates constants because SYSTEM_INFO is present in exported constants but undeclared in old-arch Flow constants.
Expected behavior
Old-arch spec should accept SYSTEM_INFO as optional (or otherwise be regenerated to match exported constants).
Temporary workaround
Patching old-arch spec locally works:
Set<String> optionalFlowConstants = new HashSet<>(Arrays.asList(
"SYSTEM_INFO"
));Suggested fix
Include SYSTEM_INFO in old-arch optional constants (or regenerate old-arch codegen/spec so it matches current exported constants).