{"record":{"id":"85be156b7011286a","repo":"facebook/react","slug":"invalid-renderer-id-rendererid","errorCode":null,"errorMessage":"Invalid renderer id \"${rendererID}\"","messagePattern":"Invalid renderer id \"(.+?)\"","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/react-devtools-shared/src/backend/agent.js","lineNumber":379,"sourceCode":"\n    // By this time, Store should already be initialized and intercept events\n    bridge.send('backendInitialized');\n\n    if (this._isProfiling) {\n      bridge.send('profilingStatus', true);\n    }\n  }\n\n  get rendererInterfaces(): {[key: RendererID]: RendererInterface, ...} {\n    return this._rendererInterfaces;\n  }\n\n  clearErrorsAndWarnings: ({rendererID: RendererID}) => void = ({\n    rendererID,\n  }) => {\n    const renderer = this._rendererInterfaces[rendererID];\n    if (renderer == null) {\n      console.warn(`Invalid renderer id \"${rendererID}\"`);\n    } else {\n      renderer.clearErrorsAndWarnings();\n    }\n  };\n\n  clearErrorsForElementID: ElementAndRendererID => void = ({\n    id,\n    rendererID,\n  }) => {\n    const renderer = this._rendererInterfaces[rendererID];\n    if (renderer == null) {\n      console.warn(`Invalid renderer id \"${rendererID}\"`);\n    } else {\n      renderer.clearErrorsForElementID(id);\n    }\n  };\n\n  clearWarningsForElementID: ElementAndRendererID => void = ({","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-devtools-shared/src/backend/agent.js#L361-L397","documentation":"The DevTools backend Agent keeps a map of renderer interfaces (this._rendererInterfaces) populated when each React renderer injects itself, and routes every bridge message through it. clearErrorsAndWarnings — sent when you clear all errors/warnings, e.g. from the DevTools console panel — looks up this._rendererInterfaces[rendererID]; on a miss it warns `Invalid renderer id \"N\"` and does nothing. The warning means the frontend referenced a renderer the backend no longer has registered.","triggerScenarios":"The DevTools UI sends 'clearErrorsAndWarnings' with a rendererID whose renderer unregistered — the inspected app reloaded, a second root unmounted, or a React Native reload happened — while the frontend still held the old renderer id.","commonSituations":"Page reload with DevTools open and console state persisted; multi-renderer pages (main app plus embedded widget) where one detaches; frontend/backend version skew after updating only the extension.","solutions":["Reload the inspected page (and reopen DevTools) so renderers re-register and the frontend rebuilds its tree.","If you embed DevTools, validate rendererID against agent.rendererInterfaces before sending bridge messages.","Update the React DevTools extension and react-devtools-shared together so the bridge protocol matches.","Ignore the warning when the renderer was intentionally unmounted — the operation is skipped, nothing is corrupted."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Embedder-side: only target renderers the backend actually has.\nconst hasRenderer = (agent: any, rendererID: number) =>\n  Object.prototype.hasOwnProperty.call(agent.rendererInterfaces, rendererID);\n\nif (hasRenderer(agent, rendererID)) {\n  agent.clearErrorsAndWarnings({rendererID});\n}","typeGuard":"function isValidRendererID(agent: any, rendererID: number): boolean {\n  return agent.rendererInterfaces[rendererID] != null;\n}","tryCatchPattern":null,"preventionTips":["Reload the inspected app and DevTools together after unmounting or reloading renderers so ids stay in sync.","Keep the DevTools extension and react-devtools-shared on matching versions.","When embedding DevTools, validate rendererID against agent.rendererInterfaces before sending bridge messages.","Remember the handler skips the operation — a stale id loses the clear action, so retry after re-sync."],"tags":["react-devtools","renderer","bridge","devtools"],"backgroundTag":"unknown-renderer-id","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}