GithubHelp home page GithubHelp logo

Comments (9)

a7ul avatar a7ul commented on May 29, 2024

Interesting. So, in some cases (maybe where the nesting is too deep) the exception is caught after the js bridge is destroyed.
Do you still see the native exception handler being invoked? @mark-friedman

from react-native-exception-handler.

mark-friedman avatar mark-friedman commented on May 29, 2024

@master-atul, The native handler that is set by the call to Thread.setDefaultUncaughtExceptionHandler() (i.e., within setHandlerforNativeException()) is being invoked. Within that handler it attempts to invoke the JavaScript handler (i.e. callbackHolder). That invocation of the JavaScript handler is what yields the message about the JS callback bridge having been already destroyed.

from react-native-exception-handler.

mark-friedman avatar mark-friedman commented on May 29, 2024

I realize that you might have asking if the native exception UI for react-native-exception-handler (i.e. the DefaultErrorScreen activity) was being shown and the answer to that is yes.

from react-native-exception-handler.

a7ul avatar a7ul commented on May 29, 2024

Will release your fix in v2.8.9. If that solves the problem, please close this issue. Thanks again 🌮

from react-native-exception-handler.

mark-friedman avatar mark-friedman commented on May 29, 2024

@master-atul I'm afraid that my fix (i.e., #67) wasn't for this issue, it was for issue #65.

from react-native-exception-handler.

Louies89 avatar Louies89 commented on May 29, 2024

@master-atul
Hi,
setNativeExceptionHandler call back is nott getting triggered from native module.

my code is :

setNativeExceptionHandler((errorString) => {
  console.log('Unexpected error occurred setNativeExceptionHandler')
},false, true);

and the red screen shows as usual and when i check console it prints:

09-13 19:55:04.320 28936 28936 D ReactNative: CatalystInstanceImpl.destroy() start
09-13 19:55:04.326 28936 28973 D ReactNative: CatalystInstanceImpl.destroy() end
09-13 20:02:28.663 29998 29998 D ReactNative: ReactInstanceManager.ctor()
09-13 20:02:28.696 29998 29998 D ReactNative: ReactInstanceManager.createReactContextInBackground()
09-13 20:02:28.696 29998 29998 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
09-13 20:02:28.697 29998 29998 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
09-13 20:02:28.698 29998 29998 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
09-13 20:02:28.699 29998 29998 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
09-13 20:02:28.738 29998 30028 D ReactNative: ReactInstanceManager.createReactContext()
09-13 20:02:28.892 29998 30028 D ReactNative: Initializing React Xplat Bridge.
09-13 20:02:28.894 29998 30028 D ReactNative: Initializing React Xplat Bridge before initializeBridge
09-13 20:02:28.906 29998 30028 D ReactNative: Initializing React Xplat Bridge after initializeBridge
09-13 20:02:28.906 29998 30028 D ReactNative: CatalystInstanceImpl.runJSBundle()
09-13 20:02:28.908 29998 30045 D ReactNative: ReactInstanceManager.setupReactContext()
09-13 20:02:28.908 29998 30045 D ReactNative: CatalystInstanceImpl.initialize()
09-13 20:02:28.909 29998 30045 D ReactNative: ReactInstanceManager.attachRootViewToInstance()

after the error occurs.

Can you please assist ?

from react-native-exception-handler.

Louies89 avatar Louies89 commented on May 29, 2024

@master-atul
Any update on this ?

from react-native-exception-handler.

a7ul avatar a7ul commented on May 29, 2024

Hi @Louies89

From the readme

NOTE: setNativeExceptionHandler only works in bundled mode - it will show the red screen when applied to dev mode.

If you are seeing red screen, it means you are in dev mode.

from react-native-exception-handler.

Louies89 avatar Louies89 commented on May 29, 2024

Ooh Sorry, I missed it....
Thank you for this. But in dev mode 1st 2 times I got the exception screen.

Do not know how.

Is there a way to switch from dev mode to bundle mode while doing hot reloading?

from react-native-exception-handler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.