{"record":{"id":"ef9ebc68d5d97219","repo":"vuejs/devtools-v6","slug":"inspector-inspectorid-not-found","errorCode":null,"errorMessage":"Inspector ${inspectorId} not found","messagePattern":"Inspector (.+?) not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/app-frontend/src/features/inspector/custom/composable.ts","lineNumber":183,"sourceCode":"  selectedIdsStorage = getStorage(SELECTED_NODES_STORAGE, {})\n\n  bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_LIST, ({ inspectors: list }) => {\n    list.forEach((inspector) => {\n      if (!inspectors.value.some(i => i.id === inspector.id && i.appId === inspector.appId)) {\n        inspectors.value.push(inspectorFactory(inspector))\n      }\n    })\n  })\n\n  bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_ADD, () => {\n    fetchInspectors()\n  })\n\n  bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_TREE, ({ appId, inspectorId, rootNodes }) => {\n    const inspector = inspectors.value.find(i => i.id === inspectorId && i.appId === appId)\n\n    if (!inspector) {\n      console.warn(`Inspector ${inspectorId} not found`)\n      return\n    }\n\n    inspector.rootNodes = rootNodes\n  })\n\n  bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_STATE, ({ appId, inspectorId, state }) => {\n    const inspector = inspectors.value.find(i => i.id === inspectorId && i.appId === appId)\n\n    if (!inspector) {\n      console.warn(`Inspector ${inspectorId} not found`)\n      return\n    }\n\n    inspector.state = parse(state)\n  })\n\n  bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_SELECT_NODE, ({ appId, inspectorId, nodeId }) => {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/vuejs/devtools-v6/blob/dd2ab5d4275187cbd81952a2a3d53c335643c1f4/packages/app-frontend/src/features/inspector/custom/composable.ts#L165-L201","documentation":"The devtools frontend keeps a list of registered custom inspectors. When a TO_FRONT_CUSTOM_INSPECTOR_TREE bridge message arrives from the backend, it looks up the inspector by id AND appId; if none matches, it warns and drops the tree payload. This means the backend sent tree data for an inspector the frontend never registered (or already removed, e.g. after an app switch).","triggerScenarios":"Backend emits TO_FRONT_CUSTOM_INSPECTOR_TREE with an inspectorId that has no matching entry in `inspectors.value` with the same `appId` — unregistered inspector, stale id after reconnect, or appId mismatch when multiple apps are connected.","commonSituations":"Custom inspector registered on a different app than the one emitting the tree; hot-reload clearing frontend inspector state while the backend still pushes updates; backend plugin registration raced ahead of frontend registration.","solutions":["Ensure addCustomInspector is called (and its TO_FRONT registration acknowledged) on the frontend before the backend emits tree events with that id.","Verify the appId passed by the backend matches the app the inspector was registered under.","Re-register inspectors after app reconnect/hot-reload before emitting new tree data.","Log the incoming appId/inspectorId vs the registered list to find the mismatch."],"exampleFix":"// before\nbridge.emit(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_TREE, { inspectorId, rootNodes }) // appId missing\n\n// after\nbridge.emit(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_TREE, { appId: appRecord.id, inspectorId, rootNodes })","handlingStrategy":"try-catch","validationCode":"const inspector = inspectors.value.find(i => i.id === inspectorId && i.appId === appId)\nif (!inspector) return // skip emit or re-register first","typeGuard":"function inspectorExists(list, id, appId) { return list.some(i => i.id === id && i.appId === appId) }","tryCatchPattern":"bridge.on(BridgeEvents.TO_FRONT_CUSTOM_INSPECTOR_TREE, (payload) => {\n  if (!inspectorExists(inspectors.value, payload.inspectorId, payload.appId)) {\n    console.warn('Ignoring tree for unregistered inspector', payload.inspectorId)\n    return\n  }\n  // apply tree\n})","preventionTips":["Register inspectors on the frontend before the backend emits events","Always include the correct appId in bridge payloads","Re-register inspectors after hot-reload or reconnect"],"tags":["inspector","bridge","state-sync","devtools"],"backgroundTag":"inspector-not-registered","analyzedSha":"dd2ab5d4275187cbd81952a2a3d53c335643c1f4","analyzedAt":"2026-08-31T12:41:59.822Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}