You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.22621.2283], locale en-US)
• Flutter version 3.13.6 on channel stable at C:\Users\Developer\source\repos\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (12 days ago), 2023-09-26 18:28:17 -0700
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\Users\Developer\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.7.34031.279
• Windows 10 SDK version 10.0.22000.0
Run your application put your application in background or lock your phone, and create a function that will trigger an exception and have something like this:
This will throw exception Null check operator used on a null value
Expected Result
If the mobile app is not in the foreground and you cannot capture the screenshot it should ignore it or allow developers to control this based on the application state.
Actual Result
If you have set the mobile application with SentryScreenshotWidget, and the application is in the background when you try to capture an exception using sentry it will throw an exception:
_TypeError
Null check operator used on a null value
painting.dart in _Image.toByteData.. at line 1959
So essentially I have to try/catch for capturing exceptions.
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered:
We did implement a workaround where users can disable taking screenshots in the background, but we'll need to discuss if this is even worth including when there is a fix in the Flutter SDK on the way.
Platform
Dart
Obfuscation
Disabled
Debug Info
Enabled
Doctor
[√] Flutter (Channel stable, 3.13.6, on Microsoft Windows [Version 10.0.22621.2283], locale en-US)
• Flutter version 3.13.6 on channel stable at C:\Users\Developer\source\repos\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (12 days ago), 2023-09-26 18:28:17 -0700
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\Users\Developer\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.4)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.7.34031.279
• Windows 10 SDK version 10.0.22000.0
[√] Android Studio (version 2022.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 Runtime Environment (build 17.0.6+0-b2043.56-9586694)
[√] VS Code (version 1.83.0)
• VS Code at C:\Users\Developer\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.74.0
[√] Connected device (4 available)
• moto g power 2022 (mobile) • ZY22GHDDBB • android-arm64 • Android 12 (API 31)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.2283]
• Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.149
• Edge (web) • edge • web-javascript • Microsoft Edge 117.0.2045.43
[√] Network resources
• All expected network resources are available.
• No issues found!
Version
7.9.0
Steps to Reproduce
in
main.dart
setup followingRun your application put your application in background or lock your phone, and create a function that will trigger an exception and have something like this:
This will throw exception
Null check operator used on a null value
Expected Result
If the mobile app is not in the foreground and you cannot capture the screenshot it should ignore it or allow developers to control this based on the application state.
Actual Result
If you have set the mobile application with
SentryScreenshotWidget
, and the application is in the background when you try to capture an exception using sentry it will throw an exception:_TypeError
Null check operator used on a null value
painting.dart in _Image.toByteData.. at line 1959
So essentially I have to try/catch for capturing exceptions.
Are you willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: