react-native-exception-handler icon indicating copy to clipboard operation
react-native-exception-handler copied to clipboard

Maximum call stack size exceeded (native stack depth)

Open SMKH-PRO opened this issue 3 years ago • 0 comments
trafficstars

I am not sure what's causing this error. When I set JS error handler it throws this error

Maximum call stack size exceeded (native stack depth)

so I console logged inside errorHandler function and found out that this function is being called continuously and this loop is causing call stack size exceed error.

I observed one more thing, when I pass allowInDevMode as false, the error resolves, but when its true the error is back, I haven't tested this on release build yet.

I am setting error handlers outside the component in my App.tsx file.

When I comment // setJSExceptionHandler(errorHandler, true) or when I pass false as the second argument, it works perfectly fine.

maybe I am doing something wrong, I have followed all the instructions in the documentation, attaching an image with error and code snippet for better understanding.

Screenshot 2022-07-25 at 5 16 15 PM

Thanks!

SMKH-PRO avatar Jul 25 '22 12:07 SMKH-PRO