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

Error on reload: ERROR Invariant Violation: Failed to call into JavaScript module method RCTEventEmitter.receiveEvent #2027

Closed
sbin1211 opened this issue Feb 4, 2024 · 3 comments
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@sbin1211
Copy link

sbin1211 commented Feb 4, 2024

Description

some users report this issue, and i think it's caused by the React-Native-screens.
facebook/react-native#42640 (comment)

Steps to reproduce

you can reproduce this issue with below repro.
(when you trigger the "reload" inside app, the error happen, but NOT from terminal

https://github.com/sbin1211/RNInvariantViolation.git

Snack or a link to a repository

https://github.com/sbin1211/RNInvariantViolation.git

Screens version

3.29

React Native version

0.73

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided labels Feb 4, 2024
@tboba
Copy link
Member

tboba commented Feb 7, 2024

Hi @sbin1211, thanks for creating this issue!
Unfortunately I cannot reproduce the error with given steps to repro 😕 Could you give us more details about the device you're using where this error happens?

8mb.video-riQ-fSVsSIX3.mp4

@tboba tboba added the Close when stale This issue is going to be closed when there is no activity for a while label Feb 12, 2024
@sbin1211
Copy link
Author

sbin1211 commented Feb 17, 2024

Hi @sbin1211, thanks for creating this issue! Unfortunately I cannot reproduce the error with given steps to repro 😕 Could you give us more details about the device you're using where this error happens?

8mb.video-riQ-fSVsSIX3.mp4

Screen.Recording.2024-02-17.at.15.36.49.mov

@tboba see the screencast, it happens when fabirc turn on and enableScreens(true); but when you change code to enableScreens(false) , the error disappear.

"AwesomeProject" with {"rootTag":1,"initialProps":{"concurrentRoot":true},"fabric":true}

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Feb 17, 2024
@tboba tboba mentioned this issue Mar 7, 2024
8 tasks
@tboba
Copy link
Member

tboba commented Mar 20, 2024

Hi @sbin1211, sorry for the delay 🙏
I still can't reproduce the bug, even if I enabled fabric. Have you tried to reset cache of yarn/npm before running your app? Are you listening for some events?

Also, please take a note that with the newer version of react-native-screens, we will start to use other method for sending events to JS. Could you check if this bug still exists with the version of screens, taken from branch? You just need to change the version from package.json to:

"react-native-screens": "software-mansion/react-native-screens#main"
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants