Skip to content

[Bug]: Origin-Agent-Cluster: ?1 on a protocol.handle response crashes the app #56075

Backlog

Description

@charlesjhlee

Preflight Checklist

Electron Version

45.5.0

What operating system(s) are you using?

macOS

Operating System Version

macOS 26.7.1

What arch are you using?

arm64 (including Apple Silicon)

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

A page loaded through protocol.handle on a privileged scheme (standard, secure) and sent with the response header Origin-Agent-Cluster: ?1 loads in an <iframe>.

Actual Behavior

The app crashes as the iframe loads: the main process exits with status 133 (SIGTRAP). Without that one header, the iframe loads and the app keeps running.

Testcase Gist URL

No response

Additional Information

Repro (main.js, run with electron .):

const { app, BrowserWindow, protocol } = require('electron');

protocol.registerSchemesAsPrivileged([
  { scheme: 'appx', privileges: { standard: true, secure: true } },
  { scheme: 'gamex', privileges: { standard: true, secure: true } },
]);

const html = (body) => `<!doctype html><meta charset="utf-8"><title>t</title>${body}`;

app.whenReady().then(() => {
  protocol.handle('appx', () =>
    new Response(html('<iframe src="gamex://game/index.html" width="400" height="300"></iframe>'), {
      headers: { 'content-type': 'text/html' },
    }),
  );
  protocol.handle('gamex', () =>
    new Response(html('<p>framed document</p>'), {
      headers: {
        'content-type': 'text/html',
        // Remove this header and the crash goes away.
        'origin-agent-cluster': '?1',
      },
    }),
  );
  const win = new BrowserWindow({ webPreferences: { sandbox: true, contextIsolation: true } });
  win.loadURL('appx://shell/index.html');
});

Only content-type and origin-agent-cluster are needed. Not tried on Windows or Linux. Chromium 156.0.8078.109.

Activity

  1. github-actions commented on Nov 27, 2026

    @github-actions
    Contributor

    Hello @charlesjhlee. Thanks for taking the time to open an issue and helping to make Electron better!

    This issue was automatically closed because its body does not follow any of this repository's issue templates. Maintainers rely on the sections in those templates to triage issues, and issues that are missing them usually cannot be acted upon.

    To get this issue triaged, please either:

  2. changed the title [-][Bug]: Origin-Agent-Cluster: ?1 on a protocol.handle privileged-scheme document crashes the browser process (45.5.0)[/-] [+][Bug]: Origin-Agent-Cluster: ?1 on a protocol.handle response crashes the app[/+] on Nov 27, 2026
  3. moved this to 👀 Unsorted Items in 45-x-yon Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    • Status
      👀 Unsorted Items

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions