Flare-flutter: Imported Animation Throws Unhandled Exception

Created on 11 Oct 2019  路  11Comments  路  Source: 2d-inc/Flare-Flutter

Hello! I'm using the dev branch of Flare-Flutter and I'm loading flare animations without any sort of problems until recently where I did an animation based on an svg file and after trying to run this animation I am having trouble with an unhandled exception, the call stack is as follows:

E/flutter (31300): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: Exception: type 'FlutterActorShape' is not a subtype of type 'ActorPath' in type cast E/flutter (31300): #0 KeyFramePathVertices.read (package:flare_dart/animation/keyframe.dart:703:36) E/flutter (31300): #1 PropertyAnimation.read (package:flare_dart/animation/actor_animation.dart:148:38) E/flutter (31300): #2 ComponentAnimation.read (package:flare_dart/animation/actor_animation.dart:231:61) E/flutter (31300): #3 ActorAnimation.read (package:flare_dart/animation/actor_animation.dart:409:30) E/flutter (31300): #4 ActorArtboard.readAnimationsBlock (package:flare_dart/actor_artboard.dart:589:30) E/flutter (31300): #5 ActorArtboard.read (package:flare_dart/actor_artboard.dart:328:11) E/flutter (31300): #6 Actor.readArtboardsBlock (package:flare_dart/actor.dart:165:22) E/flutter (31300): #7 Actor.load (package:flare_dart/actor.dart:137:11) E/flutter (31300): <asynchronous suspension> E/flutter (31300): #8 FlutterActor.loadFromByteData (package:flare_flutter/flare.dart:746:17) E/flutter (31300): <asynchronous suspension> E/flutter (31300): #9 _IsolateConfiguration.apply (package:flutter/src/foundation/_isolates_io.dart:77:16) E/flutter (31300): #10 _spawn.<anonymous closure> (package:flutter/src/foundation/_isolates_io.dart:84:45) E/flutter (31300): <asynchronous suspension> E/flutter (31300): #11 Timeline.timeSync (dart:developer/timeline.dart:161:22) E/flutter (31300): #12 _spawn (package:flutter/src/foundation/_isolates_io.dart:82:18) E/flutter (31300): <asynchronous suspension> E/flutter (31300): #13 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:308:17) E/flutter (31300): #14 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

The Flare file which is having problems can be found here

Thanks in advance.

Most helpful comment

flare_flutter: ^1.6.3 should now be up with both fixes. And the preview page (web viewer) should be working again.

All 11 comments

Yes, i thought i was just going crazy. For some reason or another, the file the I download and put into my assets no longer works. The exception I now get is Unhandled Exception: Exception: type 'int' is not a subtype of type 'List' when it worked perfectly yesterday.
The error occurs in flare.dart, line 719, make colorStroke.
FlutterActor.loadFromByteData (flare.dart:719) <asynchronous gap> FlutterActor.loadFromByteData (flare.dart:1) _Closure.call (function.dart:1) _IsolateConfiguration.callback (_isolates_io.dart:1) _IsolateConfiguration.apply (_isolates_io.dart:77) _spawn.<anonymous closure> (_isolates_io.dart:84) <asynchronous gap> Timeline.timeSync (timeline.dart:161) _spawn (_isolates_io.dart:82) <asynchronous gap> _spawn (_isolates_io.dart:1) _Closure.call (function.dart:1) _startIsolate.<anonymous closure> (isolate_patch.dart:308) _Closure.call (function.dart:1) _RawReceivePortImpl._handleMessage (isolate_patch.dart:172)

I'll look into this shortly!

@luigi-rosso The scenario where this occurred was when I exported my flr file today and replaced the older one. I was on version 1.5.13, but I have tested on 1.6.1 and dev branch. I think something in the formatting of the flr changed and is causing the issue.

It is a bit weird but I have found out that the original asset is not even able to be played on the original web viewer, this is the URL to the flare project

Apparently, it has to do with the editor itself or the way it is exporting the data. To me looks like the parser is having troubles while reading the properties due to an issue with the export or the project itself.

You can try forking the original project linked above.

Looks like there may be two issues here. I have a fix for @elisamuelps's issue already on master and dev. It's waiting to publish to pub (been getting lots of 500's from there lately). The fix for the 2Dimensions.com site is going up too. Thanks for catching that!

In the meantime, @rnewquist, could you share your file that's causing problems too?

Thanks trying that now. In the meantime, @elisamuelps could you try flare_flutter: ^1.6.2?

@rnewquist looks like this issue should only be affecting JSON. I'll have a fix shortly. In the meantime, you could export a binary version from Flare if you want to unblock yourself.

flare_flutter: ^1.6.3 should now be up with both fixes. And the preview page (web viewer) should be working again.

Thanks trying that now. In the meantime, @elisamuelps could you try flare_flutter: ^1.6.2?

Luigi Thank you for the quick response! that's amazing of you. I will have a look at it and close the issue if everything is working as expected.

I can confirm that now the animation is being displayed and it is working as expected, a massive thanks @luigi-rosso !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaumard picture jaumard  路  6Comments

BrainRayChristensen picture BrainRayChristensen  路  7Comments

Nijinsha picture Nijinsha  路  7Comments

kautukkundan picture kautukkundan  路  3Comments

hyeonjae picture hyeonjae  路  5Comments