{"record":{"id":"03deed5367632e0f","repo":"facebook/react","slug":"233","errorCode":"233","errorMessage":"Unsupported top level event type \"${topLevelType}\" dispatched","messagePattern":"Unsupported top level event type \"(.+?)\" dispatched","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-native-renderer/src/ReactNativeBridgeEventPlugin.js","lineNumber":186,"sourceCode":"\nconst ReactNativeBridgeEventPlugin: LegacyPluginModule<AnyNativeEvent> = {\n  eventTypes: {} as EventTypes,\n\n  extractEvents: function (\n    topLevelType: TopLevelType,\n    targetInst: null | Object,\n    nativeEvent: AnyNativeEvent,\n    nativeEventTarget: null | Object,\n  ): ?Object {\n    if (targetInst == null) {\n      // Probably a node belonging to another renderer's tree.\n      return null;\n    }\n    const bubbleDispatchConfig = customBubblingEventTypes[topLevelType];\n    const directDispatchConfig = customDirectEventTypes[topLevelType];\n\n    if (!bubbleDispatchConfig && !directDispatchConfig) {\n      throw new Error(\n        // $FlowFixMe[incompatible-type] - Flow doesn't like this string coercion because DOMTopLevelEventType is opaque\n        `Unsupported top level event type \"${topLevelType}\" dispatched`,\n      );\n    }\n\n    const event = SyntheticEvent.getPooled(\n      bubbleDispatchConfig || directDispatchConfig,\n      targetInst,\n      nativeEvent,\n      nativeEventTarget,\n    );\n    if (bubbleDispatchConfig) {\n      const skipBubbling =\n        event != null &&\n        event.dispatchConfig.phasedRegistrationNames != null &&\n        event.dispatchConfig.phasedRegistrationNames.skipBubbling;\n      if (skipBubbling) {\n        accumulateCapturePhaseDispatches(event);","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-native-renderer/src/ReactNativeBridgeEventPlugin.js#L168-L204","documentation":"React Native's legacy event bridge resolves each incoming native top-level event name against the view-config-derived customBubblingEventTypes / customDirectEventTypes registries; a name present in neither throws at extractEvents time. Concretely, the native side dispatched an event that JS never registered because its ViewManager does not declare it.","triggerScenarios":"A native view dispatches an event whose name is not declared in its ViewManager's event tables: a custom native component emitting an event without registering it (codegen directEvents/bubblingEvents), a casing or spelling mismatch between the native constant and the dispatched name, or an event sent for a node owned by another renderer.","commonSituations":"Custom native modules; adding a native event but not rebuilding/regenerating native code; Fabric codegen event-name differences between iOS and Android; typos in the 'top'-prefixed event constant.","solutions":["Declare the event in the native ViewManager (e.g. the codegen events array with the exact top-prefixed name being dispatched) and rebuild the app.","Verify the event name matches on both sides, case-sensitive, including the top prefix used for registration.","If the target node may belong to another renderer, guard the dispatch on the native side - targetInst == null is ignored, but unregistered event names are not."],"exampleFix":"// before - native view emits 'quantityChanged' but never declares it\n// (RCTEventEmitter receiveEvent(..., 'quantityChanged', ...))\n\n// after - declare it in the codegen spec so JS registers it\n// NativeCounter.js\nexport default codegenNativeComponent('Counter', {\n  interfaceName: 'RCTCounter',\n  events: [{name: 'topQuantityChanged', bubbling: false}],\n});","handlingStrategy":"validation","validationCode":"import {UIManager} from 'react-native';\nfunction isEventRegistered(viewName, eventName) {\n  const viewConfig = UIManager.getViewManagerConfig(viewName);\n  return Boolean(\n    viewConfig?.Manager?.directEventTypes?.[eventName] ||\n      viewConfig?.Manager?.bubblingEventTypes?.[eventName],\n  );\n}\nif (!isEventRegistered('Counter', 'topQuantityChanged')) {\n  throw new Error(\n    'Declare topQuantityChanged on the native ViewManager before dispatching it',\n  );\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Declare every dispatched event in the native ViewManager's codegen spec with the exact top-prefixed name.","Rebuild the native app and clear Metro cache after changing event declarations.","Keep iOS and Android event name constants identical."],"tags":["react-native","events","native-modules","view-manager","event-registration"],"backgroundTag":"unregistered-native-event","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}