Skip to content

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

Open
@Rob--W

Description

@Rob--W

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions