-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
I'm trying to run flutter test on the rive-flutter repo (main branch). I get this error:
RiveFile.import called before RiveFile.initialize() for most of the tests.
Steps To Reproduce
Steps to reproduce the behavior:
- Clone main branch of
rive-flutter - Run
flutter test - See error:
RiveFile.import called before RiveFile.initialize()
Source .riv/.rev file
Not needed, happens for all tests.
Expected behavior
That the tests pass.
Screenshots
Not applicable.
Device & Versions (please complete the following information)
- Device:
flutter test - OS: Running om Mac OS 15.1 with an M1 CPU
- Flutter Version:
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 17025dd882 (9 days ago) • 2024-12-17 03:23:09 +0900
Engine • revision cb4b5fff73
Tools • Dart 3.6.0 • DevTools 2.40.2
Additional context
Even if I add RiveFile.initialize() I get the following error (that is also reported as #354 and some other related issues):
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following ArgumentError was thrown running a test:
Invalid argument(s): Failed to lookup symbol 'init': dlsym(RTLD_DEFAULT, init): symbol not found
When the exception was thrown, this was the stack:
#0 DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)
#1 init (package:rive_common/src/rive_text_ffi.dart:497:16)
#2 init (package:rive_common/src/rive_text_ffi.dart)
#3 initFont (package:rive_common/src/rive_text_ffi.dart:814:3)
#4 Font.initialize (package:rive_common/rive_text.dart:463:7)
#5 RiveFile.initialize (package:rive/src/rive_file.dart:392:33)
#6 main.<anonymous closure> (file:///Users/mickesoderman/development/git/rive-flutter/test/rive_animation_test.dart:139:20)
#7 testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:189:29)
<asynchronous suspension>
#8 TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1027:5)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working