Open hasnainkanji opened 2 years ago
I have the same issue
Hi, I am getting this error.
Lottie/ItemsExtension.swift:83: Fatal error: The Main Thread rendering engine doesn't currently support repeaters. To play an animation with repeaters, you can use the Core Animation rendering engine instead. 2022-09-05 21:45:24.501920+0400 Demo[46949:6094753] Lottie/ItemsExtension.swift:83: Fatal error: The Main Thread rendering engine doesn't currently support repeaters. To play an animation with repeaters, you can use the Core Animation rendering engine instead.
Which Version of Lottie are you using?
Lottie 3.4.3
Animation JSON
I fixed this issue. Try this: AppDelegate -> LottieConfiguration.shared.renderingEngine = .automatic
@FreestyleRR which Animation are you using?
Still, it is not working for me. For the mentioned above json.
@FreestyleRR which Animation are you using?
Still, it is not working for me. For the mentioned above json.
Json animation and I have the same issue But it helped me. Try this - let animationView = AnimationView( animation: ..., configuration: LottieConfiguration(renderingEngine: .automatic) ) Maybe this link helped you: https://github.com/airbnb/lottie-ios/discussions/1627
Support for repeaters is currently only implemented for the new Core Animation rendering engine, which you currently have to enable manually as mentioned above (in Lottie 4.0 it will be enabled by default). It should be possible to implement repeater support for the Main Thread rendering engine though -- PRs are welcome if anyone wants to give it a shot.
let animation = Animation.named("favourite_car", bundle: .main, subdirectory: nil, animationCache: nil)
self.animationView = AnimationView(animation: animation,
configuration: LottieConfiguration(renderingEngine: .automatica))
animationView!.frame = animatedView.bounds
animationView!.contentMode = .scaleAspectFit
animationView!.loopMode = .loop
animationView!.animationSpeed = 0.5
animatedView.addSubview(animationView!)
animationView!.play()
@FreestyleRR above is the code snippet, but still the same crash.
I've got the same issue.
Lottie/ItemsExtension.swift:83: Fatal error: The Main Thread rendering engine doesn't currently support repeaters. To play an animation with repeaters, you can use the Core Animation rendering engine instead.
just trying to render on a viewController...all it's doing is presenting the animation view.
I am also experiencing this crash while instantiating the animationView like this:
AnimationView(animation: Lottie.lottieLoadingIndicator, configuration: LottieConfiguration(renderingEngine: .automatic)).
Is there anything else that needs to be done?
@kanji-dubizzle Did you resolve the issue on your end?
We could change this to be a warning that prints to console (LottieLogger.shared.warn
) instead of an assertion that crashes in debug (LottieLogger.shared.assertionFailure
). It seems like there were a lot of folks using animations with silently-hidden repeaters, and we shouldn't break their use case.
Is anyone interested in making a pull request for this change? It should be a one-liner 😄
Even after this, the animation is not loaded correctly.
EXPECTED
Yes, https://github.com/airbnb/lottie-ios/pull/1754 only prevents the "unsupported" warning message from crashing the app in debug builds.
@kanji-dubizzle, have you tried playing your animation with the Core Animation rendering engine? That implementation supports repeaters.
@calda
is crashing .coreAnimation, is there anything I am doing wrong?
It looks like your animation uses features that aren't supported yet by the Core Animation rendering engine. What version of Lottie are you using? Could you share a copy of your animation?
3.4.2. Link to animation: https://lottiefiles.com/59461-heart-beat-pop-up
Could you test your animation on the latest version, 3.4.3
?
Still it's same
I'm also having the same problem with an animation file. What makes an animation not work with Core Animation?
i have same problem ,any one find solution
We ended up replacing our animation with one that looks exactly the same but with a different implementation from the designer and got really good results.
I was having the same issue while using Lottie 3.4.3.
Updating to 4.2.0 solved the issue.
Hi, I am getting this error.
Which Version of Lottie are you using?
Lottie 3.4.3
Animation JSON
https://lottiefiles.com/59461-heart-beat-pop-up