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 test breaks when using textRun #354

Open
cerealexx opened this issue Nov 24, 2023 · 27 comments
Open

Flutter test breaks when using textRun #354

cerealexx opened this issue Nov 24, 2023 · 27 comments
Labels
bug Something isn't working

Comments

@cerealexx
Copy link

Description

flutter test breaks when trying to test a widget that uses dynamic texts:

RiveAnimation.asset(
    'foo.riv',
    fit: BoxFit.contain,
    stateMachines: const ['State Machine 1'],
    onInit: (artboard) {
        final bookTraining = artboard.textRun('bookTraining');
        bookTraining.text = 'bookTraining'.i18n;
});

Any test with that widget returns:

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:528:15)
#2      init (package:rive_common/src/rive_text_ffi.dart)
#3      initFont (package:rive_common/src/rive_text_ffi.dart:837:3)
#4      Font.initialize (package:rive_common/rive_text.dart:469:12)
#5      RiveFile._initTextAndImport (package:rive/src/rive_file.dart:362:20)
#6      RiveFile.asset (package:rive/src/rive_file.dart:392:12)
<asynchronous suspension>

Steps To Reproduce

Steps to reproduce the behavior:
Write a test pumping the mentioned widget.

Expected behavior

Test suite should work

@cerealexx cerealexx added the bug Something isn't working label Nov 24, 2023
@HayesGordon
Copy link
Contributor

Hi @cerealexx , the Rive Font engine won't have initialized at this point. The best way to do this is to manage the loading of the riv binary yourself, and you can also manually call RiveFile.initializeText

You can see an example in our package tests: https://github.com/rive-app/rive/blob/master/packages/rive_flutter/test/goldens/text/golden_text_test.dart

Something like:

/// Loads a Rive file from the assets sub-folder
ByteData loadFile(String filename) {
  final file = File(
      './${Directory.current.path.endsWith('/test') ? '' : 'test/'}$filename');
  return ByteData.sublistView(file.readAsBytesSync());
}

...

final riveBytes = loadFile('assets/electrified_button_simple.riv');
final file = RiveFile.import(riveBytes);

...

RiveAnimation.direct(file);

@mklemann90
Copy link

mklemann90 commented Jan 10, 2024

Hi @HayesGordon , I was running into the same issue as @cerealexx as I tried to write a simple widget test for a rive widget. I applied the solution you proposed and it actually works. Unfortunately I'm now getting a similar error and still cannot get my test running properly.

My simplified code looks like this:

import 'dart:io';
import 'dart:typed_data';

import 'package:flutter_test/flutter_test.dart';
import 'package:rive/rive.dart';
import 'package:tuktoro_app/config/flutter_gen/assets.gen.dart';

void main() {
  testWidgets('Test that rive file has correct interface', (tester) async {
    final file = File(Assets.public.images.chickenGame.chicken);
    final riveBytes = ByteData.sublistView(file.readAsBytesSync());

    final riveFile = RiveFile.import(riveBytes);

    final widget = RiveAnimation.direct(riveFile);
    await tester.pumpWidget(widget);
  });
}

When running this test code I get the following error as soon as the line final riveFile = RiveFile.import(riveBytes) is executed:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following ArgumentError was thrown running a test:
Invalid argument(s): Failed to lookup symbol 'makeFont': dlsym(RTLD_DEFAULT, makeFont): 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      makeFont (package:rive_common/src/rive_text_ffi.dart:507:10)
#2      makeFont (package:rive_common/src/rive_text_ffi.dart)
#3      decodeFont (package:rive_common/src/rive_text_ffi.dart:827:16)
#4      Font.decode (package:rive_common/rive_text.dart:473:12)
#5      FontAsset.parseBytes (package:rive/src/rive_core/assets/font_asset.dart:63:17)
#6      FontAsset.decode (package:rive/src/rive_core/assets/font_asset.dart:59:18)
#7      FileAssetImporter.resolve.<anonymous closure> (package:rive/src/core/importers/file_asset_importer.dart:32:19)
<asynchronous suspension>
(elided 8 frames from dart:async and package:stack_trace)

Do you have any idea what could be the problem and how to solve it? Thanks ahead!

