question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash in iOS release due to javascritp RangeError: Maximum call stack size exceeded.

See original GitHub issue

Description

When we run our app in release mode for iOS, it crashes with the following stack. We used bundle --minify false to get a better stack trace. The trace contains loadModuleImplementation() function which is defined in metro package. This crash doesn’t happen in Android or debug mode.

2021-11-29 08:18:14.221855-0600 myapp[1194:230119] 8.8.0 - [Firebase/Analytics][I-ACS025028] AdMob and Firebase are in use in this app, but are not linked. For analytics data consistency and integrity, it is highly recommended that you link your AdMob app to the corresponding Firebase app and re-download the GoogleServices-Info.plist file. See https://support.google.com/admob/answer/6383165 for more information.
2021-11-29 08:18:14.222457-0600 myapp[1194:230119] 8.8.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2021-11-29 08:18:14.229414-0600 myapp[1194:229976] [Bugsnag] [INFO] Last run terminated due to a crash.
2021-11-29 08:18:14.265322-0600 myapp[1194:229976] [Bugsnag] [INFO] Sending launch crash synchronously.
2021-11-29 08:18:14.284072-0600 myapp[1194:229976] [native] Running application myapp ({
    initialProps =     {
    };
    rootTag = 1;
})
2021-11-29 08:18:14.328787-0600 myapp[1194:229976] [native] Initializing SQLitePlugin
2021-11-29 08:18:14.328984-0600 myapp[1194:229976] [native] Detected docs path: /var/mobile/Containers/Data/Application/DC8F501F-C8B0-4AED-8B76-D9ACD680898C/Documents
2021-11-29 08:18:14.329066-0600 myapp[1194:229976] [native] Detected Library path: /var/mobile/Containers/Data/Application/DC8F501F-C8B0-4AED-8B76-D9ACD680898C/Library
2021-11-29 08:18:14.329168-0600 myapp[1194:229976] [native] no cloud sync at path: /var/mobile/Containers/Data/Application/DC8F501F-C8B0-4AED-8B76-D9ACD680898C/Library/LocalDatabase
2021-11-29 08:18:14.443775-0600 myapp[1194:230186] 8.8.0 - [Firebase/Analytics][I-ACS023007] Analytics v.8.8.0 started
2021-11-29 08:18:14.443960-0600 myapp[1194:230186] 8.8.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-11-29 08:18:14.444260-0600 myapp[1194:230186] 8.8.0 - [Firebase/Analytics][I-ACS025026] Deferring to Firebase for event data collection
2021-11-29 08:18:14.598558-0600 myapp[1194:230032] 8.8.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-11-29 08:18:14.674145-0600 myapp[1194:230032] 8.8.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
2021-11-29 08:18:14.674418-0600 myapp[1194:230032] 8.8.0 - [Firebase/Analytics][I-ACS023220] Analytics screen reporting is enabled. Call +[FIRAnalytics logEventWithName:FIREventScreenView parameters:] to log a screen view event. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO (boolean) in the Info.plist
2021-11-29 08:18:14.688141-0600 myapp[1194:230182] [javascript] RangeError: Maximum call stack size exceeded.
2021-11-29 08:18:14.692289-0600 myapp[1194:230032] [native] Unhandled JS Exception: RangeError: Maximum call stack size exceeded.
INFO : BSG_KSCrashReport.c:1522: bsg_kscrashreport_writeStandardReport(): Writing crash report to /var/mobile/Containers/Data/Application/DC8F501F-C8B0-4AED-8B76-D9ACD680898C/Library/Application Support/com.bugsnag.Bugsnag/com.myapp.music/v1/KSCrashReports/CrashReport-29F73A7E-1414-4F27-A496-0B2F8DB6E822.json
2021-11-29 08:18:14.873873-0600 myapp[1194:230032] *** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: RangeError: Maximum call stack size exceeded.', reason: 'Unhandled JS Exception: RangeError: Maximum call stack size exceeded., stack:
loadModuleImplementation@174:13
<unknown>@56015:26
loadModuleImplementation@174:13
<unknown>@55915:34
loadModuleImplementation@174:13
<unknown>@55848:54
loadModuleImplementation@174:13
<unknown>@55358:51
loadModuleImplementation@174:13
<unknown>@53689:49
loadModuleImplementation@174:13
<unknown>@800:47
loadModuleImplementation@174:13
guardedLoadModule@96:46
global code@199173:3
'
*** First throw call stack:
(0x181d91cac 0x198e00758 0x100be31c0 0x100c5e03c 0x100c5e964 0x181d208e0 0x181d3c5b8 0x181d7081c 0x100c1275c 0x100c148b4 0x100c14624 0x181a5d2ec 0x181a5e2f0 0x181a0454c 0x181a04ff0 0x181a0eae4 0x1db716f38 0x1db716aa4)
libc++abi: terminating with uncaught exception of type NSException
2021-11-29 08:18:14.875246-0600 myapp[1194:230182] [javascript] Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)

