Skip to main content

Which source maps should I upload to Sentry for Ionic Capacitor Android Builds?

Issue

We upload source maps to Sentry from our Angular project, specifically the www `directory, but our stack traces stay minified and the source maps do not resolve. We want to know which source maps to upload for an Ionic Capacitor Android build.

Applies To

  • Ionic Capacitor Android builds

  • All SaaS Customers and Self-Hosted Users

Symptoms

  • Minified or unreadable JavaScript stack traces in Sentry.

Resolution

Sentry symbolicates minified JavaScript by matching your stack frames to the uploaded source maps. For Ionic Capacitor Android builds, the Capacitor sync copies your web assets from www to the final build location: android/app/src/main/assets/public

To resolve source maps correctly:

  • Build your app and run the Capacitor sync so the assets land in android/app/src/main/assets/public.

  • Upload the source maps from that final build location, not from www.

  • Use Debug IDs so Sentry matches source maps regardless of file path. The Sentry Wizard and the bundler plugins set these up for you.

For full setup steps, see the Ionic Capacitor source maps guide.

Did this answer your question?