Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Web stack traces not showing dart code #2773

Open
chriscarman-mp opened this issue Mar 5, 2025 · 2 comments
Open

Flutter Web stack traces not showing dart code #2773

chriscarman-mp opened this issue Mar 5, 2025 · 2 comments

Comments

@chriscarman-mp
Copy link

Platform

Flutter Web

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.24.5, on macOS 15.2 24C101 darwin-arm64, locale en-IT)
    • Flutter version 3.24.5 on channel stable at /Volumes/Enclosure/Development/fvm/versions/3.24.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (4 months ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
    • Android SDK at /Users/chris/Library/Android/sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version openjdk version "17.0.9" 2023-10-17

[✓] VS Code (version 1.97.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.106.0

[✓] Connected device (5 available)
    • SM X110 (mobile)                • R83X9096X7A               • android-arm64  • Android 14 (API 34)
    • iPhone 12 mini (mobile)         • 00008101-0009104C3484001E • ios            • iOS 18.3.1 22D72
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 133.0.6943.143

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Version

8.13.2

Steps to Reproduce

Setup sentry for Flutter web and record an exception in release mode with error object and stack trace.

My settings are as follows:

pubspec.yaml

sentry:
  upload_sources: true
  upload_source_maps: true
  upload_debug_symbols: true
  wait_for_processing: true
  log_level: trace
  web_build_path: build/web
  org: <org>
  project: <project>
  auth_token: <token>

main.dart

await SentryFlutter.init(
  (options) {
    options.dsn = <dsn>;
    options.tracesSampleRate = 1.0;
    options.profilesSampleRate = 1.0;
    options.release = <release>;
  },
  appRunner: () => runApp(
    SentryWidget(
      child: const MyApp(),
    ),
  ),
);

I'm then building for web and then uploading the source maps as follows:

fvm flutter build web --release --source-maps --pwa-strategy=none
fvm dart run sentry_dart_plugin

Expected Result

Stack trace on https://sentry.io should show the stack trace in dart files, not the compiled javascript files.

Actual Result

Stack traces are shown in the compiled javascript files.

Are you willing to submit a PR?

None

@kahest
Copy link
Member

kahest commented Mar 6, 2025

@chriscarman-mp thanks for reaching out, we'll take a look. Can you share a link to the issue on sentry.io, either here or via [email protected]?

@denrase
Copy link
Collaborator

denrase commented Mar 6, 2025

Hey @chriscarman-mp! I see you are setting release in your sentry init. The plugin is reading release and dist from your pubspec.yaml per default. Please also set a dist and make sure they are the same as in pubspec.yaml.

@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 3 Mar 6, 2025
@kahest kahest removed the bug label Mar 6, 2025
@kahest kahest moved this from Needs Discussion to Needs More Information in Mobile SDKs Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Status: Needs More Information
Development

No branches or pull requests

3 participants