> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Fix installation, build and native setup issues with the Primer Checkout React Native SDK.

> [!WARNING]
>
> Primer Checkout React Native SDK is currently in **beta** (v3.0.0-beta.1).
> The API is subject to change before the stable release.

This page covers installing, building and setting up the SDK. For problems while the checkout runs, such as a checkout that never becomes ready, see [Troubleshooting for React Native](https://primer.io/docs/checkout/primer-checkout/troubleshooting-react-native.md).

## 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**:

1. On iOS, run `pod install` in your app's `ios` folder.
2. Rebuild and reinstall the app on each platform. Reloading the JavaScript bundle doesn't add native code.

```bash theme={"dark"}
cd ios && pod install && cd ..
npx react-native run-ios
npx react-native run-android
```

### `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:

```bash theme={"dark"}
cd ios && pod install --repo-update
```

See [Installation](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/installation.md) for the versions this release uses.

### 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 add `io.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](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/guides/native-setup.md#android).

## 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.

| Problem | Platform | Fix |
| - | - | - |
| Klarna isn't listed, or fails with the message `PrimerKlarnaSDK missing` | iOS | Add the `PrimerKlarnaSDK` pod and run `pod install`. |
| Message `PrimerStripeSDK missing` | iOS | Add the `PrimerStripeSDK` pod and run `pod install`. |
| `klarna-return-url-missing` | Android | Set `paymentMethodOptions.klarnaOptions.returnIntentUrl` and add an activity that handles that URL. |
| Message that contains `Unsupported activity type` | Android | Stripe ACH needs the activity that hosts React Native to extend `androidx.activity.ComponentActivity`. |
| `stripe-ach-mandate-config` | Both | Set `paymentMethodOptions.stripeOptions.mandateData` with `merchantName` or `fullMandateText`. |

For each setup step, see [Native setup](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/guides/native-setup.md).

### 3DS challenge not completing

**Problem**: A payment gets stuck during 3D Secure authentication.

**Solution**: The native SDK runs the challenge. Check that `Primer3DS` is installed on iOS and `io.primer:3ds-android` on Android, as shown in [Native setup](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/guides/native-setup.md#3d-secure). 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:

1. The `@primer-io/react-native` version from your `package.json`, and the platform and OS version.
2. The error's `errorId` and `description`.
3. The error's `diagnosticsId`, when it's set.

> [!WARNING]
>
> Never include card numbers, expiry dates or security codes in logs, screenshots or support requests.

## See also

> [card] [Installation](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/installation.md)
>
> Install the package and the iOS pods

> [card] [Native setup](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/guides/native-setup.md)
>
> URL schemes, wallets and optional native dependencies

> [card] [Runtime troubleshooting](https://primer.io/docs/checkout/primer-checkout/troubleshooting-react-native.md)
>
> Problems while the checkout runs

> [card] [PrimerError](https://primer.io/docs/sdk/react-native-checkout/v3.0.0-beta/api/common/primer-error.md)
>
> Error fields and the error IDs the SDK raises


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.