{"record":{"id":"1a7129893ae05c63","repo":"diegosouzapw/OmniRoute","slug":"cdp-page-target-is-not-attached","errorCode":null,"errorMessage":"CDP page target is not attached","messagePattern":"CDP page target is not attached","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/lib/vncSession/harvest.ts","lineNumber":193,"sourceCode":"      }\n    });\n  }\n\n  async attachToPage(targetOrigin: string, signal?: AbortSignal): Promise<void> {\n    const { targetInfos } = await this.send(\"Target.getTargets\", {}, undefined, 10_000, signal);\n    const page = selectPageTarget(targetInfos || [], targetOrigin);\n    const { sessionId } = await this.send(\n      \"Target.attachToTarget\",\n      { targetId: page.targetId, flatten: true },\n      undefined,\n      10_000,\n      signal\n    );\n    this.sessionId = sessionId;\n  }\n\n  async getCookies(url: string, signal?: AbortSignal): Promise<any[]> {\n    if (!this.sessionId) throw new Error(\"CDP page target is not attached\");\n    const result = await this.send(\n      \"Network.getCookies\",\n      { urls: [url] },\n      this.sessionId,\n      10_000,\n      signal\n    );\n    return result.cookies || [];\n  }\n\n  async getDeclaredStorage(\n    keys: readonly string[],\n    signal?: AbortSignal\n  ): Promise<Record<string, string>> {\n    if (!this.sessionId) throw new Error(\"CDP page target is not attached\");\n\n    const expression = `(() => {\n      const keys = ${JSON.stringify([...keys])};","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/vncSession/harvest.ts#L175-L211","documentation":"Error \"CDP page target is not attached\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/vncSession/harvest.ts:193 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":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}