---
title: "Troubleshooting"
description: "Troubleshoot and resolve common issues with the Capacitor SDK."
url: https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting/
---

# Troubleshooting for Capacitor

## [Source Maps Not Linked When Using Live Reload](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#source-maps-not-linked-when-using-live-reload)

When you run your app with live reload (for example, `ionic cap run android -l` or `npx cap run ios -l`), the app loads files from your local dev server instead of the production build in your `www` folder. Stack traces from events captured during a live reload session reference the dev server's URLs, such as `http://192.168.x.x:8100/vendor.js`, which don't match the source maps generated from your production build.

Because of this mismatch, source maps won't apply to events captured over live reload, and you may see an error like this when validating a release with `sentry-cli`:

```bash
Uploaded artifacts do not include entry: ~/vendor.js
```

To verify that your source maps are set up correctly, test against a production build instead of a live reload session:

```bash
ionic build --configuration=production
npx cap sync
```

Then run the production build on your device or emulator and upload source maps from your `www` build output as usual.

## [Replay only shows a white Empty page](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#replay-only-shows-a-white-empty-page)

Session Replay does not work correctly with `@ionic/angular`, `@ionic/vue`, or `@ionic/react` version `8.7.1` or newer. Pin these packages to version `8.7.0` to capture session replays.

## [Support 16 KB Page Sizes on Android](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#support-16-kb-page-sizes-on-android)

Starting with Android 15, AOSP supports devices with a 16 KB page size. If your app uses NDK libraries (directly or via an SDK), you'll need to rebuild it for compatibility with these devices.

Update to Sentry Capacitor SDK version `1.5.0` and above order to support 16 KB page sizes on Android devices.

Please read the [Android developer documentation](https://developer.android.com/guide/practices/page-sizes) to update and test your app with 16 KB page size support.

## [Different Versions for Sibling SDKs](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#different-versions-for-sibling-sdks)

If you see the following error during build time, the sibling SDKs installed in your app have mismatched versions:

```javascript
  node_modules/@sentry/types/types/globals.d.ts:2:11 - error TS2451: Cannot redeclare block-scoped variable '__DEBUG_BUILD__'.
```

To avoid any issues when installing packages or using the code on another machine, you must use the same version of Sentry Capacitor and @Sentry/Angular (or any other sibling SDK) that is referenced by the peer dependency of Sentry Capacitor in your app.

Correct:

```xml
    "@sentry/angular": "7.13.0",
    "@sentry/capacitor": "0.10.1"
```

Incorrect:

```xml
    "@sentry/angular": "^7.13.0",
    "@sentry/capacitor": "^0.10.1"
```

You can check which version of the sibling SDK is installed using the following command: `npm info @sentry/capacitor peerDependencies`.

## [Capacitor 2 on iOS](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#capacitor-2-on-ios)

Capacitor 3 has a minimum requirement of iOS 12.0. As a result, the Sentry SDK needs to match this requirement to support Capacitor 3. Users on older versions may run into an error similar to:

> Specs satisfying the SentryCapacitor (from ../../node\_modules/@sentry/capacitor) dependency were found, but they required a higher minimum deployment target.

You can fix this by bumping your iOS deployment target. Add the snippet below to your `capacitor.config.json`:

```json
// capacitor.config.json
{
  "ios": {
    "minVersion": "12.0"
  }
}
```

Then update your iOS settings:

```bash
npx cap sync
```

## [Capacitor on Android](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#capacitor-on-android)

### [No events sent](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#no-events-sent)

Check if you added `SentryCapacitor` to the bridge. This step is required for Capacitor 2 and optional on Capacitor 3. (It's only required if you are initializing other plugins using the old method. If so, we recommend you use `registerPlugin` instead of the deprecated code for initializing plugins.)

```java
import io.sentry.capacitor.SentryCapacitor;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Capacitor 3
    registerPlugin(SentryCapacitor.class);

    // Capacitor 2
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      add(SentryCapacitor.class);
    }});
  }
}
```

## [Capacitor on iOS](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#capacitor-on-ios)

### [Capacitor sync failing](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting.md#capacitor-sync-failing)

If you encounter the following error:

```bash
CocoaPods could not find compatible versions for pod "Sentry"
```

You can fix this by updating your pod repository:

```bash
pod repo update
```

## Pages in this section

- [Supported Browsers](https://docs.sentry.io/platforms/javascript/guides/capacitor/troubleshooting/supported-browsers.md)
