You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runtime crash if easing is used within useAnimationState, error: '[Reanimated] The easing function is not a worklet. Please make sure you import Easing from react-native-reanimated.'
#348
Open
2 of 3 tasks
WookieFPV opened this issue
May 15, 2024
· 2 comments
Hey Fernando,
thanks for your awesome work.
I noticed a crash after updating RN, expo, reanimated und moti.
The app is crashing the error '[Reanimated] The easing function is not a worklet. Please make sure you import Easing from react-native-reanimated.'
This is triggered by a transitionTo() call from useAnimationState().
Its failing because of reanimated runtime validations created in (src/reanimated2/animation/util.ts) PR: software-mansion/react-native-reanimated#5639 and released with reanimated 3.9.0 .
Expected Behavior
To pass the easing runtime validation from reanimated
Steps To Reproduce
Minimal Reproduction:
Copy code and render the component (default export)
Press the red or blue Box
App will crash after 2 clicks
Versions
- Moti: 0.29.0
- Reanimated: 3.11.0
- React Native: 0.74.1
(latest as of now)
Screenshots
No response
Reproduction
The Error happens only on bare RN projects and on the moti/examples/sample expo project.
Could not reproduce it on Snack.
Removing the
node_modules/react-native-reanimated/src/reanimated2/animation/util.ts
I see, so it only fails if you pass it to the value in useAnimatedState's transition for a particular item in a sequence? That's an interesting edge case...it should work directly in the animate prop. I think the reason for this is that useAnimatedState uses a worklet under the hood, and reanimated might not like a main-thread usage of Easing getting passed to worklet memory this way.
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
Hey Fernando,
thanks for your awesome work.
I noticed a crash after updating RN, expo, reanimated und moti.
The app is crashing the error
'[Reanimated] The easing function is not a worklet. Please make sure you import
Easingfrom react-native-reanimated.'
This is triggered by a transitionTo() call from useAnimationState().
Its failing because of reanimated runtime validations created in (src/reanimated2/animation/util.ts) PR: software-mansion/react-native-reanimated#5639 and released with reanimated 3.9.0 .
Expected Behavior
To pass the easing runtime validation from reanimated
Steps To Reproduce
Minimal Reproduction:
Versions
Screenshots
No response
Reproduction
The Error happens only on bare RN projects and on the moti/examples/sample expo project.
Could not reproduce it on Snack.
Removing the
node_modules/react-native-reanimated/src/reanimated2/animation/util.ts
The text was updated successfully, but these errors were encountered: