getsentry/sentry-dart-plugin

Incorrect source maps for Flutter web

Snahi opened this issue · 1 comments

Snahi commented

Environment

sentry_dart_plugin: 1.5.0
Flutter: 3.10.3

Steps to Reproduce

  1. Create Flutter app:
void main() async {
  await SentryFlutter.init(
    (options) {
      options.dsn = 'put your dsn here';
      options.tracesSampleRate = 1.0;
    },
    appRunner: () {
      WidgetsFlutterBinding.ensureInitialized();
      runApp(const MyApp());
    },
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Sentry Test',
      home: Scaffold(
        body: Center(
          child: TextButton(
            onPressed: () => throw Exception('Exception from release to test Sentry'),
            child: const Text('Throw Exception'),
          ),
        ),
      ),
    );
  }
}
  1. Add this configuration to pubspec.yaml
sentry:
  upload_source_maps: true
  upload_sources: true
  project: <your project name>
  org: <your organization name>
  url: <your url>
  wait_for_processing: true
  ignore_missing: false
  1. Set env variable SENTRY_AUTH_TOKEN
  2. Create git repository and commit your changes
  3. run: flutter build web --source-maps
  4. run: dart pub global activate sentry_dart_plugin
  5. run: dart pub global run sentry_dart_plugin
  6. run: flutter run --release
  7. Tap the "Throw Exception" button

Expected Result

The exception shows in issues with the correctly decoded stack trace

Actual Result

The issue name is "minified:GO". Stack trace is not decoded properly:

Screenshot 2023-07-27 at 12 15 38

@Snahi Yep we are aware, it's a dupe of getsentry/sentry-dart#1565 (comment)
Thanks for raising this, please upvote that issue.