GithubHelp home page GithubHelp logo

Comments (6)

a7ul avatar a7ul commented on May 24, 2024

@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.

ChristofferKarlsson avatar ChristofferKarlsson commented on May 24, 2024

@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().

https://imgur.com/a/nZIsY

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.

a7ul avatar a7ul commented on May 24, 2024

@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.

ChristofferKarlsson avatar ChristofferKarlsson commented on May 24, 2024

@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.

ChristofferKarlsson avatar ChristofferKarlsson commented on May 24, 2024

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.

a7ul avatar a7ul commented on May 24, 2024

Great ! Thanks for posting it that it works!

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.