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

work around startup hang in dev on Win10 dark mode #98

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

cwillisf
Copy link
Contributor

Resolves

This is a workaround for MarshallOfSound/electron-devtools-installer#122 which seems to be a result of electron/electron#19468.

Proposed Changes

The main change is to introduce a bit of code which, on Windows only, deletes the file DevTools Extensions from Electron's internal storage directory. That's pretty hacky, but short of asking the user to change their system settings this seems to be the only reliable workaround for the issues.

While trying to track down the cause of the problem, I ended up making minor improvements to the way we install DevTools extensions. Those changes are in this PR as well, and include:

  • Only install the extensions once instead of once per window.
  • Try to report when extension installation succeeds or fails.
  • Add extensions to help with React performance inspection and Redux debugging.

Reason for Changes

There seem to be two workarounds for the DevTools startup hang:

  • Don't use the "dark mode" app style in Windows 10 settings, or
  • Delete Electron's DevTools Extensions file and/or extensions directory.

Since I don't want to force a user or developer to change their system settings, I opted for the latter option. Also, deleting the DevTools Extensions file should be quicker and possibly more reliable than deleting the directory.

Note that if a user opens the developer panel in a released build, which isn't easy but isn't impossible, they might cause the DevTools Extensions file to be created. If they're using Windows 10 dark mode, the app would then hang on next launch despite not being "officially" in development mode. For that reason, the code to delete the DevTools Extensions file is not inside a check for development mode.

Also, add a few improvements to the way DevTools extensions get
installed.
Copy link

@rschamp rschamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L👤TM

@rschamp rschamp assigned cwillisf and unassigned rschamp Feb 5, 2020
@cwillisf cwillisf merged commit 85ce509 into scratchfoundation:develop Feb 5, 2020
@cwillisf cwillisf deleted the dark-dev-dont-hang branch February 5, 2020 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants