Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter tests failing since version 0.13.2 #387

Open
MarcinusX opened this issue May 8, 2024 · 2 comments
Open

Flutter tests failing since version 0.13.2 #387

MarcinusX opened this issue May 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@MarcinusX
Copy link

Description

I have tried to update Rive package to either 0.13.2 or 0.13.4 and everything seems to be fine but when I run tests I'm receiving a following error for any widget test that is showing a Rive file:

══╡ 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:527:15)
#2      init (package:rive_common/src/rive_text_ffi.dart)
#3      initFont (package:rive_common/src/rive_text_ffi.dart:836:3)
#4      Font.initialize (package:rive_common/rive_text.dart:477:7)
#5      RiveFile.initializeText (package:rive/src/rive_file.dart:365:33)
#6      main.<anonymous closure>.<anonymous closure> (...)
#7      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:183:29)
<asynchronous suspension>
#8      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1017:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

When I downgrade to 0.13.1, everything is fine.

Device & Versions (please complete the following information)

Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.19.6, on macOS 14.3.1 23D60 darwin-arm64, locale en-PL)
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.0.3/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/marcinszalek/flutter. Consider adding /Users/marcinszalek/flutter/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.87.2)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for Marcin’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this
      Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

Thank you in advance!

@MarcinusX MarcinusX added the bug Something isn't working label May 8, 2024
@vilorel
Copy link

vilorel commented May 8, 2024

The same thing happens to me (same output as yours too). The only difference is that none of the versions (0.13.0 - 0.13.4) work for iOS. Android installations don't have a problem.

@HayesGordon
Copy link
Contributor

Apologies for this. Our underlying C++ engine has added new features that every Rive animation now depends on. Previously this would have only been an issue if your animation made use of Rive Text.

For additional context and instructions on how to solve this issue, see here: #354 (comment)

The summary is that you will need to generate certain libraries the runtime depends on, as these need to be provided externally for Flutter tests.

We'll need to consider a better long-term solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants