Closed wterrill closed 3 years ago
Thanks for reporting! Can you share the .riv file? You can email it to luigi@rive.app if it's a file you prefer to not share publicly.
I can't attached the file (I get an 'we don't support that file type' error in github when I try) but I downloaded one from this repo:
and modified the code above to change: 'assets/rive/testRive.riv' to 'assets/rive/off_road_car_0_6.riv' after saving that file in the assets/rive folder (the download button is on the right side of the page above)
and got this error:
[VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: Unsupported operation: Unsupported property key 1241. A new runtime is likely necessary to play this file.
0 _skipProperty
package:rive/src/rive_file.dart:63
1 _readRuntimeObject
package:rive/src/rive_file.dart:49
2 new RiveFile._
package:rive/src/rive_file.dart:103
3 new RiveFile.import
package:rive/src/rive_file.dart:217
4 _MyHomePageState.initState.
package:rivetest/main.dart:47
5 _MyHomePageState.initState.
package:rivetest/main.dart:45
6 _rootRunUnary (dart:async/zone.dart:1362:47)
7 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
8 _FutureListener.handleValue (dart:async/future_impl.dart:152:18)
9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:704:45)
10 Future._propagateToListeners (dart:async/future_impl.dart:733:32)
11 Future._completeWithValue (dart:async/future_impl.da<…>
FWIW, I upgraded to rive:0.7.8 and saw the same issue. Can anyone else reproduce this? I'm still uncertain if it's my environment.
I haven't reproduced it with any of our files. You can zip the file and post it here. That'd be really helpful for tracking this down.
Sure. I put a link above to the following file: off_road_car_0_6.riv.zip
Oh sorry, I totally missed that. Looking now!
I just installed the latest version of flutter (channel stable) on an old mac I had, and got the exact same error. My steps:
Upon running, I get the same error: [VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: Unsupported operation: Unsupported property key 1241. A new runtime is likely necessary to play this file.
and, BTW... thanks for the help!
np! This is a file exported for our 0.6 runtimes. I'm surprised it's not throwing an error when trying to open the file. You can still drag and drop this into the editor and export a 0.7 compatible file (or use a 0.6.x runtime).
Still doing some testing, we should probably throw a more helpful error (and earlier).
That was the issue. thank you very much! (heck, I didn't realize that there was a difference in downloaded animations... thanks for the help!)
I just updated an app to null safety and was unable to load assets that had been working before. I narrowed it down to this package by doing the following:
void main() => runApp(MyApp());
class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }
class _MyAppState extends State with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return const MaterialApp(
home: MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget { const MyHomePage({Key? key}) : super(key: key);
@override _MyHomePageState createState() => _MyHomePageState(); }
class _MyHomePageState extends State {
void _togglePlay() {
setState(() => _controller!.isActive = !_controller!.isActive);
}
/// Tracks if the animation is playing by whether controller is running. bool get isPlaying => _controller?.isActive ?? false;
Artboard? _riveArtboard; RiveAnimationController? _controller; @override void initState() { super.initState();
}
@override Widget build(BuildContext context) { return Scaffold( body: Center( child: _riveArtboard == null ? const SizedBox() : Rive(artboard: _riveArtboard!), ), floatingActionButton: FloatingActionButton( onPressed: _togglePlay, tooltip: isPlaying ? 'Pause' : 'Play', child: Icon( isPlaying ? Icons.pause : Icons.play_arrow, ), ), ); } }