(Solved) Maximum call stack size exceeded - After downloading Javascript bundle 100% stuck
See original GitHub issue🐛 Bug Report
Environment
Expo CLI 3.21.3 environment info: System: OS: Windows 10 10.0.18362 Binaries: Node: 12.17.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.6.0.0 AI-192.7142.36.36.6241897 npmPackages: expo: ^37.0.12 => 37.0.12 react: ~16.9.0 => 16.9.0 react-dom: ~16.9.0 => 16.9.0 react-native: ^0.61.5 => 0.61.5 react-native-web: ~0.11.7 => 0.11.7
Target OS: Android
Steps to Reproduce
expo start scan QR code with android phone wait for phone to install javascript bundle the js bundle downloading is stuck at 100% after a short while, crash
Expected Behavior
Should view the basic View with some Text It works fine when showing in web browser
It should view my application
Actual Behavior
Maximum call stack size exceeded
Reproducible Demo
package.json { “main”: “node_modules/expo/AppEntry.js”, “scripts”: { “start”: “expo start”, “android”: “expo start --android”, “ios”: “expo start --ios”, “web”: “expo start --web”, “eject”: “expo eject” }, “dependencies”: { “@ant-design/icons”: “^4.2.1”, “@react-native-community/masked-view”: “0.1.6”, “@react-navigation/native”: “^5.5.0”, “@react-navigation/stack”: “^5.4.1”, “expo”: “^37.0.12”, “react”: “~16.9.0”, “react-dom”: “~16.9.0”, “react-native”: “^0.61.4”, “react-native-gesture-handler”: “~1.6.0”, “react-native-reanimated”: “~1.7.0”, “react-native-safe-area-context”: “0.7.3”, “react-native-screens”: “~2.2.0”, “react-native-vector-icons”: “^6.6.0”, “react-native-web”: “~0.11.7” }, “devDependencies”: { “@babel/core”: “^7.8.6”, “babel-preset-expo”: “~8.1.0”, “eslint”: “^6.8.0”, “eslint-config-airbnb”: “^18.1.0”, “eslint-plugin-import”: “^2.20.2”, “eslint-plugin-jsx-a11y”: “^6.2.3”, “eslint-plugin-react”: “^7.20.0”, “eslint-plugin-react-hooks”: “^2.5.1” }, “private”: true }
I couldn’t really figure out the root cause behind this error. I followed the following steps
- Reinstalled npm, node, expo client (android)
- Restarted both computer and phone
- Cleared the cache memory of expo client
It could be one of the installed packages that are incompatible.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Ok - I found the problem
The problem was that I had a json file that was well over 30mb in size. And I had no way of knowing that it was the root cause. The error message did not provide me with enough information to track it. When running on browsers, I did not receive any faulty message or crashes. This exact problem was not present during web deployment.
So the rule of thumb: do not use large json files in React Native, especially when the size is in megabytes.
FYI for anyone reading in the future, I experienced
maximum call stack exceeded
and the culprit turned out to be callingconst lastNotificationResponse = Notifications.useLastNotificationResponse();