Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Calling session.defaultSession.webRequest.onHeadersReceived after ready and before window creation causes silent crash #42000

Open
3 tasks done
RobertWHurst opened this issue Apr 30, 2024 · 1 comment
Assignees
Labels
30-x-y 31-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/linux

Comments

@RobertWHurst
Copy link

RobertWHurst commented Apr 30, 2024

Preflight Checklist

Electron Version

30.0.1

What operating system are you using?

Ubuntu

Operating System Version

PopOS 22.04 (based on Ubuntu)

What arch are you using?

x64

Last Known Working Electron version

29.3.1

Expected Behavior

Once electron's ready event has fired I can setup an onHeadersReceived handler for the default session, prior to creating a window.

Actual Behavior

If a onHeadersReceived is registered after the ready event, but before a window is created, then some time later the window is maximized electron will silently crash; the process will simply exit without any log message.

Testcase Gist URL

https://gist.github.com/RobertWHurst/db17ceefd432ab272c4689991263594e

Additional Information

Possibly related to #41839

Note that creating a window before using onHeadersReceived prevents the crash. To see what I mean, load the electron fiddle linked above, and move createWindow() above the call to onHeadersReceived.

@electron-issue-triage electron-issue-triage bot added the has-repro-gist Issue can be reproduced with code at https://gist.github.com/ label Apr 30, 2024
@VerteDinde
Copy link
Member

Hey @RobertWHurst, does this issue persist for you in Electron 30.0.6 or later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
30-x-y 31-x-y bug 🪲 has-repro-gist Issue can be reproduced with code at https://gist.github.com/ platform/linux
Projects
Status: 🛑 Blocks Stable
Status: 🛑 Blocks Stable
Development

No branches or pull requests

3 participants