-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
Description
Edit: I updated the title of the issue after clarifying that the used renderer (rive) should not be used for golden tests. However, there is still a bug that the rendering does not work by using the proposed flutter renderer.
Description
When running an golden or widget test that includes a rive widget the test fails with the following error:
00:02 +0: MyApp Golden Tests MyApp should match golden file Shell: Assertion failed: (factory), function File, file file.cpp, line 170.
unhandled error during finalization of test:
/Users/julianbissekkou/Downloads/rive_example/test/golden/my_app_golden_test.dart
TestDeviceException(Shell subprocess crashed with SIGABRT (-6).)
#0 FlutterTesterTestDevice.finished (package:flutter_tools/src/test/flutter_tester_device.dart:254:5)
<asynchronous suspension>
#1 FlutterTesterTestDevice.kill (package:flutter_tools/src/test/flutter_tester_device.dart:236:5)
<asynchronous suspension>
#2 FlutterPlatform._startTest.<anonymous closure> (package:flutter_tools/src/test/flutter_platform.dart:696:9)
<asynchronous suspension>
#3 FlutterPlatform._startTest.finalize (package:flutter_tools/src/test/flutter_platform.dart:597:11)
<asynchronous suspension>
#4 FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:769:7)
<asynchronous suspension>
Steps To Reproduce
Steps to reproduce the behavior:
- Create a simple page that displays a rive widget
- Create a golden test for that page
- Run the golden test
- See error
⚠️
Source .riv/.rev file
You can use any riv file that you want. In my example I just used this one that I found in some example repo online.
https://cdn.rive.app/animations/vehicles.riv
Expected behavior
No crash, golden image gets rendered
Screenshot
Device & Versions (please complete the following information)
e.g.:
[✓] Flutter (Channel stable, 3.32.5, on macOS 15.5 24F74 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] IntelliJ IDEA Community Edition (version 2025.1.1.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Additional context
I created a repository with an example right here:
https://github.com/JulianBissekkou/rive_golden_issue