Installation issues
Importing the package fails with “‘NativePrimer’ could not be found”
Problem: The app throws as soon as it imports@primer-io/react-native, with an error that 'NativePrimer' could not be found.
Cause: The app binary doesn’t contain the SDK’s native code. The package loads its native module on import, so the error appears before any checkout code runs.
Solution:
- On iOS, run
pod installin your app’siosfolder. - Rebuild and reinstall the app on each platform. Reloading the JavaScript bundle doesn’t add native code.
pod install fails on PrimerSDK
Problem: pod install reports a version conflict on PrimerSDK, or can’t find the PrimerSDK version the package needs.
Solution: The package’s .podspec file pins an exact PrimerSDK version. Remove any pod 'PrimerSDK' line with another version from your Podfile, for example one left over from a 2.x integration. If CocoaPods can’t find the pinned version, update your local spec repository:
Android build fails with Unresolved reference errors
Problem: The Android build fails while compiling the SDK’s native module, with Unresolved reference errors on Primer classes.
Cause: The package needs io.primer:android, io.primer:components-analytics and io.primer:components-bridge at the one version it pins. If your app adds one of them or forces another version, the three no longer match.
Solution: Remove these artifacts from your app’s build.gradle and any dependency resolution rule that changes their version. The package brings them.
Gradle can’t resolve Klarna’s Android SDK
Problem: After you addio.primer:klarna-android, Gradle can’t resolve Klarna’s dependencies.
Solution: Klarna’s Android SDK is served from Klarna’s own Maven repository. Add it to the repositories block in android/app/build.gradle, as shown in Native setup.
Native setup issues
These problems appear in the payment method list or when a payment method starts, but the fix is in your native project or your settings.
For each setup step, see Native setup.
3DS challenge not completing
Problem: A payment gets stuck during 3D Secure authentication. Solution: The native SDK runs the challenge. Check thatPrimer3DS is installed on iOS and io.primer:3ds-android on Android, as shown in Native setup. The 3D Secure SDK’s security checks fail on debug builds and emulators: during development, turn them off with debugOptions: { is3DSSanityCheckEnabled: false }, and never ship that setting. Keep PrimerCheckoutProvider mounted while the challenge is on screen. Unmounting it removes its listeners, so your app no longer receives the payment’s result. A challenge that fails arrives like any other failed payment: in onError and as a paymentOutcome with status: 'error'.
Getting help
If your issue isn’t covered here, contact Primer support and include:- The
@primer-io/react-nativeversion from yourpackage.json, and the platform and OS version. - The error’s
errorIdanddescription. - The error’s
diagnosticsId, when it’s set.
See also
Installation
Install the package and the iOS pods
Native setup
URL schemes, wallets and optional native dependencies
Runtime troubleshooting
Problems while the checkout runs
PrimerError
Error fields and the error IDs the SDK raises