Skip to main content

Why are my Flutter Web source maps not working?

Issue

I uploaded my Flutter Web source maps, but I still see minified stack traces in Sentry.

Applies To

  • All SaaS Customers

  • Source Maps

  • Flutter SDK

Symptoms

The source maps upload logs show a warning like this:

warning: could not determine a source map reference (Could not auto-detect referenced sourcemap for <file name>)

Resolution

This is caused by Flutter's build output, not by Sentry. Sentry deminifies stack traces using the //# sourceMappingURL= comment at the bottom of each minified JavaScript file, which points to the corresponding .map file. If Flutter does not include that comment in some minified files, Sentry cannot match them to your source maps, so the stack traces stay minified. The warning in your upload logs confirms this.

To resolve this:

  1. Open an affected minified file and check the bottom for a //# sourceMappingURL= comment. If it is missing, Flutter did not emit the source map reference.

  2. Review Flutter's documentation to troubleshoot the missing source map reference.

  3. Upgrade your Flutter version, which has resolved this issue for other users.

Did this answer your question?