0

i created a simple react-native app, then can run in ios. but after i enable "Debug JS Remotely", throw below exception, any idea? enter image description here "maximum call stack size exceeded react-native.js:30758:14 "

the project is created by "react-native init AwesomeProject", no other change.

this exception only throw by atom starting debugger, that mean, if i use chrome to debug, all fine. may i miss any setting for atom to debug react native app?

DDark
  • 21
  • 2

2 Answers2

0

Replace the method as the one below in node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js

     callNativeSyncHook(
    moduleID: number,
    methodID: number,
    params: mixed[],
    onFail: ?(...mixed[]) => void,
    onSucc: ?(...mixed[]) => void,
  ): mixed {
    this.processCallbacks(moduleID, methodID, params, onFail, onSucc);
    const isDebuggingEnabled = (typeof atob !== 'undefined');
    if (!isDebuggingEnabled) {
      return global.nativeCallSyncHook(moduleID, methodID, params);
    }
  }

The original solution: https://stackoverflow.com/a/66583605/11317208

jeadonara
  • 1,176
  • 10
  • 10
-1

try to start npm:

npm start

and then "Debug JS Remotely"

Santosh Sharma
  • 2,114
  • 1
  • 17
  • 28