Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

React Native debugging - Maximum call stack size exceeded #900

Closed
nanandn opened this issue Nov 22, 2016 · 62 comments
Closed

React Native debugging - Maximum call stack size exceeded #900

nanandn opened this issue Nov 22, 2016 · 62 comments

Comments

@nanandn
Copy link

nanandn commented Nov 22, 2016

Issue and Steps to Reproduce

Starting the debugger from nuclide and attaching to it results in "Maximum call stack size exceeded" error.

  1. Create a sample app using react-native init.
  2. Start the react native packager in nuclide
  3. Start the debugger in nuclide
  4. Start the application - react-native run-ios
  5. Start Remote JS Debugging from IOS simulator

Versions

  • Atom: 1.12.4
  • Nuclide: 0.183.0
  • Client OS: macOS 10.12.1

Additional Details

  • Installed packages (apm ls --installed):

├── atom-beautify@0.29.13
├── atom-formatter-jsbeautify@1.1.2
├── atom-material-ui@1.3.6
├── autoclose-html@0.23.0
├── git-plus@5.25.3
├── haskell-grammar@0.4.0
├── highlight-selected@0.11.2
├── language-babel@2.48.4
├── language-ini@1.16.0
├── language-ocaml@1.1.2
├── language-swift@0.5.0
├── language-thrift@1.0.2
├── merge-conflicts@1.4.4
├── nuclide@0.183.0
├── nuclide-format-js@0.0.36
├── sort-lines@0.14.0
└── tool-bar@1.0.1

@Marco62
Copy link

Marco62 commented Nov 23, 2016

I have the same problem too!

@matthieugayon
Copy link

same here

@TLadd
Copy link

TLadd commented Nov 27, 2016

