question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with sequences on reanimated 2.3.0 stable

See original GitHub issue

I’m getting an error Exception in HostFunction: Javascript worklet error when using sequences on the latest stable version of reanimated (2.3.0)

This code works perfectly on reanimated 2.2.3 but fails on 2.3.0

<MotiView
  animate={{
    translateY: [-10, 10, 0]
  }}
/>

It only fails with sequences, there is no error with the following code

<MotiView
  animate={{
    translateY: 50
  }}
/>

Full Error:

Exception in HostFunction: Javascript worklet error

Error: Javascript worklet error
at _f (native)

Error: Exception in HostFunction: Javascript worklet error

Error: Javascript worklet error
at _f (native)
at _f (native)

reanimated::REAIOSErrorHandler::raiseSpec()
REAIOSErrorHandler.mm:18
reanimated::ErrorHandler::raise()::'lambda'()::operator()()
decltype(std::__1::forwardreanimated::ErrorHandler::raise()::'lambda'()&(fp)()) std::__1::__invokereanimated::ErrorHandler::raise()::'lambda'()&(reanimated::ErrorHandler::raise()::'lambda'()&)
void std::__1::__invoke_void_return_wrapper::__callreanimated::ErrorHandler::raise()::'lambda'()&(reanimated::ErrorHandler::raise()::'lambda'()&)
std::__1::__function::__alloc_func<reanimated::ErrorHandler::raise()::'lambda'(), std::__1::allocatorreanimated::ErrorHandler::raise()::'lambda'(), void ()>::operator()()
std::__1::__function::__func<reanimated::ErrorHandler::raise()::'lambda'(), std::__1::allocatorreanimated::ErrorHandler::raise()::'lambda'(), void ()>::operator()()
std::__1::__function::__value_func<void ()>::operator()() const
std::__1::function<void ()>::operator()() const
reanimated::REAIOSScheduler::scheduleOnUI(std::__1::function<void ()>)
reanimated::ErrorHandler::raise()
reanimated::NativeReanimatedModule::onRender(double)
reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1::operator()(double) const
decltype(std::__1::forward<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1&>(fp)(std::__1::forward(fp0))) std::__1::__invoke<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1&, double>(reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1&, double&&)
void std::__1::__invoke_void_return_wrapper::__call<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1&, double>(reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1&, double&&)
std::__1::__function::__alloc_func<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1, std::__1::allocator<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1>, void (double)>::operator()(double&&)
std::__1::__function::__func<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1, std::__1::allocator<reanimated::NativeReanimatedModule::NativeReanimatedModule(std::__1::shared_ptrfacebook::react::CallInvoker, std::__1::shared_ptrreanimated::Scheduler, std::__1::shared_ptrfacebook::jsi::Runtime, std::__1::shared_ptrreanimated::ErrorHandler, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, int, facebook::jsi::String const&)>, std::__1::shared_ptrreanimated::LayoutAnimationsProxy, reanimated::PlatformDepMethodsHolder)::$_1>, void (double)>::operator()(double&&)
std::__1::__function::__value_func<void (double)>::operator()(double&&) const
std::__1::function<void (double)>::operator()(double) const
invocation function for block in reanimated::createReanimatedModule(RCTBridge*, std::__1::shared_ptrfacebook::react::CallInvoker)::$_2::operator()(std::__1::function<void (double)>, facebook::jsi::Runtime&) const
-[REANodesManager onAnimationFrame:]
DF59392D-5705-3A26-B6C2-32CCCEF4EF48
DF59392D-5705-3A26-B6C2-32CCCEF4EF48
A408A063-A023-3AAA-A674-0FF01607F818
A408A063-A023-3AAA-A674-0FF01607F818
A408A063-A023-3AAA-A674-0FF01607F818
A408A063-A023-3AAA-A674-0FF01607F818
CFRunLoopRunSpecific
GSEventRunModal
F9E6CF6F-3B15-3C66-8C35-951AFD4D0CC4
UIApplicationMain
main
1A4BE407-C230-309B-AEAB-8E9C62BD377A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
nandorojocommented, Dec 10, 2021

Looks like Reanimated 2.3.0 must have some sort of breaking change for sequences.

Also, take a look at the edits I made to your code snippets. You can add tsx after the back ticks to make it format. And you can use the Prettier Chrome extension to prettify the code. Makes it easier to read.

0reactions
nandorojocommented, Dec 21, 2021

Will follow up at #140

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sequences not working · Issue #140 · nandorojo/moti - GitHub
Simple code from examples not working: Raises error: Environment: Bare react-native ... Error with sequences on reanimated 2.3.0 stable #131.
Read more >
Error after buillding React Native on version 0.70
The error is coming because of react-native-reanimated library either remove the library or. Use latest version. And. Go to root folder
Read more >
react-native-reanimated - Bountysource
After upgrading to react-native version 0.65.0 with reanimated 2.2.0 I got the following error: Execution failed for task ':app:mergeDebugAssets'.
Read more >
OFFICIAL: 2.3 Update Notes (LIVE!) - Skullgirls Mobile Forums
Experience the scene of Squigly's reanimation! ... Fixed an issue where hitting a tagging in character with Canopy Bounce would soft lock ...
Read more >
Changes - Apache
coding: utf-8 -*- Changes with Apache 2.3.0 [Remove entries to the current ... Fixed a bug whereby certain sequences of per-directory renegotiations and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found