Skip to content

[Bug] ReanimatedError: Tried to synchronously call a non-worklet function resolveDimension when using react-native-sortables #506

@gopbarbosa

Description

@gopbarbosa

Description

When using react-native-sortables in a simple grid example, the app crashes with the following error:

ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet function resolveDimension on the UI thread.
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-synchronously-call-a-non-worklet-function-on-the-ui-thread for more details.

The error appears immediately after the grid is rendered.
I’m using the component inside a GestureHandlerRootView as described in the documentation.

Steps to reproduce

  1. Clone the repository
  2. Install and build the project

pnpm install
pnpm expo prebuild -p android
expo run:android
pnpm start

  1. Wait for the app to launch on the device or emulator
  2. The error occurs right after the grid renders

Code snippet, Snack or GitHub repository link

https://github.com/gopbarbosa/poc-react-native-sortables

React Native Sortables version

1.9.2

Reanimated version

3.10.1

React Native Gesture Handler version

2.16.1

React Native version

0.74.5

Platforms

Android

Architecture

Paper (Old Architecture)

Workflow

Expo Dev Client

Device

Real device

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions