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 does not launch in Win10 dark mode with DevTools extensions installed #19468
Comments
@caesar I can't reproduce with a minimal |
@MarshallOfSound no, it doesn't fail with just I'm afraid that's the most minimal repro I've found so far, as I haven't yet found a way to reproduce without I'm hoping @nklayman might be able to help isolate this as he obviously knows how |
Stepping through with the debugger, the |
@caesar I've stepped through this because it might be a bad issue. Turns out that somehow the vue plugin is causing the app to quit. The plugin itself adds a If you do |
@MarshallOfSound thanks for looking into this! That's pretty weird! A search of the To me two things are weird though:
Do you have any ideas of what could have changed in beta 14 that might affect this, or what could be different in dark mode? |
So turns out the ready listener is actually internal electron chrome extension logic. The actual cause here is something in But that commit has nothing to do with dark mode But also in that changeset is bb0f4fd which is very much to do with dark mode but nothing to do with chrome extensions. I feel like their those are the pieces I'm just missing the glue that puts them together 🤔 |
Curiouser and curiouser! I don't get it either but a couple of thoughts:
Even if I remove the
But it doesn't work with beta.14 either, it's |
I should also note that Vue Devtools does fail to install on |
Electron caches the list of devtools extensions you've installed, completely wipe your electron app data directory after you remove the |
Duh, I should have thought of that. You're right. So that eliminates With that in mind I will post a more minimal testcase shortly. |
vue-cli-plugin-electron-builder
New, minimal repro:
Diff from |
Can 100% confirm this is an Electron bug now: same issue with React Devtools. |
@MarshallOfSound just wondering, since 6.0.0 release seems to be scheduled for tomorrow – this seems like a pretty serious issue, is it considered a blocker for the release? I unfortunately don't have an environment capable of building Electron at the moment or I'd do more to look into this, but I guess a |
Hahaha, looks like I missed the release while writing my comment! |
@caesar Because the issue only comes into play with devtools extensions it's not serious enough to block the release. It's definitely on the list of things to fix though. |
@MarshallOfSound fair enough, makes sense. |
This is blocking us from upgrading. |
@mattyork How? More information would be useful here. My current understanding of this issue is (a) it only impacts developers not end-users and (b) it is easily resolvable by using light mode when booting the app. Obviously, this is an issue and it is on my backlog to look into and fix but it's not a high priority currently. |
The same issue. Uninstalling the
|
@MarshallOfSound it's blocking us from upgrading because of this:
We sometimes use our own debug mode on customers machines, which will install devtools extensions. If a customer, or even one of our own developers, runs into this bug, there's no easy search term given the log messages and the behavior of the app that will lead them to the "turn off dark mode" solution. It's going to be a frustrating time. Plus, based on this thread, it sounds like the exact problem is unclear, so I'm worried this will repro in more cases than what's listed. |
This issue is present in electron |
Since we updated electron we've been hitting the same issue. |
I've been using @wmhilton 's workaround (posted a few comments above) for a while and it works very well. |
I don't get why this painful issue isn't yet solved. The issue is 6 month old and I believe it's affecting a lot of people ? |
I've tried a few workarounds without success (seems I wasn't able to exactly pinpoint when electron creates that file). This only solves your issue if you don't actually need that extension (which I don't) and the default devtools are sufficient.
|
@MarshallOfSound hey there, any news from the team about this? |
Found temporary fix for this, add the following script to package.json
And, instead of using |
This issue is still relevant in Electron 8.0.0 |
We're encountering this issue in our Electron v6 app. Upon investigation: the 'ready' event is firing, but the 'ready' handler Electron attaches to setup the BrowserWindow's extension API is never returning, which means my own app's 'ready' listener is never called
I can work around this issue by prepending my app's startup function to the // ...
// appended listener - app won't launch on Windows
app.once('ready', startUp)
if (config.devtools) app.once('ready', installDevtools)
app.once('window-all-closed', () => app.quit())
// ... // ...
// prepended listener - app is able launch, devtools appear to install correctly
app.prependOnceListener('ready', startUp)
if (config.devtools) app.once('ready', installDevtools)
app.once('window-all-closed', () => app.quit())
// ... |
We've been having the same issue with one of our projects at work. I don't remember when exactly it started, but I finally just went back to light theme. Then a month ago I setup same project on my personal PC, which have been set to dark mode basically since I got it. I'm going going through the motions, starting the app... Took me 15 minutes to realize it's working on a dark mode. Meanwhile still not working on my work machine. I don't know what the difference is. |
Does this still happen on 9.0.0-beta? There is a completely new extensions system natively based on Chromium which removes potential limitations from the JS implementation. |
Updating to Electron 9 should be able to fix this issue, and we are very unlikely to fix a bug that only happens for <= 8. |
see #19468 (comment) |
Preflight Checklist
Issue Details
Expected Behavior
Electron should launch and display a window regardless of whether Windows is in Light or Dark mode.
Actual Behavior
If Windows is in Dark Mode, then Electron will hang on launch if any DevTools extension is installed.
This behaviour only occurs if a devtools extension has been installed on a previous run.
Everything is fine if Windows is in Light mode when the app is launched.
To Reproduce
UPDATED REPRO (see comment history for original version)
$ git clone https://github.com/caesar/electron-darkmode-crash.git $ cd electron-darkmode-crash $ npm i $ npm run start
The above repro contains the following changes from electron-quick-start:master : caesar/electron-darkmode-crash@65ab2a0
Additional Information
I originally thought this might be an issue with
vue-cli-plugin-electron-builder
and filed a bug at nklayman/vue-cli-plugin-electron-builder#378, but that possibility has now been eliminated as simply installing Vue.js Devtools or React Devtools in a clean clone ofelectron-quick-start
is enough to trigger the bug.The text was updated successfully, but these errors were encountered: