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]: Segmentation fault when using loadExtension and using updater #32271
Comments
Pulled out a stacktrace: stacktrace
I'll try to dig around more soon. @David-Development do you know if this worked in a previous version? |
@sentialx you may have some thoughts here - this is happening bc electron/shell/browser/electron_browser_client.cc Lines 1368 to 1371 in bd10b19
frame_host - this frame_host however would always be null since we explicitly call it with nullptr : electron/shell/browser/electron_browser_context.cc Lines 331 to 336 in d6de243
(this code was added in #22655) |
@codebytere Thank you for looking into it! I am not aware that it worked in a previous version. I only tested it on Electron 15 and 16 I believe. |
@codebytere Is that the only code path that's calling the webRequest API? If it is, then that's a problem, but if not, then we might want to just add a null check. |
@sentialx i think it might be a little more complex then that because if i add a check for |
@codebytere Maybe this could work? if (!web_request->HasListener() && frame_host) { |
Looks like this has been fixed - no longer reproduces in latest versions. Happy to re-open if begins happening again! |
Preflight Checklist
Electron Version
16.0.5
What operating system are you using?
macOS
Operating System Version
MacOS Monterey 12.0.1
What arch are you using?
x64
Last Known Working Electron version
No response
Expected Behavior
The Electron App should not crash when the updater tries to fetch updates
Actual Behavior
The app crashes (Segmentation fault) as soon as the electron-updater triggers an update. Interestingly enough, the crash only happens in case the loaded chrome extension uses the
webRequest
permission. If you remove thewebRequest
permission the application runs just fine. The crash also only happens in the packaged / release build - probably due to the fact, that the updater doesn't make any request during development.I created a minimal example to reproduce the error. If you run the example app you should see the app starting properly and then it'll crash after about 5 seconds (once the updater makes a network request).
git clone https://github.com/David-Development/electron-quick-start.git cd electron-quick-start npm i npm run pack open ./dist/mac/electron-quick-start.app/Contents/MacOS/electron-quick-start
If you remove the
webRequest
permission from the extensions manifest file it works just fine.I think this might be related to #32258 however the error is different (
EXC_BREAKPOINT
vsEXC_BAD_ACCESS
) therefore I opened a new issue in order not to hijack the thread.Testcase Gist URL
No response
Additional Information
The text was updated successfully, but these errors were encountered: