{"record":{"id":"648b372ef5577e33","repo":"facebook/react","slug":"354","errorCode":"354","errorMessage":"getInspectorDataForViewAtPoint() is not available in production.","messagePattern":"getInspectorDataForViewAtPoint\\(\\) is not available in production\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-native-renderer/src/ReactNativeFiberInspector.js","lineNumber":196,"sourceCode":"                ...inspectorData,\n                pointerY: locationY,\n                frame: {left: pageX, top: pageY, width, height},\n                touchedViewTag: nativeViewTag,\n                closestPublicInstance,\n              });\n            },\n          );\n        },\n      );\n    } else {\n      console.error(\n        'getInspectorDataForViewAtPoint expects to receive a host component',\n      );\n\n      return;\n    }\n  } else {\n    throw new Error(\n      'getInspectorDataForViewAtPoint() is not available in production.',\n    );\n  }\n}\n\nexport {getInspectorDataForInstance, getInspectorDataForViewAtPoint};\n","sourceCodeStart":178,"sourceCodeEnd":203,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-native-renderer/src/ReactNativeFiberInspector.js#L178-L203","documentation":"The RN Inspector's getInspectorDataForViewAtPoint depends on dev-only renderer hooks (findNodeHandle/inspect internals) that are compiled out of production bundles; when the surrounding dev-tooling branch is absent, calling it throws. It is a tooling API, not an application API - production builds intentionally have no inspector.","triggerScenarios":"Calling getInspectorDataForViewAtPoint (directly or through inspector/overlay libraries) in a production RN bundle where __DEV__ is false and the dev-only machinery is stripped.","commonSituations":"Dev-only inspector integrations left enabled in release builds; QA/overlay tooling that assumes the inspector exists everywhere; libraries calling renderer internals without a __DEV__ guard.","solutions":["Gate every call with if (__DEV__).","Run inspection only against dev/debug builds.","Strip inspector imports from release entry points (Metro transformer / babel plugin) so they are dead-code eliminated."],"exampleFix":"// before\nconst data = getInspectorDataForViewAtPoint(x, y, callback);\n\n// after\nif (__DEV__) {\n  getInspectorDataForViewAtPoint(x, y, callback);\n}","handlingStrategy":"validation","validationCode":"if (__DEV__) {\n  getInspectorDataForViewAtPoint(x, y, callback);\n} else {\n  // inspection is not available in production; skip or degrade gracefully\n}","typeGuard":"const canInspect = () => Boolean(__DEV__);","tryCatchPattern":null,"preventionTips":["Gate all inspector calls with __DEV__.","Use dev builds for inspection workflows.","Strip inspector imports from release entry points so they are dead-code eliminated."],"tags":["react-native","inspector","dev-only-api","production"],"backgroundTag":"dev-only-api-in-production","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}