From 86b188cd41286c02c09cecb802d462d3fe04fafc Mon Sep 17 00:00:00 2001 From: roboomp Date: Tue, 14 Jul 2026 20:31:38 +0000 Subject: [PATCH] fix(patches): restored dropped + markers in puppeteer-core patch Eight closing lines of added `.send(...).catch(debugCatchError)` chains in the FrameManager, WebWorker, and #doAcquireWorlds hunks had lost their unified-diff `+` prefix, so they read as context lines. A fresh `bun patch` application searched upstream for those lines in the wrong place and rejected the patch, leaving the un-stealthed puppeteer-core installed. Fixes #5296 --- patches/puppeteer-core@25.3.0.patch | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/patches/puppeteer-core@25.3.0.patch b/patches/puppeteer-core@25.3.0.patch index 0bf86a5b2..7c47c0c1d 100644 --- a/patches/puppeteer-core@25.3.0.patch +++ b/patches/puppeteer-core@25.3.0.patch @@ -352,7 +352,7 @@ index 2322aa136a47b446e2a7b2c4f0bc751f2fb821d0..2116367ee34bb86948bf956c2afa2f69 + client.send('Page.addScriptToEvaluateOnNewDocument', { + source: `//# sourceURL=${PuppeteerURL.INTERNAL_URL}`, + worldName: UTILITY_WORLD_NAME, - }).catch(debugCatchError), ++ }).catch(debugCatchError), ...(frame ? Array.from(this.#scriptsToEvaluateOnNewDocument.values()) : []).map(script => { @@ -445,7 +445,7 @@ index 2322aa136a47b446e2a7b2c4f0bc751f2fb821d0..2116367ee34bb86948bf956c2afa2f69 + worldName: UTILITY_WORLD_NAME, + grantUniveralAccess: true, + }) - .catch(debugCatchError); ++ .catch(debugCatchError); + const utilityId = iso && typeof iso.executionContextId === 'number' ? iso.executionContextId : undefined; + if (utilityId !== undefined) { + this.#onExecutionContextCreated({ @@ -486,7 +486,7 @@ index 2322aa136a47b446e2a7b2c4f0bc751f2fb821d0..2116367ee34bb86948bf956c2afa2f69 + } + } + catch (error) { - debugCatchError(error); ++ debugCatchError(error); + } + } + // xxx-stealth: resolve a frame's MAIN-world execution context id without @@ -511,7 +511,7 @@ index 2322aa136a47b446e2a7b2c4f0bc751f2fb821d0..2116367ee34bb86948bf956c2afa2f69 + expression: 'globalThis', + serializationOptions: { serialization: 'idOnly' }, + }) - .catch(debugCatchError); ++ .catch(debugCatchError); + return parse(globalThis?.result?.objectId); + } + if (utilityId === undefined) { @@ -523,21 +523,21 @@ index 2322aa136a47b446e2a7b2c4f0bc751f2fb821d0..2116367ee34bb86948bf956c2afa2f69 + contextId: utilityId, + serializationOptions: { serialization: 'idOnly' }, + }) - .catch(debugCatchError); ++ .catch(debugCatchError); + const utilDocObjectId = utilDoc?.result?.objectId; + if (typeof utilDocObjectId !== 'string') { + return undefined; + } + const described = await session + .send('DOM.describeNode', { objectId: utilDocObjectId }) - .catch(debugCatchError); ++ .catch(debugCatchError); + const backendNodeId = described?.node?.backendNodeId; + if (typeof backendNodeId !== 'number') { + return undefined; + } + const mainNode = await session + .send('DOM.resolveNode', { backendNodeId }) - .catch(debugCatchError); ++ .catch(debugCatchError); + return parse(mainNode?.object?.objectId); } async #createIsolatedWorld(session, name) { @@ -605,7 +605,7 @@ index 3d68f887920ded269eb641273a5a13dee235ae1d..dcdd86c8697c0dbd2dd2162c9a739dd9 + this.#world.setContext(new ExecutionContext(client, { id }, this.#world)); + } + }) - .catch(debugCatchError); ++ .catch(debugCatchError); this.#client.once('Inspector.workerScriptLoaded', () => { this.#workerLoaded.resolve(); });