Skip to content

feat: remove --disable-component-update from default args #5

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

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

hackardoX
Copy link

@hackardoX hackardoX commented Nov 13, 2024

Similarly to mozilla#3298,
Quoting:

Summarizing the “why” here:
The --disable-component-update command-line flag does two things: it disables component updates (desired) but it also prevents any bundled components from being initialised (undesired).

Disable this flag grant more flexibility, and it can always be disabled via the web-ext run --arg option

@aklinker1 Could you please check this PR? I would like to propagate the change to your vite-plugin-web-extension

@hackardoX
Copy link
Author

Someone in @wxt-dev can review this? 😄

@aklinker1
Copy link
Member

@andrea11 What are "components" in this case? I checked out the original puppeteer PR and chrome bug, but neither gave any context

@hackardoX
Copy link
Author

hackardoX commented Nov 13, 2024

Hi @aklinker1,
The definition of components provided by chromium is:

A component is any element of Chrome's core functionality that is sometimes delivered by the component updater separately from the browser itself, usually as a dynamically-linked library or data file.

In simpler words, components are pieces of chrome (chromium), that add some features or provides some data dynamically. For example, there is the "Autofill States Data" needed to make the chrome autofill working.
(By the way, the list of components can be accessed on chrome visiting the url chrome://components/)

Now, as mentioned in my first comments the --disable-component-update prevents any bundled components from being initialised.

Copy link
Member

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

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

Thanks for the explanation, that makes sense!

@aklinker1
Copy link
Member

Ok so by removing the flag, we're saying that it's ok for the browser to install and initialize these components. Which makes sense for a non-testing/non-automated environment.

What does including the flag break for you?

@hackardoX
Copy link
Author

@aklinker1 I was trying to create an extension using the vite-plugin-web-extension to play with the new (experimental) window.ai API. However, when I started the extension in the dev mode (npm run dev), vite uses web-ext-run to start the browser. Unfortunately, all components are disabled and this prevent me to make the window.ai works (it works fine on my browser when I use npm run build and then install as unpacked extension.
Do you think it is ok to merge this PR?

@aklinker1
Copy link
Member

aklinker1 commented Nov 13, 2024

Yeah, I'll merge it. Just didn't understand the reasoning for it fully, but now I do. I'll merge and release later tonight, on my phone

@aklinker1 aklinker1 merged commit 808f7a1 into wxt-dev:master Nov 14, 2024
@aklinker1
Copy link
Member

aklinker1 commented Nov 14, 2024

@hackardoX hackardoX deleted the feat/component-update branch November 14, 2024 08:39
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

Successfully merging this pull request may close these issues.

2 participants