electron: [Bug]: nodeIntegration=true flag in webPreferences causes screen to blank out
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a bug report that matches the one I want to file, without success.
Electron Version
26.0.0
What operating system are you using?
Ubuntu
Operating System Version
Ubuntu 23.04
What arch are you using?
x64
Last Known Working Electron version
25.5.0
Expected Behavior
Expect app to load normally and remain visible.
Actual Behavior
When using the nodeIntegration: true
in webPreferences the renderer goes blank within 1-2 seconds of app loading. It had been working fine in previous releases.
If I set nodeIntegration: false
the app disappearing stops happening.
Testcase Gist URL
No response
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 14
- Comments: 31 (6 by maintainers)
Commits related to this issue
- :arrow_down: downgrade electron see https://github.com/electron/electron/issues/39515 — committed to karaokemugen/karaokemugen-app by red5h4d0w 10 months ago
- webcord: revert to electron_25, fix #254539 Electron 26 has a bug which causes the app to not display properly. The fix for now is to revert back to 25, until 27 is released, which fixes this issue. ... — committed to huantianad/nixpkgs by huantianad 10 months ago
- webcord: revert to electron_25 (#254588) Electron 26 has a bug which causes the app to not display properly. The fix for now is to revert back to 25, until 27 is released, which fixes this issue. ... — committed to NixOS/nixpkgs by huantianad 10 months ago
I can confirm this bug.
Only happens with electron@26-x-y. With electron@25-x-y and electron@alpha (which right now is 27.0.0-alpha.5) everything works fine. I could only test this on a Linux system.
For test purposes, I created a minimal Electron app: https://github.com/WortgeschichteDigital/MinimalElectronApp. “Hello world!” should disappear after about two seconds. Removing
nodeIntegration: true
on line 21 ofmain.js
does the trick. After that the app won’t crash anymore.Crash dump: Crashpad.zip
BTW, the DevTool window prints the message “DevTools was disconnected from the page” (see image). You have to be fast enough to open them before the app crashes, though. Hope that helps!
+1
Can confirm I also have this exact same issue. Here are my machine specs:
Confirmed still broken on latest Arch Linux with GNOME + Wayland on 26.2.1. Last working stable version is 25.8.0.
I can also confirm this bug. It is happening in only some Linux systems. Windows & macOS seem to be fine.
That would mean that upgrading from Chromium 116 to 117 fixed the issue, given that there are only 3 commits between those 2 nightly versions of v27, two of which are most likely unrelated, see https://github.com/electron/electron/compare/v27.0.0-nightly.20230630...v27.0.0-nightly.20230703 And that that v26 nightly is the last Electron release to feature 115, as the next v26 nightly jumps to Chromium 116, see: https://github.com/electron/electron/compare/v26.0.0-nightly.20230525...v26.0.0-nightly.20230529 In other words, all the affected Electron versions use Chromium 116.
I’m not sure if it’s really useful:
electron-nightly@27.0.0-nightly.20230630
is the last affected buildelectron-nightly@27.0.0-nightly.20230703
and newer work ok. and from other side:electron-nightly@26.0.0-nightly.20230525
was last working build