The issue started to happen about 2 weeks ago after updating dependencies, so we roll backed our yarn.lock and begin to interactively update depndencies in our project. So far, I find that the following change will break the app:

git diff yarn.lock|egrep '[\+\-]\s*resolu' > diff-yarn.txt
-  resolution: "@babel/code-frame@npm:7.14.5"
-  resolution: "@babel/compat-data@npm:7.15.0"
-  resolution: "@babel/core@npm:7.15.5"
-  resolution: "@babel/generator@npm:7.15.4"
-  resolution: "@babel/helper-annotate-as-pure@npm:7.15.4"
-  resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.15.4"
+  resolution: "@babel/helper-annotate-as-pure@npm:7.16.0"
-  resolution: "@babel/helper-compilation-targets@npm:7.15.4"
+  resolution: "@babel/helper-builder-binary-assignment-operator-visitor@npm:7.16.0"
-  resolution: "@babel/helper-create-class-features-plugin@npm:7.15.4"
+  resolution: "@babel/helper-create-class-features-plugin@npm:7.16.0"
-  resolution: "@babel/helper-create-regexp-features-plugin@npm:7.14.5"
+  resolution: "@babel/helper-create-regexp-features-plugin@npm:7.16.0"
-  resolution: "@babel/helper-define-polyfill-provider@npm:0.2.3"
+  resolution: "@babel/helper-define-polyfill-provider@npm:0.3.0"
-  resolution: "@babel/helper-explode-assignable-expression@npm:7.15.4"
-  resolution: "@babel/helper-function-name@npm:7.15.4"
+  resolution: "@babel/helper-explode-assignable-expression@npm:7.16.0"
-  resolution: "@babel/helper-get-function-arity@npm:7.15.4"
-  resolution: "@babel/helper-hoist-variables@npm:7.15.4"
-  resolution: "@babel/helper-member-expression-to-functions@npm:7.15.4"
-  resolution: "@babel/helper-module-imports@npm:7.15.4"
-  resolution: "@babel/helper-module-transforms@npm:7.15.7"
-  resolution: "@babel/helper-optimise-call-expression@npm:7.15.4"
-  resolution: "@babel/helper-replace-supers@npm:7.15.4"
-  resolution: "@babel/helper-simple-access@npm:7.15.4"
-  resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.15.4"
-  resolution: "@babel/helper-split-export-declaration@npm:7.15.4"
+  resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.16.0"
-  resolution: "@babel/helpers@npm:7.15.4"
-  resolution: "@babel/highlight@npm:7.14.5"
-  resolution: "@babel/parser@npm:7.15.7"
-  resolution: "@babel/plugin-external-helpers@npm:7.14.5"
+  resolution: "@babel/plugin-external-helpers@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-class-properties@npm:7.14.5"
+  resolution: "@babel/plugin-proposal-class-properties@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-export-default-from@npm:7.14.5"
+  resolution: "@babel/plugin-proposal-export-default-from@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.14.5"
+  resolution: "@babel/plugin-proposal-nullish-coalescing-operator@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.15.6"
+  resolution: "@babel/plugin-proposal-object-rest-spread@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.14.5"
+  resolution: "@babel/plugin-proposal-optional-catch-binding@npm:7.16.0"
-  resolution: "@babel/plugin-proposal-optional-chaining@npm:7.14.5"
+  resolution: "@babel/plugin-proposal-optional-chaining@npm:7.16.0"
-  resolution: "@babel/plugin-syntax-export-default-from@npm:7.14.5"
+  resolution: "@babel/plugin-syntax-export-default-from@npm:7.16.0"
-  resolution: "@babel/plugin-syntax-flow@npm:7.14.5"
+  resolution: "@babel/plugin-syntax-flow@npm:7.16.0"
-  resolution: "@babel/plugin-syntax-jsx@npm:7.14.5"
+  resolution: "@babel/plugin-syntax-jsx@npm:7.16.0"
-  resolution: "@babel/plugin-syntax-typescript@npm:7.14.5"
+  resolution: "@babel/plugin-syntax-typescript@npm:7.16.0"
-  resolution: "@babel/plugin-transform-arrow-functions@npm:7.14.5"
+  resolution: "@babel/plugin-transform-arrow-functions@npm:7.16.0"
-  resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.14.5"
+  resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.16.0"
-  resolution: "@babel/plugin-transform-block-scoping@npm:7.15.3"
+  resolution: "@babel/plugin-transform-block-scoping@npm:7.16.0"
-  resolution: "@babel/plugin-transform-classes@npm:7.15.4"
+  resolution: "@babel/plugin-transform-classes@npm:7.16.0"
-  resolution: "@babel/plugin-transform-computed-properties@npm:7.14.5"
+  resolution: "@babel/plugin-transform-computed-properties@npm:7.16.0"
-  resolution: "@babel/plugin-transform-destructuring@npm:7.14.7"
+  resolution: "@babel/plugin-transform-destructuring@npm:7.16.0"
-  resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.14.5"
+  resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.16.0"
-  resolution: "@babel/plugin-transform-flow-strip-types@npm:7.14.5"
+  resolution: "@babel/plugin-transform-flow-strip-types@npm:7.16.0"
-  resolution: "@babel/plugin-transform-for-of@npm:7.15.4"
+  resolution: "@babel/plugin-transform-for-of@npm:7.16.0"
-  resolution: "@babel/plugin-transform-function-name@npm:7.14.5"
+  resolution: "@babel/plugin-transform-function-name@npm:7.16.0"
-  resolution: "@babel/plugin-transform-literals@npm:7.14.5"
+  resolution: "@babel/plugin-transform-literals@npm:7.16.0"
-  resolution: "@babel/plugin-transform-member-expression-literals@npm:7.14.5"
+  resolution: "@babel/plugin-transform-member-expression-literals@npm:7.16.0"
-  resolution: "@babel/plugin-transform-modules-commonjs@npm:7.15.4"
+  resolution: "@babel/plugin-transform-modules-commonjs@npm:7.16.0"
-  resolution: "@babel/plugin-transform-object-assign@npm:7.14.5"
-  resolution: "@babel/plugin-transform-object-super@npm:7.14.5"
+  resolution: "@babel/plugin-transform-object-super@npm:7.16.0"
-  resolution: "@babel/plugin-transform-parameters@npm:7.15.4"
+  resolution: "@babel/plugin-transform-parameters@npm:7.16.3"
-  resolution: "@babel/plugin-transform-property-literals@npm:7.14.5"
+  resolution: "@babel/plugin-transform-property-literals@npm:7.16.0"
-  resolution: "@babel/plugin-transform-react-display-name@npm:7.15.1"
+  resolution: "@babel/plugin-transform-react-display-name@npm:7.16.0"
-  resolution: "@babel/plugin-transform-react-jsx-self@npm:7.14.9"
+  resolution: "@babel/plugin-transform-react-jsx-self@npm:7.16.0"
-  resolution: "@babel/plugin-transform-react-jsx-source@npm:7.14.5"
+  resolution: "@babel/plugin-transform-react-jsx-source@npm:7.16.0"
-  resolution: "@babel/plugin-transform-react-jsx@npm:7.14.9"
+  resolution: "@babel/plugin-transform-react-jsx@npm:7.16.0"
-  resolution: "@babel/plugin-transform-regenerator@npm:7.14.5"
+  resolution: "@babel/plugin-transform-regenerator@npm:7.16.0"
-  resolution: "@babel/plugin-transform-runtime@npm:7.15.0"
+  resolution: "@babel/plugin-transform-runtime@npm:7.16.4"
-  resolution: "@babel/plugin-transform-shorthand-properties@npm:7.14.5"
+  resolution: "@babel/plugin-transform-shorthand-properties@npm:7.16.0"
-  resolution: "@babel/plugin-transform-spread@npm:7.14.6"
+  resolution: "@babel/plugin-transform-spread@npm:7.16.0"
-  resolution: "@babel/plugin-transform-sticky-regex@npm:7.14.5"
+  resolution: "@babel/plugin-transform-sticky-regex@npm:7.16.0"
-  resolution: "@babel/plugin-transform-template-literals@npm:7.14.5"
+  resolution: "@babel/plugin-transform-template-literals@npm:7.16.0"
-  resolution: "@babel/plugin-transform-typescript@npm:7.15.4"
+  resolution: "@babel/plugin-transform-typescript@npm:7.16.1"
-  resolution: "@babel/plugin-transform-unicode-regex@npm:7.14.5"
+  resolution: "@babel/plugin-transform-unicode-regex@npm:7.16.0"
-  resolution: "@babel/register@npm:7.15.3"
+  resolution: "@babel/register@npm:7.16.0"
-  resolution: "@babel/runtime@npm:7.15.4"
-  resolution: "@babel/template@npm:7.15.4"
-  resolution: "@babel/traverse@npm:7.15.4"
-  resolution: "@babel/types@npm:7.15.6"
-  resolution: "@humanwhocodes/object-schema@npm:1.2.0"
+  resolution: "@humanwhocodes/object-schema@npm:1.2.1"
-  resolution: "@types/node@npm:16.10.2"
+  resolution: "@types/node@npm:16.11.10"
-  resolution: "@types/prettier@npm:2.4.1"
+  resolution: "@types/prettier@npm:2.4.2"
-  resolution: "@types/react@npm:17.0.26"
+  resolution: "@types/react@npm:17.0.37"
-  resolution: "acorn@npm:8.5.0"
+  resolution: "acorn@npm:8.6.0"
-  resolution: "ajv@npm:8.6.3"
+  resolution: "ajv@npm:8.8.2"
+  resolution: "aproba@npm:2.0.0"
+  resolution: "are-we-there-yet@npm:2.0.0"
-  resolution: "array-includes@npm:3.1.3"
-  resolution: "asn1@npm:0.2.4"
+  resolution: "asn1@npm:0.2.6"
-  resolution: "babel-plugin-istanbul@npm:6.0.0"
+  resolution: "babel-plugin-istanbul@npm:6.1.1"
-  resolution: "babel-plugin-polyfill-corejs2@npm:0.2.2"
+  resolution: "babel-plugin-polyfill-corejs2@npm:0.3.0"
-  resolution: "babel-plugin-polyfill-corejs3@npm:0.2.5"
+  resolution: "babel-plugin-polyfill-corejs3@npm:0.4.0"
-  resolution: "babel-plugin-polyfill-regenerator@npm:0.2.2"
+  resolution: "babel-plugin-polyfill-regenerator@npm:0.3.0"
-  resolution: "big-integer@npm:1.6.49"
+  resolution: "big-integer@npm:1.6.51"
-  resolution: "bplist-creator@npm:0.0.8"
+  resolution: "bplist-creator@npm:0.1.0"
-  resolution: "bplist-parser@npm:0.2.0"
+  resolution: "bplist-parser@npm:0.3.0"
-  resolution: "browserslist@npm:4.17.2"
-  resolution: "camelcase@npm:6.2.0"
-  resolution: "caniuse-lite@npm:1.0.30001263"
+  resolution: "camelcase@npm:6.2.1"
-  resolution: "color-string@npm:1.6.0"
+  resolution: "color-string@npm:1.7.4"
-  resolution: "core-js-compat@npm:3.18.1"
+  resolution: "core-js-compat@npm:3.19.1"
-  resolution: "csstype@npm:3.0.9"
+  resolution: "csstype@npm:3.0.10"
-  resolution: "debug@npm:4.3.2"
+  resolution: "debug@npm:4.3.3"
-  resolution: "electron-to-chromium@npm:1.3.857"
-  resolution: "eslint-plugin-react-hooks@npm:4.2.0"
+  resolution: "eslint-plugin-react-hooks@npm:4.3.0"
-  resolution: "eslint-plugin-react@npm:7.26.1"
+  resolution: "eslint-plugin-react@npm:7.27.1"
-  resolution: "estraverse@npm:5.2.0"
+  resolution: "estraverse@npm:5.3.0"
-  resolution: "extsprintf@npm:1.4.0"
+  resolution: "extsprintf@npm:1.4.1"
-  resolution: "fbjs@npm:0.8.17"
+  resolution: "fbjs@npm:0.8.18"
-  resolution: "fbjs@npm:3.0.0"
+  resolution: "fbjs@npm:3.0.1"
-  resolution: "flatted@npm:3.2.2"
+  resolution: "flatted@npm:3.2.4"
+  resolution: "gauge@npm:4.0.0"
-  resolution: "globals@npm:13.11.0"
+  resolution: "globals@npm:13.12.0"
-  resolution: "ignore@npm:5.1.8"
+  resolution: "ignore@npm:5.1.9"
-  resolution: "import-local@npm:3.0.2"
+  resolution: "import-local@npm:3.0.3"
-  resolution: "is-core-module@npm:2.7.0"
-  resolution: "istanbul-lib-coverage@npm:3.0.1"
+  resolution: "istanbul-lib-coverage@npm:3.2.0"
+  resolution: "istanbul-lib-instrument@npm:5.1.0"
-  resolution: "istanbul-lib-source-maps@npm:4.0.0"
+  resolution: "istanbul-lib-source-maps@npm:4.0.1"
-  resolution: "istanbul-reports@npm:3.0.2"
+  resolution: "istanbul-reports@npm:3.0.5"
-  resolution: "lines-and-columns@npm:1.1.6"
+  resolution: "lines-and-columns@npm:1.2.4"
-  resolution: "lodash.clonedeep@npm:4.5.0"
-  resolution: "make-fetch-happen@npm:8.0.14"
+  resolution: "make-fetch-happen@npm:9.1.0"
-  resolution: "makeerror@npm:1.0.11"
+  resolution: "makeerror@npm:1.0.12"
-  resolution: "mime-db@npm:1.50.0"
+  resolution: "mime-db@npm:1.51.0"
-  resolution: "mime-types@npm:2.1.33"
+  resolution: "mime-types@npm:2.1.34"
-  resolution: "mime@npm:2.5.2"
+  resolution: "mime@npm:2.6.0"
-  resolution: "nanocolors@npm:0.2.12"
-  resolution: "node-fetch@npm:2.6.5"
+  resolution: "node-fetch@npm:2.6.6"
-  resolution: "node-gyp@npm:8.2.0"
+  resolution: "node-gyp@npm:8.4.1"
-  resolution: "node-releases@npm:1.1.77"
+  resolution: "npmlog@npm:6.0.0"
-  resolution: "object.entries@npm:1.1.4"
+  resolution: "object.entries@npm:1.1.5"
-  resolution: "object.fromentries@npm:2.0.4"
+  resolution: "object.fromentries@npm:2.0.5"
-  resolution: "object.hasown@npm:1.0.0"
+  resolution: "object.hasown@npm:1.1.0"
-  resolution: "object.values@npm:1.1.4"
-  resolution: "prettier@npm:2.4.1"
+  resolution: "prettier@npm:2.5.0"
-  resolution: "prompts@npm:2.4.1"
+  resolution: "prompts@npm:2.4.2"
-  resolution: "react-devtools-core@npm:4.19.1"
+  resolution: "react-devtools-core@npm:4.21.0"
+  resolution: "readable-stream@npm:3.6.0"
-  resolution: "redux@npm:4.1.1"
-  resolution: "shell-quote@npm:1.7.2"
+  resolution: "shell-quote@npm:1.7.3"
-  resolution: "signal-exit@npm:3.0.5"
+  resolution: "signal-exit@npm:3.0.6"
-  resolution: "simple-plist@npm:1.1.1"
+  resolution: "simple-plist@npm:1.3.0"
-  resolution: "socks-proxy-agent@npm:5.0.1"
+  resolution: "socks-proxy-agent@npm:6.1.1"
-  resolution: "source-map-support@npm:0.5.20"
+  resolution: "source-map-support@npm:0.5.21"
-  resolution: "spdx-license-ids@npm:3.0.10"
+  resolution: "spdx-license-ids@npm:3.0.11"
+  resolution: "string-width@npm:4.2.3"
-  resolution: "string-width@npm:4.2.3"
-  resolution: "string.prototype.matchall@npm:4.0.5"
+  resolution: "string.prototype.matchall@npm:4.0.6"
+  resolution: "string_decoder@npm:1.3.0"
-  resolution: "table@npm:6.7.2"
+  resolution: "table@npm:6.7.3"
-  resolution: "tail@npm:2.2.3"
+  resolution: "tail@npm:2.2.4"
-  resolution: "tsconfig-paths@npm:3.11.0"
+  resolution: "tsconfig-paths@npm:3.12.0"
-  resolution: "ua-parser-js@npm:0.7.28"
+  resolution: "ua-parser-js@npm:0.7.31"
-  resolution: "walker@npm:1.0.7"
+  resolution: "walker@npm:1.0.8"
-  resolution: "wide-align@npm:1.1.3"
+  resolution: "wide-align@npm:1.1.5"
-  resolution: "ws@npm:7.5.5"
+  resolution: "ws@npm:7.5.6"

