ShaMan123 / react-native-math-view

Math view for react native! No WebView!
https://github.com/ShaMan123/react-native-math-view
MIT License
79 stars 25 forks source link

Error not rendering in android #41

Closed ShaMan123 closed 3 years ago

ShaMan123 commented 3 years ago

For some unknown reason the error isn't rendered though it is handled correctly.

daiquangduy commented 3 years ago

please fix this error

apoorv-kansal-trysolvio commented 3 years ago

It's causing app to crash(in production). Here is a debug log and app screenshot for reference :

MathView: LaTex parsing Error {"id": "ExtraOpenMissingClose", "math": " \\left( x + \\frac { b } { 2 a } \\right) ^ { \\frac { c } { a } + \\frac { b ^ { \\prime } } { 4 a ^ { 2 } }", "message": "Extra open brace or missing close brace"}
    at anonymous (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:195089:15)
    at RCTView
    at RCTView
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62504:24)
    at AnimatedComponentWrapper
    at TouchableOpacity (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:57754:36)
    at CaptureItem (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:261230:22)
    at RCTView
    at CellRenderer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:66061:22)
    at RCTView
    at RCTScrollView
    at AndroidSwipeRefreshLayout
    at RefreshControl (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:66661:36)
    at ScrollView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:63213:36)
    at VirtualizedList (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:64713:22)
    at FlatList (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62783:36)
    at RCTView
    at SafeAreaView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:74333:41)
    at CaptureList (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:260866:26)
    at ComponentWithNavigation (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115940:38)
    at SceneView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115053:36)
    at RCTView
    at RCTView
    at RCTView
    at CardSheet (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128244:23)
    at RCTView
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62504:24)
    at AnimatedComponentWrapper
    at Handler (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:119029:38)
    at PanGestureHandler (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:123360:34)
    at RCTView
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62504:24)
    at AnimatedComponentWrapper
    at RCTView
    at Card (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:125707:36)
    at CardContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:125383:22)
    at RCTView
    at MaybeScreen (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:124039:24)
    at RCTView
    at MaybeScreenContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:124022:23)
    at CardStack (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:123527:36)
    at KeyboardManager (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128424:36)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128853:24)
    at RCTView
    at GestureHandlerRootView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:118561:24)
    at StackView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:122638:36)
    at StackView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:129009:26)
    at Navigator (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:112700:38)
    at SceneView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115053:36)
    at RCTView
    at RCTView
    at ResourceSavingScene (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:140853:36)
    at RCTView
    at ScreenContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:124235:36)
    at RCTView
    at TabNavigationView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:129445:36)
    at NavigationView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:129665:38)
    at Navigator (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:112700:38)
    at SceneView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115053:36)
    at RCTView
    at RCTView
    at RCTView
    at CardSheet (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128244:23)
    at RCTView
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62504:24)
    at AnimatedComponentWrapper
    at Handler (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:119029:38)
    at PanGestureHandler (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:123360:34)
    at RCTView
    at AnimatedComponent (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:62504:24)
    at AnimatedComponentWrapper
    at RCTView
    at Card (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:125707:36)
    at CardContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:125383:22)
    at RCTView
    at MaybeScreen (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:124039:24)
    at RCTView
    at MaybeScreenContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:124022:23)
    at CardStack (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:123527:36)
    at KeyboardManager (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128424:36)
    at RNCSafeAreaProvider
    at SafeAreaProvider (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:123125:24)
    at SafeAreaProviderCompat (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:128853:24)
    at GestureHandlerRootView
    at GestureHandlerRootView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:118561:24)
    at StackView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:122638:36)
    at StackView (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:129009:26)
    at Navigator (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:112700:38)
    at NavigationContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:116398:38)
    at PersistGate (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:264334:22)
    at Provider (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:180552:21)
    at KeycloakProvider (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:144507:52)
    at App (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:105272:41)
    at RCTView
    at RCTView
    at AppContainer (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:69822:22)

IMG_20210421_005458

ShaMan123 commented 3 years ago

Could you provide a working reproduction?

apoorv-kansal-trysolvio commented 3 years ago

My bad, I was using a much older version that doesn't support Error handling. Just found out while creating repro. After updating the app is not crashing but still error is not rendered

ShaMan123 commented 3 years ago

Could you check both js and native logs for the error?

ShaMan123 commented 3 years ago

fixed 1a37595 publishing to npm

ShaMan123 commented 3 years ago

3.9.0