Repository navigation
fix: Enabling developer mode via chrome://extensions - #3905
Open
PatrykKuniczak wants to merge 1 commit into
Open
PatrykKuniczak wants to merge 1 commit into
PatrykKuniczak wants to merge 1 commit into
Conversation
Contributor
Author
|
@Rob--W You've approved my PR, let's clean our mess together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
extensions.ui.developer_modeset via--chromium-prefhas no effect, because Chromeprotects it with a MAC in
Secure Preferences, so a value written to theprofile before startup is discarded. Verified on macOS and Windows.
Solution
After
Extensions.loadUnpacked, ifextensions.ui.developer_modeistrue(the default), open
chrome://extensionsover the CDP pipe, callchrome.developerPrivate.updateProfileConfiguration({inDeveloperMode: true})and close the tab. Failures only log a warning. Setting the pref to
falsestill disables this.
The
--chromium-prefhelp now notes that other protected prefs (e.g.homepage,session.startup_urls) cannot be set this wayThat's uncheck by me, suggested by AI).Tests
Unit tests with a mocked
cdp.sendCommand. Manually tested on Chrome 155(macOS and Windows).
Alternatives
I think it's good idea to create new flag
--chromium-secure-pref, but it's out of scope for this PR.And i'm not really into
chromeandchrome extensionsworld and i don't know what is secure props for real and if this new flag is really necessary.With this PR i only want to fix my mistake from #3664 and make it finally working.
Because we've finally add it to our project(wxt-dev/wxt#2663), but sadly it doesn't work 😢
I hope this can be merged fast, and we'll be finally able to use it during development 😄
Thanks for your work guys, you've been fueling our project.