I can’t find exactly which package caused the issue. Possible reasons:

  1. The maximum stack size of js engine for iOS is too small for a large project.
  2. There is some issue in some third party package listed above.
  3. There is some issue in the recent updates of fbjs, maybe promise.finally polyfill.

Version

0.63.4

Output of react-native info

System: OS: macOS 11.4 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 1.16 GB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 17.0.1 - /usr/local/bin/node Yarn: 3.1.0 - /usr/local/bin/yarn npm: 8.1.0 - /usr/local/bin/npm Watchman: 2021.10.18.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: Not Found Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.4 => 0.63.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

We just build and run a release on iOS devices and get the crash. We haven’t been able to find a minimal reproduce. Maybe someone can help here?

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

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:23 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
halaeicommented, Dec 8, 2021

Hello @ranjithOD We had a js files with almost 500 exports. We just split it into 2 separate js files and the issue was resolved. To me it seems to be an important bug in ReactNative core with probably some other implications than just not supporting too many exports. And to find out what was wrong was really hard. It took me days to figure it out.

2reactions
halaeicommented, Jan 30, 2022

You may use this command to find files in the current directory with too many exports. But it has false positive, because not all the reported files are going to be actually used in the bundle.

egrep -wcR 'export' . | awk -v FS=":" -v OFS="\t" '$2>500 { print $2, $1 }' | sort -hr

Example output with all files being actually OK:

1236        ./node_modules/@babel/types/lib/index-legacy.d.ts
899     ./node_modules/@babel/types/lib/index.js.flow
605     ./node_modules/typescript/lib/tsserverlibrary.d.ts
605     ./node_modules/csstype/index.d.ts
600     ./node_modules/csstype/index.js.flow
568     ./node_modules/typescript/lib/typescript.d.ts
567     ./node_modules/typescript/lib/typescriptServices.d.ts
515     ./node_modules/typescript/lib/tsserverlibrary.js
515     ./node_modules/typescript/lib/tsserver.js
514     ./node_modules/typescript/lib/typescriptServices.js
514     ./node_modules/typescript/lib/typescript.js
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native iOS build release: RangeError: Maximum call ...
After installing react-native-stripe-terminal package, I reverted everything, remove node_modules, Pods folders, reinstall and built to my iOS ...
Read more >
JavaScript RangeError: Maximum Call Stack Size Exceeded
The RangeError: Maximum call stack size exceeded is thrown when a function call is made that exceeds the call stack size. This can...
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
This error is a RangeError. A RangeError typically means an error has occurred outside of a code's argument value for its parameter. Now...
Read more >
How to fix: "RangeError: Maximum call stack size exceeded"
A "RangeError: Maximum call stack size exceeded" is an error that occurs when a function or operation tries to execute too many nested...
Read more >
Uncaught RangeError: Maximum Call Stack Size ... - STechies
The error “Uncaught RangeError: Maximum call stack size exceeded” is common among programmers who work with JavaScript. It happens when the function call ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found