Skip to content

[Bug]: Dark mode in Devtools is not working on the latest 16.0.0 - 16.0.8 / 17.0.0 #31864

Closed

Description

@andmm

Preflight Checklist

Electron Version

16.0.0 - 16.0.5

What operating system are you using?

Windows

Operating System Version

Windows 7 x64 SP1

What arch are you using?

x64

Last Known Working Electron version

15.3.4

Expected Behavior

Devtools should have a dark mode applied when the settings is set to 'Dark Mode'.

Actual Behavior

When switching to dark mode, it displays the message that 'Devtools requires a reload' but when I click on the reload button it does nothing. Restarting the app has no effect as well and stays on the light mode.

This worked fine on the previous 15.3.2 version.

Testcase Gist URL

No response

Additional Information

One thing I noticed, when updating from the last version (15.3.2) the dev tools will show up with dark mode enabled on the first run but on subsequent runs, it reverts back to light mode.

Activity

  1. added
    bug/regression ↩️
    status/confirmed
    and removed on Nov 16, 2021
  2. ckerr commented on Nov 16, 2021

    @ckerr
    Member

    Looks like this broke sometime between 16.0.0-beta.3 and 16.0.0-beta.4.

    How I tested:

    • select version 16.0.0-beta.3 or 16.0.0-beta.4 in electron-fiddle with a standard unchanged fiddle
    • ctrl-shift-i to open devtools
    • click on gear to change settings
    • in settings sidebar, click 'preferences'
    • under 'Appearance' setting, change 'Theme' to a new value that is not 'system preference', e.g. if current value is 'dark' or 'system preference', choose 'light'
    • ctrl-shift-i to close devtools
    • ctrl-shift-r to force reload
    • ctrl-shift-i to reopen devtools
    • clck gear to change settings again
    • in settings sidebar, click 'preferences' again

    Expected: 'Theme' has the same value as set in previous steps.

    Actual (16.0.0-beta.3): same as expected

    Acutal (16.0.9-beta.4): 'Theme' is now 'System preference' rather than the value set above

  3. ckerr commented on Nov 16, 2021

    @ckerr
    Member
  4. andmm commented on Nov 16, 2021

    @andmm
    Author

    Don't know if this is related but on clicking 'reload dev tools' I'm getting this error message sometimes, not always.

    image

    Browser window was created with barebone options (width, height, preloadScript).

  5. codebytere commented on Nov 17, 2021

    @codebytere
    Member

    22df8ea feels like the most likely culprit i'd say

  6. andmm commented on Dec 1, 2021

    @andmm
    Author

    Still present in the latest 16.0.3 but not on the new 15.3.3.

  7. xbb commented on Dec 1, 2021

    @xbb

    Not only the theme but also other settings like "Preserve log" or "Log XMLHttpRequests", they work but the state don't persist

  8. andriygm commented on Dec 17, 2021

    @andriygm

    I was able to reproduce this bug on Windows 10 and confirmed what @ckerr said about the regress happening between 16.0.0.beta3 and 16.0.0.beta4. I was also able to reproduce this bug on Windows 11 using Electron 18.0.0-nightly.20211209. Devtools in the Electron Fiddle app itself do retain preferences upon closing and reopening the app.

  9. changed the title [-][Bug]: Dark mode in Devtools is not working on the latest 16.0.0[/-] [+][Bug]: Dark mode in Devtools is not working on the latest 16.0.0 - 16.0.5[/+] on Dec 29, 2021
  10. changed the title [-][Bug]: Dark mode in Devtools is not working on the latest 16.0.0 - 16.0.5[/-] [+][Bug]: Dark mode in Devtools is not working on the latest 16.0.0 - 16.0.8 / 17.0.0[/+] on Feb 3, 2022
  11. andmm commented on Feb 3, 2022

    @andmm
    Author

    This problem still persists on the latest 16.0.8 and the newer 17.0.0. Works fine on the 15.x.y branch.

  12. nornagon commented on Feb 3, 2022

    @nornagon
    Contributor

    I'd say this is the culprit: 7ef4e4d

  13. andmm commented on Feb 22, 2022

    @andmm
    Author

    Still happening as of 17.0.1. Now it's giving me another message:

    image

  14. self-assigned this
    on Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

16-x-ybug 🪲bug/regression ↩️component/devtoolsstatus/confirmed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions