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
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)
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)
The text was updated successfully, but these errors were encountered:
The RiveFile.import called before RiveFile.initialize() is a warning and not an error. Mostly a consideration for use in production. For tests, it's not necessary to call RiveFile.initialize() unless you want to get rid of the warning.
The error you're getting is because the dynamic library does not exist for the tests to use. This issue provides relevant information and instructions for building it locally.
Please note that we will be improving this soon once Rive Flutter switches to using the new rive_native package.
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:
rive-flutter
flutter test
RiveFile.import called before RiveFile.initialize()
Source
.riv
/.rev
fileNot needed, happens for all tests.
Expected behavior
That the tests pass.
Screenshots
Not applicable.
Device & Versions (please complete the following information)
flutter test
Additional context
Even if I add RiveFile.initialize() I get the following error (that is also reported as #354 and some other related issues):
The text was updated successfully, but these errors were encountered: