Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing 'react-native-reanimated/plugin' [3.2.0] #4507

Closed
DavideSegullo opened this issue May 30, 2023 · 25 comments · Fixed by #4511
Closed

Missing 'react-native-reanimated/plugin' [3.2.0] #4507

DavideSegullo opened this issue May 30, 2023 · 25 comments · Fixed by #4511
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@DavideSegullo
Copy link

Description

Hi, I'm trying to install the new release, but there seems to be something missing in the plugin directory.

Obviously my babel configuration is correct, I just updated the library.

image

I took a look at the build, and indeed there seem to be some files missing.

Version 3.1.0:
image

Version 3.2.0:
image

Steps to reproduce

  1. Upgrade to [email protected]
  2. Try to run the app

Snack or a link to a repository

none

Reanimated version

3.2.0

React Native version

0.71.8

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@DavideSegullo DavideSegullo added the Needs review Issue is ready to be reviewed by a maintainer label May 30, 2023
@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Missing repro This issue need minimum repro scenario labels May 30, 2023
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@domenicoprestia
Copy link

Doest it work by downgrading to 3.1.0?

@efstathiosntonas
Copy link
Contributor

efstathiosntonas commented May 30, 2023

Are you using @rnx-kit? If yes, that's the issue on my case. Was going to open a new issue.

Reverting back to old metro.config.js fixed it.

@DavideSegullo
Copy link
Author

Doest it work by downgrading to 3.1.0?

Yes

@DavideSegullo
Copy link
Author

Are you using @rnx-kit? If yes, that's the issue on my case. Was going to open a new issue.

Reverting back to old metro.config.js fixed it.

No

@efstathiosntonas
Copy link
Contributor

@DavideSegullo can you please edit the issue title and add a [3.2.0] as a prefix just for clarity? Thanks!

@DavideSegullo DavideSegullo changed the title Missing 'react-native-reanimated/plugin' Missing 'react-native-reanimated/plugin' [3.2.0] May 30, 2023
@NikitaDudin
Copy link
Contributor

Started work after adding const _WORKLET = global._WORKLET;;
Seems like as errors with scopes of _WORKLET in worklets functions in react-native-reanimated/src/reanimated2/threads.ts.
image

@ajiehatajie
Copy link

Started work after adding const _WORKLET = global._WORKLET;; Seems like as errors with scopes of _WORKLET in worklets functions in react-native-reanimated/src/reanimated2/threads.ts. image

thanks it works

@domenicoprestia
Copy link

Started work after adding const _WORKLET = global._WORKLET;; Seems like as errors with scopes of _WORKLET in worklets functions in react-native-reanimated/src/reanimated2/threads.ts. image

Works for me also, thanks

@qaws5503
Copy link

Confirm this issue too, for now I downgraded to 3.1.0.

@branaust
Copy link

Solution did not work for me. On Reanimated v 3.2.0 and upgraded from 2.14.4

@tomekzaw
Copy link
Member

tomekzaw commented May 31, 2023

Hey @DavideSegullo @efstathiosntonas @NikitaDudin @ajiehatajie @qaws5503 @branaust, thanks for reporting this issue. Could you please check if #4511 fixes your problem?

@radko93
Copy link
Contributor

radko93 commented May 31, 2023

@tomekzaw I just used your patch and it fixes the issue. Thanks for the update!

@tjzel
Copy link
Contributor

tjzel commented May 31, 2023

@DavideSegullo @efstathiosntonas @NikitaDudin @ajiehatajie @qaws5503 @branaust @radko93 our fix seems to be working but we are still not certain what is causing the issue, could you install Reanimated from this branch and tell us what error do you get instead?

@radko93
Copy link
Contributor

radko93 commented May 31, 2023

ReferenceError: Property '_WORKLET' doesn't exist, js engine: hermes

image

@branaust
Copy link

WORKLET also did not exist.

Was able to fix the issue by upgrading to the latest react-native-screens version 3.20.0

@radko93
Copy link
Contributor

radko93 commented May 31, 2023

I was already on the latest RN screens version. What I did today was to update from 2.x to 3.2. I'm not using Expo dev client.

@qaws5503
Copy link

WORKLET also did not exist.

Was able to fix the issue by upgrading to the latest react-native-screens version 3.20.0

My react-native-screens version is also 3.20.0. And will encounter this error.

Will it be realated with Expo? Because I'm using expo-dev-client.

@tomekzaw
Copy link
Member

tomekzaw commented May 31, 2023

Can anyone confirm if the error also happens on web (with react-native-web)? If yes, does the patch from #4511 also resolve it?

@camcnz
Copy link

camcnz commented May 31, 2023

@tomekzaw I have try your fix #4511 but it is causing a new error.

[reports] Main Thread Checker: UI API called on a background thread: -[UIView init]
PID: 56216, TID: 834555, 
Thread name: (none), Queue name: com.facebook.react.ReactNativeKeyboardManagerQueue, QoS: 0

libc++abi: terminating with uncaught exception of type NSException
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', 
reason: 'Modifications to the layout engine must not be performed from a background
thread after it has been accessed from the main thread.'
CoreSimulator 857.14 

image

I have patched the keyboard library (react-native-keyboard-manager) so it runs the actions on the main thread. This has just started with using react-native-reanimated 3.2.0

@tomekzaw
Copy link
Member

tomekzaw commented Jun 1, 2023

Hey @camcnz, thanks for reporting this problem. What version of Reanimated did you upgrade from? Telling from the error "UI API called on a background thread", I'm afraid the root cause of the issue might be located in react-native-keyboard-manager so patching it might be the solution here.

@camcnz
Copy link

camcnz commented Jun 1, 2023

I was updating it from version 2.13.0. I think patching react-native-keyboard-manager is probably the best solution for now.

@abepuentes
Copy link

Hey @tomekzaw, #4511 fix it to me too, expo 48 and RN 0.71

@MarceloPrado
Copy link

#4511 worked like a charm. For those who are new to patching, take a look at patch-package.

You'll need to apply the changes of #4511, run patch-package to generate a patch-file and rebuild your app. If you're using Expo's dev module, this means generating a new build. You may also need to clear your cache.

@DavideSegullo
Copy link
Author

Hey @DavideSegullo @efstathiosntonas @NikitaDudin @ajiehatajie @qaws5503 @branaust, thanks for reporting this issue. Could you please check if #4511 fixes your problem?

Yes, It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.