An extension adding a duplicate search engine will prevent the SearchService from initializing
Categories
(Firefox :: Search, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: pierov, Assigned: pierov)
Details
Attachments
(1 file)
We noticed that SearchService
will fail to initialize when an extension tries to install a search engine with the same name as a built-in search engine.
#installExtensionEngine
tries to install the engine, but it fails and throws an exception.
This function is also called in the for (let extension of this.#startupExtensions)
in #loadEngines
, but it does not contain a try-catch.
So, any exception caused by extensions will affect the initialization of the whole SearchService
, and no search engine will be available, not even the built-in ones.
I tried this not in Firefox, but in a fork, but I think the same should happen upstream.
Moreover, I think that if #installExtensionEngine
is called later and it fails in only one of the locales, it leaves the extension in a half-installed state: some locales will be installed, others will not.
Assignee | ||
Comment 1•9 months ago
|
||
Comment 2•8 months ago
|
||
The severity field is not set for this bug.
:standard8, could you have a look please?
For more information, please visit BugBot documentation.
Updated•8 months ago
|
Assignee | ||
Comment 3•8 months ago
|
||
I've updated the patch to address your comments, but I think I'd need some help with the test.
Thank you in advance!
Comment 4•8 months ago
|
||
Yes, sorry, I've just been on PTO for a week, but should get to it in a little bit.
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/39bd64035bbc Prevent exceptions caused by extensions from interrupting the SearchService initialization. r=search-reviewers,Standard8
Comment 6•8 months ago
|
||
bugherder |
Comment 7•6 months ago
|
||
I tried to reproduce this issue with no success.
Could you please provide reproduction steps in order to properly verify this issue?
Thank you.
Assignee | ||
Comment 8•6 months ago
|
||
Hi, I encountered this when developing a fork, but the problem applied to Firefox as well.
In our case, we added Mullvad Leta to the bundled search engines and the Mullvad extension was trying to install it as well.
For testing with Firefox, you would need an addon that for example tries to re-implement Google or another built-in engine (just for testing purposes, but I don't have an easy str).
Description
•