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

RangeError: Maximum call stack size exceeded, js engine: hermes when upgrading to 0.64 from 0.63.4 #31173

Closed
aprilmintacpineda opened this issue Mar 17, 2021 · 11 comments
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@aprilmintacpineda
Copy link

aprilmintacpineda commented Mar 17, 2021

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

I have upgraded following https://react-native-community.github.io/upgrade-helper/?from=0.63.4&to=0.64.0 but when I run on real devices, I got:

 WARN  Require cycle: node_modules/core-js/internals/microtask.js -> node_modules/core-js/internals/microtask.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 WARN  Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/Blob.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 WARN  Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 WARN  Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/Fetch.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
 ERROR  RangeError: Maximum call stack size exceeded, js engine: hermes
 LOG  Running "my_app" with {"rootTag":1,"initialProps":{}}
 ERROR  Invariant Violation: "my_app" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

This happens both on iOS and Android. I am not sure what's causing the errors. I have cleaned, reinstalled everything, but the error persists.

React Native version:

Please see above

Steps To Reproduce

Still not sure as I have simply upgraded to latest version.

Expected Results

Should still work as it did with 0.63.4

Snack, code example, screenshot, or link to a repository:

N/A

@oleksandr-dziuban
Copy link

I have same when I run react native storybook on Hermes engine on iOS/Android. If I disable Hermes and rebuild app everything is OK

@GoktuqCan
Copy link

I'm having the same error when using react-native-calendars with hermes. If I disable hermes app runs correctly.

@MateusAndrade
Copy link
Contributor

MateusAndrade commented Oct 13, 2021

Disabling the inlineRequires at metro.config, fixed this for me on Android, but I still need to test on iOS. (Testing with rn 0.66.0)

@halaei
Copy link
Contributor

halaei commented Dec 5, 2021

Do you have a js file in your code that has too many exports, e.g 500 exports?

@liebharc
Copy link

We just encountered this issue as well when enabling hermes with react native "0.70.3". We don't have js files with a lot of exports, but we also have warnings due to "Require cycles" in luxon and aws-amplify.

@aurangs7
Copy link

Has anyone found the solution? I am also getting the same error in only Android OS.

Screenshot_1684315281

@liebharc
Copy link

We got this fixed in our case by fixing the required cycles.

More concretely the cycles were within aws-amplify and we could prevent them by never importing aws-amplify but use e.g. @aws-amplify/auth instead.

I could imagine that the exact cause might be different for you @aurangs7 , so it might require some investigation.

@aurangs7
Copy link

@liebharc According to your comment I fixed all the required cycles but still getting that error, it seems related to the babel. it's been 4 days no clue why this happening. debugging it.....

@julianD77
Copy link

We had this issue on updating from RN0.66.5 to 0.72.4 and affecting Android only.

The error we were seeing on launching the App once the bundled had loaded was:

ERROR Warning: React instrumentation encountered an error: RangeError: Maximum call stack size exceeded

We found that the cause was a legacy call to the Babel Polyfill package which was present only in our index.android.js

import '@babel/polyfill';

So we removed this line and following that we no longer hit the error on App launch.

Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Mar 20, 2024
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

8 participants