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
Electron 6.0.0+ does not launch in Windows 10 Dark Mode #378
Comments
Note from the If you add
|
Can confirm that this is an Electron bug, not an issue with |
I'm going to reopen this, because the above Electron bug isn't fixed in the released version of Electron 6.0.0, and the only workaround is to not load any DevTools extensions (and to delete the app's cache directory, to uninstall already-installed extensions). The fix belongs with Electron, but in the meantime this issue. is best left open to track the fact that a vanilla |
I can confirm this issue: Environment:
The app launches correctly after changing to Light mode. Also when build. |
@3zbumban the fix really belongs with Electron, but for the moment you can work around it by not installing devtools (comment out the line which installs the devtools in your Since this bug was shipped in the released version of Electron, I don't know whether @nklayman might want to disable the default behaviour of automatically loading the devtools for the moment in this module? |
@caesar can you explain a little further what you mean by
thank you in advance! |
Electron remembers installed devtools, so just removing the installation which runs on every launch won't delete the already-installed tools. If you find this annoying you can go and 👍 on electron/electron#19468 to upvote that issue. |
@caesar thank you! |
In |
Great, thanks @nklayman! |
Is this still applicable in the latest version of Electron v7.0.0? |
7.0.1 fixed electron/electron#20844, was that the problem? |
@Stanzilla not for me. The electron window show still not up if I enable Have the latest electron installed according to "electron": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-7.0.1.tgz",
"integrity": "sha512-eMFoZIO0+eOAE9FyNC/f0Vp8l/sJziTMK+axEt2XIpGCagom1IZgUKPGwmHUcftZCX5lNKh+Tv53T0GcNnNTKQ==",
"dev": true,
... |
This bug only happens when Windows 10's dark mode is set for apps. "Choose your colour" -> "Custom" Still works, but setting app mode to dark causes the bug to occur. |
yeah i can confirm im getting the same behavior as pre-patch
|
7.1.2 and still facing this error.
|
Any progress on this? Edit: It switches to light mode first, starts the application and concurrently waits for it to finish compiling so it can switch back to dark mode. dark.cmd
light.cmd
electron:serve script:
If the admin prompts to switch the themes are annoying to you, start VSCode as an admin. I don't know how to feel about this but it works 😄 |
Admin rights are not needed to modify these registry variables. Further, running any application (Especially VSCode) as administrator for no reason is a very ignorant recommendation. Below are 3 scripts that can be added to your package.json that will enable light mode, execute electron:serve and then enable dark mode when the electron process ends. They do NOT require admin rights. This COULD actually be merged into just one script but modularity is key, right? "electron:light": "yarn win-light && yarn electron:serve && yarn win-dark",
"win-light": "REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize /v AppsUseLightTheme /t REG_DWORD /d 1 /f",
"win-dark": "REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize /v AppsUseLightTheme /t REG_DWORD /d 0 /f", |
This issue is still relevant in Electron 8.0.0 |
This issue seems to be fixed with 8.2.5! |
@nklayman If you tell folks to use 8.2.5+ or 9.0.0+ you can close this because it's fixed. |
Just confirmed that it does work. I will publish an update to the plugin tomorrow. |
|
Describe the bug
When using
vue-cli-plugin-electron-builder
with the Electron 6.0.0, it hangs and Electron is not launched if Windows 10's dark mode is enabled. It works fine in light mode.This is due to a bug introduced in
electron@6.0.0-beta.14
which causes Electron to hang on launch in Win10 dark mode if any dev tools extensions are installed.VCPEB installs Vue.js Devtools automatically, triggering this bug.
To Reproduce
Steps to reproduce the behaviour:
vue create test
(accept all defaults)cd test
vue add electron-builder
(accept all defaults)npm i electron@6.0.0-beta.15
npm run electron:serve
Expected behaviour
Electron should launch regardless of whether Windows is in Light or Dark mode.
Environment
Additional context
See electron/electron#19468 for the Electron bug which causes this issue.
Workaround for now is to disable the automatic installation of Vue.js Devtools in
background.js
, and delete your app's data directory in%appdata%
to remove already-installed devtools.The text was updated successfully, but these errors were encountered: