{"record":{"id":"5ac157dc3b181e6b","repo":"microsoft/playwright","slug":"element-is-not-a-node","errorCode":null,"errorMessage":"Element is not a node","messagePattern":"Element is not a node","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright-core/src/server/bidi/bidiExecutionContext.ts","lineNumber":145,"sourceCode":"  async releaseHandle(handle: js.JSHandle): Promise<void> {\n    if (!handle._objectId)\n      return;\n    await this._session.send('script.disown', {\n      target: this._target,\n      handles: [handle._objectId],\n    });\n  }\n\n  shouldPrependErrorPrefix(): boolean {\n    return false;\n  }\n\n\n  async nodeIdForElementHandle(handle: dom.ElementHandle): Promise<bidi.Script.SharedReference> {\n    const shared = await this._remoteValueForReference({ handle: handle._objectId });\n    // TODO: store sharedId in the handle.\n    if (!('sharedId' in shared))\n      throw new Error('Element is not a node');\n    return {\n      sharedId: shared.sharedId!,\n    };\n  }\n\n  async remoteObjectForNodeId(context: dom.FrameExecutionContext, nodeId: bidi.Script.SharedReference): Promise<dom.ElementHandle> {\n    const result = await this._remoteValueForReference(nodeId, true);\n    if (!('handle' in result))\n      throw new Error('Can\\'t get remote object for nodeId');\n    return createHandle(context, result) as dom.ElementHandle;\n  }\n\n  async contentFrameIdForFrame(handle: dom.ElementHandle) {\n    const contentWindow = await this._rawCallFunction('e => e.contentWindow', [{ handle: handle._objectId }]);\n    if (contentWindow?.type === 'window')\n      return contentWindow.value.context;\n    return null;\n  }","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/microsoft/playwright/blob/c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6/packages/playwright-core/src/server/bidi/bidiExecutionContext.ts#L127-L163","documentation":"Error \"Element is not a node\" thrown in microsoft/playwright.","triggerScenarios":"Thrown at packages/playwright-core/src/server/bidi/bidiExecutionContext.ts:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c8fc3bf8d31542d59b4d4d9eaab1df93ff541dc6","analyzedAt":"2026-08-12T07:26:36.950Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}