I had this issue as well; I was using the latest node version (v7.1.0).
I switched back to v6.3.0 (imagine other versions off 6 would work too, and it worked.

@nanandn
Copy link
Author

nanandn commented Nov 27, 2016

I tried using node v6.9.1. I still see the problem. Doesn't atom have it own node installation? Do I need to change that to use 6.x?

@mithunm93
Copy link

I'm having the same issue. I tried switching my node version to 6.4.0, but no luck because as @nanandn mentioned, atom and apm have their own node installations. @TLadd which node version did you change? If it's the version of atom, how did you do it?

$ apm -v
apm  1.12.9
npm  3.10.5
node 4.4.5
python 2.7.10
git 2.9.3

@TLadd
Copy link

TLadd commented Nov 28, 2016

I didn't do anything with atom's node version; I was referring to the node version used in my console to run

react-native run-ios

@mithunm93
Copy link

This didn't work for me, I was using node v4.5.0 before, and the same error occurs when i switch to v6.3.0. Could you confirm that the node version is indeed the issue? Thanks for your help

@nanandn
Copy link
Author

nanandn commented Nov 29, 2016

Node v6.3.0 didn't fix the issue for me also.

@leochiu-work
Copy link

Same here

@imnnquy
Copy link

imnnquy commented Dec 2, 2016

+1 Same here

@nonameolsson
Copy link

I can agree, I have the same issue. First I thought it was something wrong with Node or something else. I have been using Visual Studio Code for a while, but I'm really eager to switch to Atom again.

The app runs without any problems and debugging from VS Code works. I can start the app and edit it with Atom also. But when attaching Nuclide's debugger to the app it wait on connection, just as it should. The problem is when I enable Remote Debug from the iOS emulator. Then the app crashes and the error occurs.

@JeffreyVest
Copy link

Same. Just getting into React Native. Was following what I thought was the preferred path for editing and was disappointed to find that I can't debug at all due to this issue. I get the getValue(), repeated stack trace like another issue here showed a screen shot of.

@sfeese
Copy link

sfeese commented Dec 5, 2016

+1 same here
different node versions didn't help, I tried 6.3.0, 7.0.0 and 7.2.0

@matthewwithanm
Copy link
Contributor

Hey all, we're aware of issues with debugging React Native. We're currently working on debugging using JSC (instead of Node) so we haven't prioritized fixing the node issues. We're hoping to roll that out within the next few releases (before the holidays). Sorry for the pain.

@johnsonsu We actually are using the system node. You can change which node we use via the "Path to Node" setting in the Nuclide settings. You can try changing that to point to an older version.

@richardkazuomiller
Copy link

@matthewwithanm Which version should we be using?

@fifiteen82726
Copy link

The same issue +1

@theobouwman
Copy link

same issue

@theobouwman
Copy link

same here

2 similar comments
@peter-jozsa
Copy link

same here

@darrenwu
Copy link

same here

@Liruwei
Copy link

Liruwei commented Dec 30, 2016

same issue

1 similar comment
@vinas8
Copy link

vinas8 commented Jan 4, 2017

same issue

@macnux
Copy link

macnux commented Jan 4, 2017

same issue +1

@danbarbarito
Copy link

Same issue.....

@smkhalsa
Copy link

smkhalsa commented Jan 5, 2017

@matthewwithanm any update on this?

@glebovitz
Copy link

so ... where do we go from here?

@dillonykyang
Copy link

same issue here.

@Mentioum
Copy link

same issue.

@StephanPartzsch
Copy link

same here

@wellyshen
Copy link

wellyshen commented Jan 25, 2017

@johnislarry How to upgrade my RN from the master through the "react-native-git-upgrade" command? Or some other appropriate ways?

@johnislarry
Copy link
Contributor

@wellyshen If you're on Android, this guide seems helpful: https://facebook.github.io/react-native/docs/android-building-from-source.html

If not, then you could try asking in the RN repo

@waterstar
Copy link

update your package.json and do a "npm install".
"react-native": "0.42.0-rc.1"

@johnislarry
Copy link
Contributor

The release candidate containing the fix is out, if somebody wants to confirm that this issue doesn't repro anymore.

@MehmetKaplan
Copy link

MehmetKaplan commented Feb 4, 2017

Sorry but bad news. It did not work for me. I hope it is only related with something I did wrong.

The enviroment and the steps that I did are as follows:

===================================================================

Using Mac OS - Sierra 10.12.3

  1. Dowloaded February 2017 Pre-release from https://github.com/facebook/react-native/releases.
  2. Unzip the file
  3. Entered to the extracted directory
  4. Run "npm install”
  5. mv AwesomeProject/ AwesomeProject_backup
  6. react-native init AwesomeProject
  7. mv ./AwesomeProject_backup/images ./AwesomeProject. (These are my project specific files, you can skipo)
  8. mv AwesomeProject_backup/index.ios.js AwesomeProject/ (My project is only iOS for now, you can also move androidd file as well)
  9. Open Atom
  10. Remove existing AwesomeProject folder inside Atom file tree
  11. Re-add AwesomeProject in Atom’s file tree
  12. Command-shift-p then React Native: Start Packager
  13. Command-shift-p then React Native: Start Debugger
  14. Switch to terminal window, run, "react-native run-ios”

screen shot 2017-02-04 at 10 48 20

===================================================================

@nanandn
Copy link
Author

nanandn commented Feb 4, 2017

I tried react-native 0.42.0-rc.1. I don't see the "Maximum call stack size exceeded " error. I am able to start the debugger and connect. I can stop at the breakpoints when the application loads.

But after that my app does not work properly. The application renders. But I can't interact with it. The events are not fired. I have an 'onClick' event registered on one of the views. Those events are not fired. At this point all I can do is quit atom and restart.

Just to confirm that there is nothing wrong with my app... I can debug using chrome developer tools and it works fine.

Anand

@nanandn
Copy link
Author

nanandn commented Feb 4, 2017

I used to see the error "Maximum call stack size exceeded " when I debug using intellij. With react-native 0.42.0-rc.1 I don't see that error anymore.

@waterstar
Copy link

With 0.42.0-rc.1, the problem is fixed for me.

@fsjack
Copy link

fsjack commented Feb 9, 2017

With 0.42.0-rc.1 the "Maximum call stack size exceeded " seem has been fixed, but I got another issue which is that the app is totally freeze when attach to debugger, not only Nuclide but also Chrome debugger as well.

@pishty1
Copy link

pishty1 commented Feb 9, 2017

hello guys, i have downloaded the 0.42.0-rc.1 and did an npm install in the downloaded folder.
react-native -V returns 0.42.0-rc.1,
was wondering what other steps do i need to take.
I changed the react-native's version number in my project's package.json to 0.42.0-rc.1 and did npm install, i get unmet peer dependency for the that version of react native. i know am doing a step wrong somewhere, any help is greatly appreciated. i would love to get the debugger working

update:
here are the new steps am taking now to install 0.42.0-rc.1

  1. download the rn 0.42.0-rc.1 zip file, unzip and run npm install from within the folder
  2. rename the unzipped folder to react-native and move it into the node_modules folder in my project
  3. change the rn version to 0.42.0-rc.1 in the package.json
  4. run npm install from within my project

are these the right steps to take to install 0.42.0-rc.1 ?

@vbence86
Copy link

vbence86 commented Feb 13, 2017

"reach-native": "0.42.0-rc.1" and then npm i fixed the issue for me as well.

@itsthejb
Copy link

Hi all,

Hmmm, well this is fun. Trying to follow the instructions on https://facebook.github.io/react-native/docs/upgrading.html. The react-native-git-upgrade module didn't work, so I tried the alternative steps. Tried to install all RCs 1-3, but I always get the same equivalent error:

# npm install --save react-native@0.42.0-rc.3
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
mobile@0.0.1 /Users/jcrooke/dev/Onboarding/extaisy
└── UNMET PEER DEPENDENCY react-native@0.42.0-rc.3

npm WARN react-native-navbar@1.6.0 requires a peer of react-native@>= 0.16 but none was installed.

I'm an npm-newbie, but doesn't this mean the module is dependent on itself? 💀

@villers
Copy link

villers commented Feb 20, 2017

@vbence86 "react-native": "0.42.0-rc.1"

@jmfirth
Copy link

jmfirth commented Feb 25, 2017

Just wanted to leave a report:

Environment

RN: 0.42.0-rc.3
Atom: 1.14.3
Nuclide: 0.207.0
OS: MacOS

Status

  • Attaches to packager without error
  • Can hit breakpoints before HMR
  • Can hit breakpoints after HMR but maps to an empty source file

@valeriik
Copy link

valeriik commented Mar 18, 2017

For some reason I am not able to start debugger. After selection of "Debug JS Remotely" I see "Starting debugger" status only.
image

Steps to Reproduce

  1. Create a sample app using react-native init.
  2. Start the react native packager in nuclide
  3. Start the debugger in nuclide
  4. Start the application - react-native run-ios
  5. Start Remote JS Debugging from IOS simulator

Environment

  • Atom version: 1.15.0
  • Nuclide package version: 0.210.0
  • React Native version: 0.42.0 / 0.42.0-rc.1 / 0.42.0-rc.3
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info Simulator/Device? - Simulator iOS 10.2 / iOS 8.1
  • OS version? - MacOS 10.12.3
  • Debug/Release? - Debug
  • Community Packages (17)

├── atom-beautify@0.29.17
├── atom-react-native-autocomplete@0.0.27
├── atom-react-native-css@1.1.3
├── busy-signal@1.3.0
├── file-icons@2.0.17
├── flow@0.5.3
├── intentions@1.1.2
├── language-babel@2.56.2
├── language-javascript-jsx@0.3.7
├── linter@2.1.0
├── linter-ui-default@1.2.1
├── minimap@4.26.8
├── nuclide@0.210.0
├── react-es6-snippets@0.3.0
├── react-native-snippets@0.3.0
├── react-snippets@0.7.2
└── redux-snippets@0.2.2

Status

  • Attaches to packager without error
  • Application works fine
  • Can successfully see my logs in chrome debugger
  • But Nuclide debugger did not start

Separate question was created:
https://stackoverflow.com/questions/42807415/nuclide-debugger-does-not-launch-for-react-native

@johnsonsu
Copy link

@valeriik Try starting the packager by checking the option in the "Start debugging" popup

screen shot 2017-03-18 at 9 37 10 pm

@ajostergaard
Copy link

@valeriik did the iOS simulator open a Chrome window for debugging when you started it? If so this will block the port etc etc. You need close that window and try again...

@valeriik
Copy link

@johnsonsu thanks
@ajostergaard with your hint the situation is changed, debugger went into status "The debugee is currently running." (screenshot) BUT I see in simulator blank white screen only (screenshot). For testing purposes I've also created new blank proj, but nothing changed, I see the same white screen only. When I disable "Remote JS Remotely" I see expected screen with working app (screenshot). Can someone advice? Thanks.

@ajostergaard
Copy link

@valeriik given that you are not seeing the dreaded "Maximum call stack size exceeded" I suggest creating a new issue as yours is clearly unrelated.

@ajostergaard
Copy link

@nanandn if I'm not mistake this issue was a React Native issue (something to do with using a different JS engine) and should now be resolved. Is it working for you with the latest RN?

@valeriik
Copy link

valeriik commented Apr 1, 2017

@ajostergaard yes, I am using latest RN ver for now - v0.42.3 (as well as Nuclide v0.214.0 and Atom v1.15.0). I have created separate question regarding the issue with blank white screen using Nuclide debugger. Thanks to all for feedback. I also have a idea to change JS engine in Atom, but fail for now. Maybe someone know how todo it? (so as not to pollute comments on this thread please write your answer on the stackoverflow or on github).

@arled
Copy link

arled commented Oct 13, 2017

And who solved it!?

@Build100
Copy link

Opened the old project for Android. I see the same error. Fixed in package.json
"react": "16.0.0",
"react-native": "0.49.0",
App working.

@mostafaeweda
Copy link
Contributor

This should be fixed with the new RN debugger.

@uchilaka
Copy link

uchilaka commented Dec 4, 2017

I'm using react-native 0.50.4 and I'm experiencing this issue. I happen to work across 2 different machines - both Macs, and I'm seeing the same "maximum stack size exceeded" error. That's what led me to this thread.

I should also mention the following:
OS: macOS High Sierra
NPM: 5.5.1
Node: 8.9.1

I've tried the following:

  • re-installing my node dependencies
  • using yarn vs. npm directly
  • using react-native install on a per-package basis

Not sure where the issue is, or if it's a particular dependency that's the culprit, but here are the contents of my package.json:

{
	"name": "{deleted}",
	"version": "{deleted}",
	"private": true,
	"scripts": {
		"start": "node node_modules/react-native/local-cli/cli.js start",
		"test": "jest",
		"postversion": "react-native-version",
		"android": "react-native run-android",
		"ios": "react-native run-ios"
	},
	"dependencies": {
		"b64-to-blob": "^1.2.19",
		"babel-plugin-transform-decorators-legacy": "^1.3.4",
		"firebase": "^4.2.0",
		"firebase-nest": "^0.7.1",
		"google-libphonenumber": "^3.0.4",
		"mobx": "^3.2.2",
		"mobx-firebase-store": "^1.2.1",
		"mobx-react": "^4.2.2",
		"moment-timezone": "^0.5.13",
		"prop-types": "^15.5.10",
		"react": "16.0.0-alpha.12",
		"react-native": "^0.50.4",
		"react-native-camera": "^0.10.0",
		"react-native-elements": "^0.15.0",
		"react-native-fabric": "^0.5.0",
		"react-native-fetch-blob": "^0.10.8",
		"react-native-fs": "^2.5.1",
		"react-native-google-places-autocomplete": "^1.2.12",
		"react-native-google-sign-in": "^0.0.16",
		"react-native-keychain": "^2.0.0-rc",
		"react-native-loading-spinner-overlay": "^0.5.1",
		"react-native-phone-input": "^0.1.8",
		"react-native-swipeout": "^2.2.2",
		"react-native-vector-icons": "^4.4.2",
		"react-native-version": "^2.3.1",
		"react-navigation": "^1.0.0-beta.11",
		"react-redux": "^5.0.6",
		"redux": "^3.7.2",
		"validator": "^8.1.0"
	},
	"devDependencies": {
		"babel-jest": "20.0.3",
		"babel-preset-react-native": "2.1.0",
		"jest": "20.0.4",
		"react-native-tesseract-ocr": "^1.0.8",
		"react-test-renderer": "16.0.0-alpha.12"
	},
	"jest": {
		"preset": "react-native"
	}
}

@vlimag
Copy link

vlimag commented Dec 6, 2017

you are probably setting state on mount or update of component.
Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests