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.

(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

image 1 image 2 image 3

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.

Source code

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
knoxgoncommented, May 31, 2020

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.

0reactions
owencmcommented, Mar 18, 2022

FYI for anyone reading in the future, I experienced maximum call stack exceeded and the culprit turned out to be calling const lastNotificationResponse = Notifications.useLastNotificationResponse();

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maximum call stack size exceeded on npm install
First of all you need to make sure that your node and npm versions are up to date. · Delete your node_modules folder...
Read more >
javascript maximum call stack size exceeded Code Example
It is likely that a function with infinite loop is being called.
Read more >
JavaScript Error: Maximum Call Stack Size Exceeded
More specifically, the issue lies with the function calling on itself indefinitely.
Read more >
Why Is My Javascript Bundle So Slow To Download - ADocLib
Maximum call stack size exceeded After downloading Javascript bundle 100 % stuck In your terminal run expo diagnostics and paste the output here....
Read more >
Changelog - Cypress Documentation
Installing Cypress on your system now requires Node.js 14, 16 or 18+. ... The error Maximum call stack size exceeded will no longer...
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