Skip to content

Commit

Permalink
Add troubleshooting for flutter screenshot integration background cra…
Browse files Browse the repository at this point in the history
…sh (#8421)

* Add troubleshooting for flutter screenshot integration background crash

* Add newline

* fix typo

* Linter fix

* Update src/platforms/flutter/troubleshooting.mdx

* Update src/platforms/flutter/troubleshooting.mdx

---------

Co-authored-by: Shana Matthews <shana.l.matthews@gmail.com>
  • Loading branch information
denrase and shanamatthews committed Nov 7, 2023
1 parent a372f69 commit e4b6982
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platforms/flutter/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ Dart's `--obfuscate` option is required to be paired with `--split-debug-info` t
The `--split-debug-info` option requires setting an output directory. The directory must be an inner folder of the project's folder. See [Flutter docs](https://docs.flutter.dev/deployment/obfuscate#obfuscate-your-app) for more information.

Flutter's `build web` command requires setting the `--source-maps` parameter to generate source maps. See [Flutter GitHub Issue](https://github.com/flutter/flutter/issues/72150#issuecomment-755541599) for more information.

## Screenshot Integration Background Crash

There is an [issue with the Sentry Flutter SDK](https://github.com/getsentry/sentry-dart/issues/1669) where apps can crash if taking screenshots in the background.

This is an [issue](https://github.com/flutter/flutter/issues/135245) with Flutter itself and should be fixed in [Flutter 3.15](https://github.com/flutter/flutter/labels/found%20in%20release%3A%203.15).

For prior versions, you can work around this by configuring the SDK only to take screenshots when the app is in the `resumed` state. To do this, set `SentryFlutterOptions.attachScreenshotOnlyWhenResumed` to `true`.

1 comment on commit e4b6982

@vercel
Copy link

@vercel vercel bot commented on e4b6982 Nov 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

docs.sentry.io
sentry-docs-git-master.sentry.dev
sentry-docs.sentry.dev

Please sign in to comment.