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

Incorrect source maps for Flutter web #142

Closed
Snahi opened this issue Jul 27, 2023 · 1 comment
Closed

Incorrect source maps for Flutter web #142

Snahi opened this issue Jul 27, 2023 · 1 comment

Comments

@Snahi
Copy link

Snahi commented Jul 27, 2023

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

@marandaneto
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants