Repository navigation
RangeError: Maximum call stack size exceeded, js engine: hermes when upgrading to 0.64 from 0.63.4 #31173
Description
Activity
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
Reacted by Sergei Ivanov and Denis KniazhevDisabling the
inlineRequiresatmetro.config, fixed this for me on Android, but I still need to test on iOS. (Testing with rn 0.66.0)Reacted by Denis Kniazhev and Matt OraczReacted by Chris Bargren and Matt OraczDo you have a js file in your code that has too many exports, e.g 500 exports?
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.
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.
Reacted by aurangs7@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.....
Reacted by Christian Liebhardt and Renish PaghdarWe 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.jsimport '@babel/polyfill';So we removed this line and following that we no longer hit the error on App launch.
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.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Mar 20, 2024 This issue was closed because it has been stalled for 7 days with no activity.

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:
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