Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object captured as exception with keys: _dispatchInstances, _dispatchListeners #72

Open
anduong96 opened this issue Dec 11, 2024 · 3 comments

Comments

@anduong96
Copy link

I encountered an error while using the FasterImageView component in my React Native application. The error message indicates that an object was captured as an exception with keys: _dispatchInstances, _dispatchListeners.

Error: Object captured as exception with keys: _dispatchInstances, _dispatchListeners
  at FasterImageView.props.onError(app/components/image.resolver/index.tsx:109:32)
  at apply(native)
  at invokeGuardedCallbackImpl(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:22:15)
  at apply(native)
  at invokeGuardedCallback(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:40:34)
  at apply(native)
  at invokeGuardedCallbackAndCatchFirstError(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:53:30)
  at executeDispatch(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:73:42)
  at executeDispatchesAndReleaseTopLevel(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1125:24)
  at call(native)
  at forEachAccumulated(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:361:63)
  at batchedUpdates$argument_0(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1160:25)
  at batchedUpdatesImpl(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:8457:14)
  at batchedUpdates(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1106:30)
  at _receiveRootNodeIDEvent(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1137:17)
  at ReactNativePrivateInterface.RCTEventEmitter.register$argument_0.receiveEvent(node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js:1178:28)
  at apply(native)
  at __callFunction(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:428:32)
  at __guard$argument_0(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:113:26)
  at __guard(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:368:11)
  at callFunctionReturnFlushedQueue(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:112:17)

React Native version: 0.72.4
FasterImage version: 1.7.2

Usage

<FasterImageView
      style={_style as ImageStyle}
      onError={(event) => {
        Sentry.captureException(event.nativeEvent.error);
        Sentry.setContext('imageUrl', { source });
        setHasError(true);
      }}
      source={{
        blurhash: isIos ? imageProps.hash : undefined,
        url: typeof source === 'string' ? source : source.uri,
        cachePolicy: 'discWithCacheControl',
        showActivityIndicator: true,
        resizeMode: resizeMode,
        transitionDuration: 0.2,
        activityColor,
        allowHardware: !isIos,
      }}
    />
@gtokman
Copy link
Member

gtokman commented Dec 11, 2024

@anduong96, thanks for reporting. Did this exception cause a crash?

What version of RN, iOS/Android/, and NE or OA?

@anduong96
Copy link
Author

anduong96 commented Dec 19, 2024

@gtokman The exception did not caused a crash because we handled here:
Sentry.captureException(event.nativeEvent.error);

It's on both iOS and Android
RN version 0.72.4
Release build

What does NE and OA mean?

@anduong96
Copy link
Author

@gtokman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants