React native captureException or captureMessage error


#1

Our team are using sentry with AppCenter codepush and getting crashes when calling captureException/captureMessage.

react-native: 0.51.1
react-native-sentry: 0.38.3
react-native-code-push: 5.4.0

TypeError: null is not an object (evaluating ‘document.location’)

This error is located at:
in CL (created by Connect(CL))
in Connect(CL) (at SceneView.js:17)
in SceneView (at ResourceSavingSceneView.js:55)
in RCTView (at View.js:112)
in View (at ResourceSavingSceneView.js:48)
in RCTView (at View.js:112)
in View (at ResourceSavingSceneView.js:39)
in ResourceSavingSceneView (at TabView.js:35)
in RCTView (at View.js:112)
in View (at TabViewPagerPan.js:251)
in RCTView (at View.js:112)
in View (at createAnimatedComponent.js:134)
in AnimatedComponent (at TabViewPagerPan.js:238)
in TabViewPagerPan (at TabView.js:127)
in RCTView (at View.js:112)
in View (at TabViewAnimated.js:194)
in TabViewAnimated (at TabView.js:192)
in TabView (at withCachedChildNavigation.js:69)
in withCachedChildNavigation(TabView) (at TabNavigator.js:34)
in Unknown (at createNavigator.js:13)
in Navigator (at createNavigationContainer.js:226)
in NavigationContainer (at SceneView.js:17)
in SceneView (at CardStack.js:466)
in RCTView (at View.js:112)
in View (at createAnimatedComponent.js:134)
in AnimatedComponent (at Card.js:12)
in Card (at PointerEventsContainer.js:39)
in Container (at CardStack.js:498)
in RCTView (at View.js:112)
in View (at CardStack.js:414)
in RCTView (at View.js:112)
in View (at CardStack.js:413)
in CardStack (at CardStackTransitioner.js:67)
in RCTView (at View.js:112)
in View (at Transitioner.js:142)
in Transitioner (at CardStackTransitioner.js:19)
in CardStackTransitioner (at StackNavigator.js:41)
in Unknown (at createNavigator.js:13)
in Navigator (at createNavigationContainer.js:226)
in NavigationContainer (at SceneView.js:17)
in SceneView (at SwitchView.js:18)
in SwitchContainer (at withCachedChildNavigation.js:69)
in withCachedChildNavigation(SwitchContainer) (at SwitchNavigator.js:11)
in Unknown (at createNavigator.js:13)
in Navigator (at createNavigationContainer.js:226)
in NavigationContainer (at SceneView.js:17)
in SceneView (at CardStack.js:466)
in RCTView (at View.js:112)
in View (at createAnimatedComponent.js:134)
in AnimatedComponent (at Card.js:12)
in Card (at PointerEventsContainer.js:39)
in Container (at CardStack.js:498)
in RCTView (at View.js:112)
in View (at CardStack.js:414)
in RCTView (at View.js:112)
in View (at CardStack.js:413)
in CardStack (at CardStackTransitioner.js:67)
in RCTView (at View.js:112)
in View (at Transitioner.js:142)
in Transitioner (at CardStackTransitioner.js:19)
in CardStackTransitioner (at StackNavigator.js:41)
in Unknown (at createNavigator.js:13)
in Navigator (at createNavigationContainer.js:226)
in NavigationContainer (at RootNavigation.js:310)
in RootNavigator (created by Connect(RootNavigator))
in Connect(RootNavigator) (at App.js:580)
in PersistGate (at App.js:579)
in Provider (at App.js:578)
in RCTView (at View.js:112)
in View (at App.js:576)
in App (at CodePush.js:510)
in CodePushComponent (at renderApplication.js:35)
in RCTView (at View.js:112)
in View (at AppContainer.js:102)
in RCTView (at View.js:112)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:34)

getLocationHref
tracekit.js:32:50
computeStackTrace
tracekit.js:672:11
captureException
raven.js:525:45
captureException
RavenClient.js:85:27
captureException
Sentry.js:133:66
componentDidMount
ChatList.js:1100:26
commitLifeCycles
ReactNativeFiber-dev.js:2171:16
commitAllLifeCycles
ReactNativeFiber-dev.js:2459:37
_invokeGuardedCallback
ReactNativeFiber-dev.js:73:23
invokeGuardedCallback
ReactNativeFiber-dev.js:47:40
commitAllWork
ReactNativeFiber-dev.js:2485:40
workLoop
ReactNativeFiber-dev.js:2555:68
_invokeGuardedCallback
ReactNativeFiber-dev.js:73:23
invokeGuardedCallback
ReactNativeFiber-dev.js:47:40
performWork
ReactNativeFiber-dev.js:2593:41
scheduleUpdateImpl
ReactNativeFiber-dev.js:2728:101
enqueueSetState
ReactNativeFiber-dev.js:1514:90
setState
react.development.js:242:31
onStateChange
connectAdvanced.js:222:24
dispatch
createStore.js:186:6

PhoneLogin.js:288:51
tryCatch
es6-promise.js:409:20
invokeCallback
es6-promise.js:424:21
publish
es6-promise.js:398:21
flush
es6-promise.js:128:13
_callTimer
JSTimers.js:154:6
callTimers
JSTimers.js:411:17
__callFunction
MessageQueue.js:299:47

MessageQueue.js:111:26
__guard
MessageQueue.js:262:6
callFunctionReturnFlushedQueue
MessageQueue.js:110:17