Skip to content

Replace deprecated --load-extension with Extensions.loadUnpacked CDP to continue "web-ext run" support in Chrome #3388

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

Open
Rob--W opened this issue Apr 3, 2025 · 2 comments
Assignees

Comments

@Rob--W
Copy link
Member

Rob--W commented Apr 3, 2025

Chrome is looking into removing the --load-extension flag. web-ext run currently relies on --load-extension to load/run an extension and to load a helper extension (whose purpose is to reload the extension on demand). When --load-extension is removed, web-ext run will be unable to load extensions in Chrome (and Chromium based browsers that follow the same implementation).

A supported alternative to --load-extension is the Extensions.loadUnpacked Chrome DevTools Protocol (CDP) command:
https://chromedevtools.github.io/devtools-protocol/tot/Extensions/#method-loadUnpacked

To use this, Chrome's DevTools server has to be set up with --remote-debugging-pipe instead of --remote-debugging-port. But the chrome-launcher library that web-ext relies on right now hardcodes a dependency on --remote-debugging-pipe.

For reference, Puppeteer supports pipes (and port):

Ideally, chrome-launcher would also accept a mechanism to switch to a pipe-based communication.

For visibility, here is an issue about switching to WebDriver BiDi in Firefox: #3351. If the mechanisms to use WebDriver BiDi are similar (without too much overhead/dependencies), it would be nice to use WebDriver BiDi for both. However, since the --load-extension deprecation is landing soon, we should not block on that for this issue.

@oliverdunk
Copy link

Thanks for filing this Rob! We've just confirmed that we are moving forward with this change: https://groups.google.com/a/chromium.org/g/chromium-extensions/c/1-g8EFx2BBY/m/S0ET5wPjCAAJ

@Rob--W
Copy link
Member Author

Rob--W commented Apr 24, 2025

Chrome 137 is scheduled for beta next week (30 april) and targeting release 20 May 2025, per https://chromiumdash.appspot.com/schedule

I'll try to find a weekend or so to look into fixing this.

@Rob--W Rob--W self-assigned this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants