While running screenshot_example.dart the following warning appears:
I/flutter (14672): [2022-05-21 22:11:16.240335 | Catcher | WARNING] Failed to create screenshot file: type 'Null' is not a subtype of type 'RenderRepaintBoundary' in type cast
-> as a result, no screenshot is created.
Interestingly, after [hot restart] - the warning disappears and the screenshot is created properly.
After debuging, it occured the problem is that currentContext?.findRenderObject() is called on Null (see: lib/core/catcher_screenshot_manager.dart).
To Reproduce
Run screenshot_example.dart
See Warning:
I/flutter (14672): [2022-05-21 22:11:16.240335 | Catcher | WARNING] Failed to create screenshot file: type 'Null' is not a subtype of type 'RenderRepaintBoundary' in type cast
Run screenshot_example.dart with [Hot restart]
No Warning, screenshot is created correctly.
Expected behavior
Screenshot is created correctly every time.
Flutter doctor
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.8)
[√] Android Studio (version 2021.2)
[√] IntelliJ IDEA Ultimate Edition (version 2022.1)
[√] VS Code (version 1.66.0)
[√] Connected device (5 available)
[√] HTTP Host Availability
• No issues found!
Catcher version
Version: 0.6.9
Smartphone (please complete the following information):
While running screenshot_example.dart the following warning appears:
I/flutter (14672): [2022-05-21 22:11:16.240335 | Catcher | WARNING] Failed to create screenshot file: type 'Null' is not a subtype of type 'RenderRepaintBoundary' in type cast
-> as a result, no screenshot is created.
Interestingly, after [hot restart] - the warning disappears and the screenshot is created properly.
After debuging, it occured the problem is that currentContext?.findRenderObject() is called on Null (see: lib/core/catcher_screenshot_manager.dart).
To Reproduce
Expected behavior Screenshot is created correctly every time.
Flutter doctor [√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale en-GB) [√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.8) [√] Android Studio (version 2021.2) [√] IntelliJ IDEA Ultimate Edition (version 2022.1) [√] VS Code (version 1.66.0) [√] Connected device (5 available) [√] HTTP Host Availability
• No issues found!
Catcher version
Smartphone (please complete the following information):