reanimated2 error runtime - Javascript worklet error In file: /build/workingdir/build/node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts (29:27)

Hi All

I am using react-native-reanimated 2.2.0. I do not see any issue in android emulator, but seeing issue on android device after publishing app . Error is

RuntimeException: Javascript worklet error In file: /build/workingdir/build/node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts (29:27)

Any help is greatly appreciated.

expo diagnostics output

  Expo CLI 4.10.0 environment info:
    System:
      OS: macOS 11.5.1
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.19.0 - /usr/local/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 7.6.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.0 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.6953283
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~42.0.1 => 42.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: ~0.63.4 => 0.63.4 
      react-native-web: ~0.13.12 => 0.13.18 
    npmGlobalPackages:
      expo-cli: 4.10.0
    Expo Workflow: bare
"expo": "~42.0.1",
    "expo-application": "~3.2.0",
    "expo-asset": "~8.3.3",
    "expo-auth-session": "~3.3.1",
    "expo-av": "~9.2.3",
    "expo-barcode-scanner": "~10.2.2",
    "expo-blur": "~9.0.3",
    "expo-camera": "~11.2.2",
    "expo-cellular": "~3.2.0",
    "expo-constants": "~11.0.1",
    "expo-contacts": "~9.2.5",
    "expo-crypto": "~9.2.0",
    "expo-dev-client": "^0.4.5",
    "expo-device": "~3.3.0",
    "expo-error-recovery": "~2.2.0",
    "expo-file-system": "~11.1.3",
    "expo-image-manipulator": "~9.2.2",
    "expo-image-picker": "~10.2.2",
    "expo-in-app-purchases": "~10.2.0",
    "expo-linear-gradient": "~9.2.0",
    "expo-linking": "~2.3.1",
    "expo-localization": "~10.2.0",
    "expo-location": "~12.1.2",
    "expo-media-library": "~12.1.2",
    "expo-notifications": "~0.12.3",
    "expo-permissions": "~12.1.1",
    "expo-random": "~11.2.0",
    "expo-screen-orientation": "~3.2.1",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-tracking-transparency": "~1.1.2",
    "expo-updates": "~0.8.1",
    "expo-web-browser": "~9.2.0",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "~0.63.4",
    "react-native-reanimated": "~2.2.0",
1 Like

Hey @techpanga, couple questions for ya!

  1. Are you able to reproduce this error locally with your physical device?
  2. How are you building your android binary?

Cheers,
Adam

Thank you for response.

  1. Are you able to reproduce this error locally with your physical device? - Yes in production mode/release mode.
  2. How are you building your android binary? - expo prebuild --clean;eas build:configure;eas build -p android;

Issue is occurring at the starting screen of the app…
In android on emulator, no issues.
In android on device, debug build no issues.
In android on production release mode, app is being crashed throwing this error in sentry.

`

Model Pixel 2 XL (RP1A.201005.004.A1)
Model Id RP1A.201005.004.A1
Name Pixel 2 XL
Kernel Version 4.4.223-g52750b8f2138-ab6846512
Name Android
Rooted no
Version 11(RP1A.201005.004.A1)

`

java.lang.RuntimeException: Javascript worklet error In file: /build/workingdir/build/node_modules/react-native-reanimated/src/reanimated2/UpdateProps.ts (29:27) at com.swmansion.reanimated.AndroidErrorHandler.raise(AndroidErrorHandler.java:6) at com.swmansion.reanimated.Scheduler.triggerUI(Scheduler.java) at com.swmansion.reanimated.Scheduler.access$100(Scheduler.java:9) at com.swmansion.reanimated.Scheduler$1.run(Scheduler.java:21) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

I am using eas build of expo.io to release android aab to submit to play store.

Is there a way to run expo run:android in release mode?

I am trying to locate which animation is causing this problem.

Happy to provide any further information needed. Thanks for looking into this.

expo run:android --variant release

it’s likely that you’re just encountering a bug in reanimated 2, hopefully this will allow you to narrow down the cause more quickly