From 00769091457717f43db1064b6fa93da5d760caf7 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 25 May 2026 22:51:34 -0700 Subject: [PATCH] =?UTF-8?q?[eric]=20windows=201.1.56=20hotfix:=20webReques?= =?UTF-8?q?t.onHeadersReceived=20filter=20uses=20'subFrame'=20(Electron=20?= =?UTF-8?q?camelCase)=20not=20'sub=5Fframe'=20(Chrome=20extension=20snake?= =?UTF-8?q?=5Fcase)=20=E2=80=94=20wrong=20name=20threw=20"Invalid=20type?= =?UTF-8?q?=20sub=5Fframe"=20synchronously=20during=20app.whenReady,=20bec?= =?UTF-8?q?ame=20an=20unhandledRejection,=20prevented=20the=20app=20from?= =?UTF-8?q?=20booting=20on=201.1.55?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main.js | 3 ++- electron/package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/electron/main.js b/electron/main.js index 5a83afaf..4441288f 100644 --- a/electron/main.js +++ b/electron/main.js @@ -1105,7 +1105,8 @@ app.whenReady().then(async () => { // Strip X-Frame-Options and CSP frame-ancestors directives on iframe subframe loads so the Windows BrowserCard iframe fallback (used because tag commit segfaults on Chromium 144 + this Electron 40 CastLabs build) can render sites that normally refuse to be embedded. Scoped to types:['sub_frame'] so OAuth popups, the main app frame, deep-link redirects, and DRM license fetches keep their security headers intact. urls filter limits to http/https so file:// loads of the bundled frontend are untouched. session.defaultSession.webRequest.onHeadersReceived( - { urls: ['http://*/*', 'https://*/*'], types: ['sub_frame'] }, + // Electron's webRequest type name for iframes is 'subFrame' (camelCase), not the Chrome-extension 'sub_frame' — passing the wrong name throws "Invalid type sub_frame" synchronously which becomes an unhandledRejection and prevents the app from booting. + { urls: ['http://*/*', 'https://*/*'], types: ['subFrame'] }, (details, callback) => { const headers = { ...(details.responseHeaders || {}) }; for (const k of Object.keys(headers)) { diff --git a/electron/package.json b/electron/package.json index 4bfdad82..b546b81b 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "openswarm", - "version": "1.1.55", + "version": "1.1.56", "description": "OpenSwarm — AI Agent Orchestrator", "author": "openswarm-ai", "main": "main.js",