@luisredondo
Copy link

luisredondo commented Apr 24, 2024

@mklemann90 I'm experiencing a similar issue. Have you found a way to solve it?

@mklemann90
Copy link

@luisredondo so far not, but since it was not top priority in our project, I postponed looking for a solution after I got stuck with this issue.

@HayesGordon
Copy link
Contributor

Hi all, I'm unable to replicate tests breaking. If someone can share a reproducible example in a repository, I can take a look.

But here is an example unit test with files:

import 'dart:io';
import 'dart:typed_data';

import 'package:flutter_test/flutter_test.dart';
import 'package:rive/rive.dart';

extension _TextExtension on Artboard {
  TextValueRun? textRun(String name) => component<TextValueRun>(name);
}

ByteData _loadFile(String filename) {
  final file = File(
      './${Directory.current.path.endsWith('/test') ? '' : 'test/'}$filename');
  return ByteData.sublistView(file.readAsBytesSync());
}

void main() {
  late RiveFile riveFile;

  setUp(() {
    return Future(() async {
      final riveBytes = _loadFile('assets/text_run.riv');
      await RiveFile.initializeText();
      riveFile = RiveFile.import(riveBytes);
    });
  });

  test('Text run updating', () {
    final artboard = riveFile.mainArtboard.instance();
    final run1 = artboard.textRun('run1')!;
    final run2 = artboard.textRun('run2')!;
    expect(run1.text, "run1-value");
    expect(run2.text, "run2-value");
    run1.text = "new value 1";
    run2.text = "new value 2";
    expect(run1.text, "new value 1");
    expect(run2.text, "new value 2");
  });
}

text_run.riv.zip
text_run.rev.zip

And here is a golden test that updates a text run: https://github.com/rive-app/rive-flutter/blob/master/test/goldens/text/golden_text_test.dart

With output files: https://github.com/rive-app/rive-flutter/tree/master/test/goldens/text/images

@luisredondo
Copy link

Hey @HayesGordon! I created this repository: rive_issue. There I'm getting:

Invalid argument(s): Failed to lookup symbol 'init': dlsym(RTLD_DEFAULT, init): symbol not found
dart:ffi                                           DynamicLibrary.lookup
package:rive_common/src/rive_text_ffi.dart 527:15  init
package:rive_common/src/rive_text_ffi.dart         init
package:rive_common/src/rive_text_ffi.dart 836:3   initFont
package:rive_common/rive_text.dart 471:15          Font.initialize
package:rive/src/rive_file.dart 365:18             RiveFile.initializeText
test/widget_test.dart 23:22                        main.<fn>.<fn>

I pasted the exact same code you shared, and added the .riv and .rev files you attached.

I'm running with:

Flutter:

Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (7 weeks ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1

Machine: Apple M1 Pro with Sonoma 14.4.1

Please let me know if you are able to reproduce.

@HayesGordon
Copy link
Contributor

HayesGordon commented Apr 30, 2024

@luisredondo thanks for the repro. This was a mistake on my side, I forgot that Flutter tests need to load in the dylib for macOS.

I'm providing a solution, but to give some context, the Rive editor uses the same underlying rive_common package, which complicates things slightly. Long term we'd need to revisit this to make it easier. But for now, I recommend generating the libraries yourself.

Here are the steps:

  1. Copy the attached shell script to the root of your Flutter project
  2. Make it executable with chmod +x build_rive_common.sh.
  3. Run the script normally with ./build_rive_common.sh.
  4. To force a rebuild use ./build_rive_common.sh -f (else it will cache based on the rive_common version and if the output directory is empty).

This script will generate a shared_lib/build/bin/debug folder with libraries needed for testing. You do not need to commit this to source control, but if you want to run Rive tests as part of a Github action, for example, this script will need to be run. Or see our Github action for tests - which does the same thing as the script (but without caching).

EDIT: I only tested this on the latest version of Rive, at the time of writing v0.13.2

build_rive_common.sh

#!/bin/bash

# Default flag for force rebuild set to false
FORCE_REBUILD=false

# Parse command-line options
while getopts "f" opt; do
  case $opt in
    f)
      FORCE_REBUILD=true
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
  esac
done

# Directory where the version file and build outputs will be stored
BUILD_DIR="shared_lib/build/bin/debug/"

# Version file path
VERSION_FILE="rive_common_version.txt"

# Make sure Rive and Rive Common is available
flutter pub get

# Fetch the current rive_common version from pubspec.lock
CURRENT_VERSION=$(dart pub deps -s list | grep rive_common | sed 's/[^0-9.]*//g' | head -n 1)

echo $CURRENT_VERSION

# Check if the version was actually retrieved
if [ -z "$CURRENT_VERSION" ]; then
  echo $'\nFailed to retrieve rive_common version. Please check the output of 'dart pub deps -s list'.'
  exit 1
fi

# Read the version from disk if the version file exists
if [ -f "$VERSION_FILE" ]; then
  SAVED_VERSION=$(cat "$VERSION_FILE")
else
  SAVED_VERSION=""
fi

# Check if the build directory is empty
if [ "$(ls -A $BUILD_DIR)" ]; then
  BUILD_DIR_EMPTY=false
else
  BUILD_DIR_EMPTY=true
fi

# Compare versions and directory status unless force rebuild is triggered
if [ "$FORCE_REBUILD" = false ] && [ "$CURRENT_VERSION" = "$SAVED_VERSION" ] && [ "$BUILD_DIR_EMPTY" = false ]; then
  echo $'\nNo rebuild needed. Exiting...\n'
  exit 0
fi

# Save the current version to disk
echo $CURRENT_VERSION > $VERSION_FILE

echo ""
echo "Rive Common Version: $CURRENT_VERSION"
echo ""

# Change to the directory where 'rive_common' is located in the local pub cache
pushd ~/.pub-cache/hosted/pub.dev/rive_common-$CURRENT_VERSION

# Run the update_dependencies script with 'force' option
./update_dependencies.sh force

# Change to the directory containing the shared library source
pushd shared_lib

# Build the shared library
./build_shared.sh

# Store the path to the built shared library
RIVE_TEXT_DYLIB=$PWD/build/bin/debug/librive_text.dylib

# Return to the previous directory
popd

# Return to the initial directory
popd

# Create the target directory if it doesn't exist
mkdir -p $BUILD_DIR

# Copy the built shared library to the target directory
cp $RIVE_TEXT_DYLIB $BUILD_DIR

echo $'\nLibrary built and copied successfully.\n'

@mrRedSun
Copy link

mrRedSun commented May 2, 2024

Is there any long-term solution for this?

@bjartebore
Copy link

A Slightly modified version of the script so it can run on ubuntu-latest as well

#!/bin/bash

# Default flag for force rebuild set to false
FORCE_REBUILD=false

# Parse command-line options
while getopts "f" opt; do
  case $opt in
    f)
      FORCE_REBUILD=true
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
  esac
done

# Directory where the version file and build outputs will be stored
BUILD_DIR="shared_lib/build/bin/debug/"

# Version file path
VERSION_FILE="rive_common_version.txt"

# Current dir
CURRENT_DIR=$(pwd)

# Make sure Rive and Rive Common is available
flutter pub get

# Fetch the current rive_common version from pubspec.lock
CURRENT_VERSION=$(dart pub deps -s list | grep rive_common | sed 's/[^0-9.]*//g' | head -n 1)

echo $CURRENT_VERSION

# Check if the version was actually retrieved
if [ -z "$CURRENT_VERSION" ]; then
  echo $'\nFailed to retrieve rive_common version. Please check the output of 'dart pub deps -s list'.'
  exit 1
fi

# Read the version from disk if the version file exists
if [ -f "$VERSION_FILE" ]; then
  SAVED_VERSION=$(cat "$VERSION_FILE")
else
  SAVED_VERSION=""
fi

# Check if the build directory is empty
if [ "$(ls -A $BUILD_DIR)" ]; then
  BUILD_DIR_EMPTY=false
else
  BUILD_DIR_EMPTY=true
fi

# Compare versions and directory status unless force rebuild is triggered
if [ "$FORCE_REBUILD" = false ] && [ "$CURRENT_VERSION" = "$SAVED_VERSION" ] && [ "$BUILD_DIR_EMPTY" = false ]; then
  echo $'\nNo rebuild needed. Exiting...\n'
  exit 0
