-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setNativeExceptionHandler callback is not being invoked on Android #62
Comments
Interesting. So, in some cases (maybe where the nesting is too deep) the exception is caught after the js bridge is destroyed. |
@master-atul, The native handler that is set by the call to |
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. |
Will release your fix in v2.8.9. If that solves the problem, please close this issue. Thanks again 🌮 |
@master-atul my code is :
and the red screen shows as usual and when i check console it prints:
after the error occurs. Can you please assist ? |
@master-atul |
Hi @Louies89 From the readme
If you are seeing red screen, it means you are in dev mode. |
Ooh Sorry, I missed it.... Do not know how. Is there a way to switch from dev mode to bundle mode while doing hot reloading? |
All I was trying to do was a
console.log()
in that callback.The exception that is being triggered is fairly deep in some native View rendering code (originally thrown, I believe, here, and then caught and rethrown here).
At first I set a breakpoint at that
console.log()
using the React Native debugger within Chrome and saw that the breakpoint was never getting reached.Thinking that maybe there was some bad interaction between native code and the React Native debugger, I ran our app under the Android Studio debugger and set a breakpoint immediately before and after the invocation of the callback supplied to
setNativeExceptionHandler
(here). Doing so, I noticed the following message displayed in logcat during that invocation:This could explain why we weren't seeing the result of the execution of that callback.
The text was updated successfully, but these errors were encountered: