Open yuri-lomashko-itechart opened 1 year ago
I think the right solution here might just be to do something like:
if (!gestureCenterPoint) return;
right after that line, because gestureCenturePoint
can be falsy. Would you mind making a pull request for that change?
Seems like that function returns a null
but isn't getting type-checked properly. This indicates a problem with the typescript setup
We experienced a similar issue in our production app on Android device:
Stack trace as reported to Sentry:
TypeError Cannot read property 'x' of null
/node_modules/@openspacelabs/react-native-zoomable-view/src/ReactNativeZoomableView.tsx in _handlePinching at line 603:28
}
const gestureCenterPoint = calcGestureCenterPoint(e, gestureState);
const zoomCenter = {
x: gestureCenterPoint.x - this.state.originalPageX,
y: gestureCenterPoint.y - this.state.originalPageY,
};
// Uncomment to debug
this.props.debug && this._setPinchDebugPoints(e, zoomCenter);
/node_modules/@openspacelabs/react-native-zoomable-view/src/ReactNativeZoomableView.tsx in anonymous at line 513:27
/node_modules/react-native/Libraries/Interaction/PanResponder.js in onResponderMove at line 522:36
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in invokeGuardedCallbackImpl at line 22:15
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in invokeGuardedCallback at line 40:34
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in invokeGuardedCallbackAndCatchFirstError at line 53:30
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in executeDispatch at line 73:42
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in executeDispatchesAndReleaseTopLevel at line 1125:24
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in forEachAccumulated at line 361:35
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in anonymous at line 1160:25
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in batchedUpdatesImpl at line 8457:14
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in batchedUpdates at line 1106:30
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in _receiveRootNodeIDEvent at line 1137:17
/node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js in receiveTouches at line 1209:30
/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js in __callFunction at line 433:34
/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js in anonymous at line 113:26
/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js in __guard at line 368:11
/node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js in callFunctionReturnFlushedQueue at line 112:17
Description
Hello, I received few crashes from Crashlytics. They appears only in production and I can't reproduce it locally. Probably stacktrace may be useful here
Stacktrace
Environment