Comments (6)
@ChristofferKarlsson Hi. I see you have added setJSExceptionHandler(errorHandler, true)
. This will not show the red screen in debug mode. Can you help me with a screen shot of the exact error you are getting ?
from react-native-exception-handler.
@master-atul Sure! I am running in debug mode now, in the Android emulator, but I'm only getting the RN red alert. None of the custom alert box.
I'm forcing the error by calling an undefined method this.aaaaa()
.
Full trace from Logcat:
11-27 10:14:25.424 3579-5168/com.xyz.app.app_stg E/ReactNativeJS: TypeError: undefined is not a function (evaluating '_this.aaaaa()')
This error is located at:
in ***** (created by ItemWithSeparator)
in ItemWithSeparator (created by CellRenderer)
in RCTView (created by View)
in View (created by CellRenderer)
in CellRenderer (created by VirtualizedList)
in RCTView (created by View)
in View (created by ScrollView)
in RCTScrollView (created by ScrollView)
in AndroidSwipeRefreshLayout (created by RefreshControl)
in RefreshControl (created by *****ListWithSections)
in ScrollView (created by VirtualizedList)
in VirtualizedList (created by VirtualizedSectionList)
in VirtualizedSectionList (created by SectionList)
in SectionList (created by *****ListWithSections)
in RCTView (created by View)
in View (created by ScreenView)
in ScreenView (created by *****ListWithSections)
in *****ListWithSections (created by *****ListScreen)
in RefreshWhenAppReopened (created by *****ListScreen)
in *****ListScreen (created by SceneView)
in SceneView (created by CardStack)
in RCTView (created by View)
in View (created by CardStack)
in RCTView (created by View)
in View (created by CardStack)
in RCTView (created by View)
in View (created by AnimatedComponent)
in AnimatedComponent (created by Card)
in Card (created by Container)
in Container (created by CardStack)
in RCTView (created by View)
in View (created by CardStack)
in RCTView (created by View)
in View (created by CardStack)
in CardStack (created by Transitioner)
in RCTView (created by View)
in View (created by Transitioner)
in Transitioner (created by CardStackTransitioner)
in CardStackTransitioner
in Unknown (created by Navigator)
in Navigator (created by NavigationContainer)
in NavigationContainer
in Unknown
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer
from react-native-exception-handler.
@ChristofferKarlsson From your screen shot.. it seems like the react native exception module is not initialised. Can you confirm if you have imported xyz.js which contains the setJSExceptionHandler()
into your main program at the very beginning ?
from react-native-exception-handler.
@master-atul Yes, it gets imported there. It's in the same file I call the undefined method. I have tried to move around the setJSExceptionHandler()
in the app, but it makes no difference.
Can I do some debugging in the Android-project to see if it gets initialised?
Edit: Now I somehow get the Alert box again. But the RN red alert screen is always put over it, so I need to dismiss that one before being able to see the custom alert box.
from react-native-exception-handler.
I have now reinstalled and cleaned everything twice. After the second time I got it to work! Sorry for the inconvenience.
from react-native-exception-handler.
Great ! Thanks for posting it that it works!
from react-native-exception-handler.
Related Issues (20)
- How to custom replaceNativeExceptionHandlerBlock on ios with wix/react-native-navigation
- Android not sending fetch in setNativeExceptionHandler HOT 6
- warning and error is not fatal ?
- Not Working with crashlytics HOT 3
- Error not captured: ReferenceError: variable is not defined
- What's the technical reason native exception can't be reported to JS as events?
- Navigate to Contact us screen HOT 1
- change readme to show "deprecated" status
- Question: how to mock? HOT 1
- Is it possible to restart the application from the modal?
- Maximum call stack size exceeded (native stack depth)
- Get ride of default alert when app crash [Android]
- JS Code not beign called on Native Exception Android HOT 1
- Fetch operations not working inside nativehandler HOT 2
- Write log into device memory
- Add example for native Code in Android example
- [QUESTION] Is this library deprecated? HOT 5
- Unable to obtain incorrect message HOT 1
- "Occured" should be "Occurred"
- DefaultErrorScreen in android is not showing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-exception-handler.