fi

# Save the current version to disk
echo $CURRENT_VERSION > $VERSION_FILE

echo ""
echo "Rive Common Version: $CURRENT_VERSION"
echo ""

# Change to the directory where 'rive_common' is located in the local pub cache
cd $PUB_CACHE/hosted/pub.dev/rive_common-$CURRENT_VERSION || exit 1

# Run the update_dependencies script with 'force' option
./update_dependencies.sh force

# Change to the directory containing the shared library source
cd shared_lib || exit 1

# Build the shared library
./build_shared.sh

# Store the path to the built shared library
if [ -f "$PWD/build/bin/debug/librive_text.so" ]; then
  RIVE_TEXT_DYLIB=$PWD/build/bin/debug/librive_text.so
else
  RIVE_TEXT_DYLIB=$PWD/build/bin/debug/librive_text.dylib
fi

# Return to the initial directory
cd $CURRENT_DIR || exit 1

# Create the target directory if it doesn't exist
mkdir -p $BUILD_DIR

# Copy the built shared library to the target directory
cp $RIVE_TEXT_DYLIB $BUILD_DIR

echo $'\nLibrary built and copied successfully.\n'

@spydon
Copy link

spydon commented Jun 4, 2024

I'm providing a solution, but to give some context, the Rive editor uses the same underlying rive_common package, which complicates things slightly.

Didn't it depend on rive_common before 0.13.x too?
Currently we can't update flame_rive to the latest version of rive due to it not being able to run the tests of the package. And we don't want to maintain a custom build script for the package. 😅
@HayesGordon is there any other way forward here from the rive side?

@HayesGordon
Copy link
Contributor

@spydon, it did depend on rive_common but the libraries were only needed if the Rive file contained Rive Text. We checked the file to see if it required initialization. Every Rive file will now require that library in preparation for an upcoming feature.

We're working on a significant underlying change for the Rive Flutter runtime that will directly impact this. For this new version of the Rive Flutter runtime, we're discussing the best way to approach this issue. Most likely, we will build and package the libraries instead of requiring them to be built.

So, in that new major release of Rive Flutter, we will address this issue.

@spydon
Copy link

spydon commented Jun 5, 2024

So, in that new major release of Rive Flutter, we will address this issue.

Super, thanks for the update! :)

@kt315ua
Copy link

kt315ua commented Oct 15, 2024

Hi @HayesGordon,

I wanted to ask if you could provide any information regarding the timeline for the next major release of Rive Flutter. Your insights would be greatly appreciated!

Thank you for your help.

@NashIlli
Copy link

+1

@mrRedSun
Copy link

macos/rive_text/rive_text.cpp:159:28: error: no viable conversion from 'rive::Span<const rive::Unichar>' (aka 'Span<const unsigned int>') to 'rive::Unichar' (aka 'unsigned int')

  159 |         if (font->hasGlyph(missing))

      |                            ^~~~~~~

macos/rive-cpp/include/rive/text/font_hb.hpp:35:38: note: passing argument to parameter here

   35 |     bool hasGlyph(const rive::Unichar) const override;

      |                                      ^

macos/rive_text/rive_text.cpp:175:33: error: assigning to 'FallbackProc' (aka 'rcp<rive::Font> (*)(const unsigned int, const unsigned int)') from incompatible type 'rive::rcp<rive::Font> (rive::Span<const rive::Unichar>)' (aka 'rcp<rive::Font> (Span<const unsigned int>)'): different number of parameters (2 vs 1)

  175 |     rive::Font::gFallbackProc = pickFallbackFont;

      |                                 ^~~~~~~~~~~~~~~~

2 errors generated.

make[1]: *** [rive_text.make:335: shared_lib/build/obj/debug/debug/rive_text/rive_text.o] Error 1

Workaround script started generating errors in the pipeline

@Solido
Copy link

Solido commented Nov 22, 2024

Can confirm too the script is not working anymore.
Blocking the widget testing under macos.

Any recommended approach while waiting for the refactor? Thanks

rive-engineering pushed a commit that referenced this issue Nov 25, 2024
Releases new `rive_common` and updates `rive_flutter` to use it. Resolves: #354 (comment)

Diffs=
de19b09fb3 Rive common release 0.4.13 (#8638)
11ff873bf8 support wrapping text in auto width inside a layout (#8624)
28582ea0fd fixed workflow stuff (#8628)
b32973afd6 updates to diff.py (#8623)
c7fe86a7bf Fix bug in draw key (#8620)
91f9ab8aec fix for incorrect android build option (#8608)
81709286ea Update linear animation advanceAndApply to return if more animation remains (#8610)
37c6987847 Add check to TextModifierGroup to prevent out of bounds access (#8606)
7be5f73b5a editor: update the repeat limit for n-slicing (#8604)
3eefba5039 CoreText fallback shaper ex (#8568)
807f9b20ac image diff hiistogram mode (#8601)
17474d3e2c feat: expose hit test to runtimes (#8598)
36e73f6b4b Fixup android_gms_browserstack (#8599)
88543fa792 Nnnn range data converter (#8585)
a2b0cb230a Normalize GM tests (#8586)
e10bb4aafd Rename USING_DEPTH_STENCIL to RENDERING_MODE_MSAA (#8584)
869816556f Fix invalid memory access (#8546)
8030dc05eb Fix clip planes on S22/Xclipse/ANGLE (#8582)
01e014f82d Add an android_gms job to browserstack (#8583)
1d23ae5782 editor: be more mindful of sending dirt recursively when n-slicing (#8576)
cc15ffa4f6 Fix NestedAnimation skipping export too late (#8573)

Co-authored-by: Gordon <pggordonhayes@gmail.com>
@HayesGordon
Copy link
Contributor

Thanks for reporting! This should now be resolved in v0.13.18.

We're not advertising it yet, and it's not yet ready to be used in Rive Flutter, but the new rive_native package is available on Pub as a dev release: https://pub.dev/packages/rive_native

It should automatically download and verify the libraries and also allow you to build them locally.

More information will come after we have all the core features and platforms integrated. But if you'd like to experiment you can see if it's building for you locally.

@HayesGordon HayesGordon reopened this Nov 25, 2024
@mrRedSun
Copy link

@HayesGordon you guys are legends, thanks a lot!

@bjartebore
Copy link

I still experience this issue after upgrading to rive_common 0.4.13 and rive 0.13.18, am I wrong to understand that it should be resolved?

@mrRedSun
Copy link

I still experience this issue after upgrading to rive_common 0.4.13 and rive 0.13.18, am I wrong to understand that it should be resolved?

No, only the script is fixed, the issue persists for now

@m1rroxof
Copy link

I'm experiencing the same issue. Any ideas when this can be resolved?

@mrRedSun
Copy link

@m1rroxof apply this script before running your pipeline and it will be fixed for now (make sure to use the latest Rive package version)

A Slightly modified version of the script so it can run on ubuntu-latest as well

#!/bin/bash

# Default flag for force rebuild set to false
FORCE_REBUILD=false

# Parse command-line options
while getopts "f" opt; do
  case $opt in
    f)
      FORCE_REBUILD=true
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
  esac
done

# Directory where the version file and build outputs will be stored
BUILD_DIR="shared_lib/build/bin/debug/"

# Version file path
VERSION_FILE="rive_common_version.txt"

# Current dir
CURRENT_DIR=$(pwd)

# Make sure Rive and Rive Common is available
flutter pub get

# Fetch the current rive_common version from pubspec.lock
CURRENT_VERSION=$(dart pub deps -s list | grep rive_common | sed 's/[^0-9.]*//g' | head -n 1)

echo $CURRENT_VERSION

# Check if the version was actually retrieved
if [ -z "$CURRENT_VERSION" ]; then
  echo $'\nFailed to retrieve rive_common version. Please check the output of 'dart pub deps -s list'.'
  exit 1
fi

# Read the version from disk if the version file exists
if [ -f "$VERSION_FILE" ]; then
  SAVED_VERSION=$(cat "$VERSION_FILE")
else
  SAVED_VERSION=""
fi

# Check if the build directory is empty
if [ "$(ls -A $BUILD_DIR)" ]; then
  BUILD_DIR_EMPTY=false
else
  BUILD_DIR_EMPTY=true
fi

# Compare versions and directory status unless force rebuild is triggered
if [ "$FORCE_REBUILD" = false ] && [ "$CURRENT_VERSION" = "$SAVED_VERSION" ] && [ "$BUILD_DIR_EMPTY" = false ]; then
  echo $'\nNo rebuild needed. Exiting...\n'
  exit 0
fi

# Save the current version to disk
echo $CURRENT_VERSION > $VERSION_FILE

echo ""
echo "Rive Common Version: $CURRENT_VERSION"
echo ""

# Change to the directory where 'rive_common' is located in the local pub cache
cd $PUB_CACHE/hosted/pub.dev/rive_common-$CURRENT_VERSION || exit 1

# Run the update_dependencies script with 'force' option
./update_dependencies.sh force

# Change to the directory containing the shared library source
cd shared_lib || exit 1

# Build the shared library
./build_shared.sh

# Store the path to the built shared library
if [ -f "$PWD/build/bin/debug/librive_text.so" ]; then
  RIVE_TEXT_DYLIB=$PWD/build/bin/debug/librive_text.so
else
  RIVE_TEXT_DYLIB=$PWD/build/bin/debug/librive_text.dylib
fi

# Return to the initial directory
cd $CURRENT_DIR || exit 1

# Create the target directory if it doesn't exist
mkdir -p $BUILD_DIR

# Copy the built shared library to the target directory
cp $RIVE_TEXT_DYLIB $BUILD_DIR

echo $'\nLibrary built and copied successfully.\n'

@m1rroxof
Copy link

Thanks a lot. I will try it

@JulianBissekkou
Copy link

The tests in the rive flutter repo currently fail due to the exact build issue mentioned above.
https://github.com/rive-app/rive-flutter/actions/runs/12054887598/job/33613969122

This is because the update_dependencies.sh script is cloning the current rive-cpp repository with whatever currently is on main. However, the build on main might not work which will break your and all other pipelines that use this script.
I would suggest that the rive-cpp repository has a check that ensures the build works, or that the ´update_dependencies.sh´ script uses a specific git commit to avoid these failures.

I got it working by adjusting the script slightly to check out ref that worked 3 days ago.
Here is my adjusted version:

        else
            echo "Cloning rive-cpp."
            git clone https://github.com/rive-app/rive-cpp
            cd rive-cpp
            echo "Changing ref to 76cc558f74408ec883094351a29d803d928f9e2d"
            git checkout 76cc558f74408ec883094351a29d803d928f9e2d
            cd ..
        fi

@HayesGordon Another idea to improve this situation would be to have the build binaries for the latest rive_common version be ready for download, so people can just have a few lines of code where they copy the downloaded binary to app/shared_lib/build/bin/debug/librive_text.dylib.

I did this in a little dart function that I can run before my rive tests which works quite nice.

image
// pseudo code
testWidgets((tester) async {
  await loadRiveTextRenderingLib();
});
final _projectRootPath =
    "${Directory.current.path}/shared_lib/build/bin/debug/";

Future<void> loadRiveTextRenderingLib() async {
  final targetPath = "${_projectRootPath}librive_text.dylib";
  if (File(targetPath).existsSync()) return;

  final riveLib = File(
    "${Directory.current.path}/test/test_util/rive/librive_text.dylib",
  );
  assert(riveLib.existsSync());
  Directory(_projectRootPath).createSync(recursive: true);
  riveLib.copySync(targetPath);
}

With this solution running tests locally on mac is also supported.

@HayesGordon
Copy link
Contributor

This should be fixed again in the latest @bjartebore (v0.13.19)

@chrisflutterdev
Copy link

I tried on Rive version 0.13.20, but got the same issue. It's not clear from this thread whether to expect the issue to be fixed in the new Rive version, or if the new version of Rive fixes the script that is the workaround for the issue.

@mrRedSun
Copy link

mrRedSun commented Dec 4, 2024

I tried on Rive version 0.13.20, but got the same issue. It's not clear from this thread whether to expect the issue to be fixed in the new Rive version, or if the new version of Rive fixes the script that is the workaround for the issue.

The ticket is still open. Only the script is fixed for now.

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