intercom icon indicating copy to clipboard operation
intercom copied to clipboard

Android app keeps crashing right when opening

Open raphaelparent opened this issue 10 months ago • 1 comments

Describe the bug The title says it all. After I've installed the plugin, my app keeps crashing immediately on load after deploying the app-debug.apk to the android emulator. I was able to reproduce on a clean install. When I remove the plugin, my app works again.

To Reproduce

  1. Install a clean Capacitor app using the docs (I used the npm init @capacitor/app@latest command)
  2. Add the android package.
  3. Add the plugin package (v7.0.3).
  4. Build the app.
  5. Sync the app.
  6. Run the app using npx cap run android.
  7. After the gradle build and the deployment the emulator opens and the app crashes.

Expected behavior The app should open and work as normal.

Smartphone (please complete the following information):

  • Device: Pixel 8 Pro API 34 (emulator) (Pixel_8_Pro_API_34)
  • OS: Android

Additional information

  • Downgrading to v7.0.0 of the plugin fixes the problem, the app loads successfully.

raphaelparent avatar Mar 27 '25 18:03 raphaelparent

Similar problem here. The app crashes and close right after opening. All happened after migrate to capacitor 7.

The adb logs indicate that Intercom's SDK (io.intercom.android.sdk) component is requiring io.sentry.Hub, which is part of the Sentry SDK but not present on runtime.

  • Intercom initializes its SentryErrorReporter in MainActivity.onCreate().
  • Since Sentry isn’t bundled, the app crashes with NoClassDefFoundError.

This seems to be a problem related with capacitor-community/intercom and@sentry/capacitor. If I remove any of these two packages the app don't crash. If these two packages are toguether then the app crashes.

These are my dependencies:

"@angular/animations": "^17.3.10",
    "@angular/cdk": "^17.3.10",
    "@angular/common": "^17.3.10",
    "@angular/core": "^17.3.10",
    "@angular/forms": "^17.3.10",
    "@angular/material": "^17.3.10",
    "@angular/platform-browser": "^17.3.10",
    "@angular/platform-browser-dynamic": "^17.3.10",
    "@angular/router": "^17.3.10",
    "@capacitor-community/apple-sign-in": "^7.0.1",
    "@capacitor-community/in-app-review": "^7.0.1",
    "@capacitor-community/intercom": "^7.0.3",
    "@capacitor-community/safe-area": "^7.0.0-alpha.1",
    "@capacitor-mlkit/barcode-scanning": "^7.2.1",
    "@capacitor/android": "7.4.2",
    "@capacitor/app": "^7.0.1",
    "@capacitor/assets": "^3.0.5",
    "@capacitor/browser": "^7.0.1",
    "@capacitor/clipboard": "^7.0.1",
    "@capacitor/core": "^7.0.0",
    "@capacitor/device": "^7.0.1",
    "@capacitor/filesystem": "^7.1.2",
    "@capacitor/geolocation": "^7.1.3",
    "@capacitor/google-maps": "^7.0.3",
    "@capacitor/haptics": "^7.0.1",
    "@capacitor/ios": "^7.0.0",
    "@capacitor/keyboard": "^7.0.1",
    "@capacitor/network": "^7.0.1",
    "@capacitor/push-notifications": "^7.0.1",
    "@capacitor/splash-screen": "^7.0.1",
    "@capacitor/status-bar": "^7.0.1",
    "@capacitor/toast": "^7.0.1",
    "@capawesome/capacitor-badge": "^7.0.1",
    "@capgo/capacitor-social-login": "^7.8.0",
    "@ionic/angular": "^7.8.6",
    "@ionic/core": "^7.8.6",
    "@sentry/angular": "^9.27.0",
    "@sentry/capacitor": "^2.0.0",

daquino-dev avatar Jul 16 '25 19:07 daquino-dev