Skip to content

App crashes on Android when calling present() in @stripe/stripe-identity-react-native #206

@venusapps-daxit

Description

@venusapps-daxit

When invoking the present() method from useStripeIdentity on Android, the application crashes immediately. The same implementation works correctly on iOS devices without any issues.
This seems to be an Android-specific crash occurring right when attempting to open the Stripe Identity verification sheet.

const fetchOptions = async (): Promise => {
if (!identityTokenData?.sessionId || !identityTokenData?.ephemeralKeySecret) {
throw new Error("Session ID and ephemeral key secret are required");
}

return {
sessionId: identityTokenData.sessionId,
ephemeralKeySecret: identityTokenData.ephemeralKeySecret,
brandLogo: Image.resolveAssetSource(placeholderLogo),
};
};

const { present } = useStripeIdentity(fetchOptions);

const handleVerification = async () => {
try {
await present(); // ❌ Causes crash on Android
} catch (e) {
console.error("Stripe Identity Error:", e);
} finally {
setIdentityTokenData({
sessionId: null,
ephemeralKeySecret: null,
startVerification: false,
});
loadBackgroundDetail();
}
};

Environment
@stripe/stripe-identity-react-native: ^0.3.5 / ^0.3.8
@stripe/stripe-react-native: ^0.50.3 / ^0.51.1 / ^0.52.0
react-native: 0.80.2
react-native-gesture-handler: ^2.28.0

buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions