Changing of default search engine broken due to overrides not being correctly handled
Categories
(Firefox :: Search, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | verified |
People
(Reporter: edmorales.97, Assigned: standard8)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:86.0) Gecko/20100101 Firefox/86.0
Steps to reproduce:
See Video attached:
- I changed my Search Engine from Google to DuckDuckGo today.
- It changed fine.
- I want to revert to Google, so I went to change it.
- I select Google.
NOTE: Changing to a different Search Engine also doesn't work.
Actual results:
Google shows up as my default Search Engine but when I search, it searches on DuckDuckgo.
Closing and re-opening preferences shows DuckDuckGo as my default search engine.
Expected results:
Google should stay as the default. It seems to not be changing my default.
The dropdown changes the value, but it has no effect.
Reporter | ||
Comment 1•3 years ago
|
||
I can't seem to reproduce the issue on my Firefox Nightly 87, same Mac.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Search' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 3•3 years ago
|
||
Please can you try opening the browser console, and seeing if any errors appear when you try to change the default engine or around that time? Maybe also check just after startup as well.
To open the console go to Tools -> Web Developer -> Browser Console (not the web console).
Reporter | ||
Comment 4•3 years ago
|
||
Thank you! Yes, there is an error. See image: https://ibb.co/jf1ZSQy
Uncaught (in promise) TypeError: can't access property "urls", this._overriddenData is undefined
removeExtensionOverride resource://gre/modules/SearchEngine.jsm:1132
_setEngineDefault resource://gre/modules/SearchService.jsm:2141
set defaultEngine resource://gre/modules/SearchService.jsm:2182
setDefault resource://gre/modules/SearchService.jsm:2206
setDefaultEngine chrome://browser/content/preferences/search.js:602
handleEvent chrome://browser/content/preferences/search.js:367
init chrome://browser/content/preferences/search.js:75
init chrome://browser/content/preferences/preferences.js:105
initializeCategories chrome://browser/content/preferences/findInPage.js:96
init chrome://browser/content/preferences/findInPage.js:52
requestIdleCallback handler*init chrome://browser/content/preferences/findInPage.js:52
init_all chrome://browser/content/preferences/preferences.js:139
EventListener.handleEvent* chrome://browser/content/preferences/preferences.js:111
SearchEngine.jsm:1132:7
TypeError: (destructured parameter) is undefined
Assignee | ||
Comment 5•3 years ago
|
||
Thank you for that, it is very useful. I'm not quite sure how to reproduce it yet though, so a couple of questions:
Have you previously installed the DuckDuckGo Privacy Essentials add-on?
Have you previously changed the default engine?
Could you also try and get a bit more logging for us?
- Visit
about:config
(type it in the address bar) - Acknowledge the warning
- Search for
browser.search.log
and double-click it, so that its value becomestrue
- Restart Firefox, and open the Browser Console straight away
- Right-click select all, then use cmd-C to copy.
- Paste that into an attachment here.
I'm interested to see if it is something happening at start-up or not.
Reporter | ||
Comment 6•3 years ago
|
||
In the past, I had installed the DuckDuckGo Privacy Essential add-on, but I don't currently have it installed and I don't recall installing it recently.
I had Google as my default search engine, then I switched it manually to DuckDuckGo today, and then I tried to go back to Google but I can't seem to be able to. I should add that I am running Firefox Developer Edition, not sure if that makes a difference.
View log here: https://justpaste.it/3xbwk
Reporter | ||
Comment 7•3 years ago
|
||
(In reply to Eduardo Morales from comment #6)
In the past, I had installed the DuckDuckGo Privacy Essential add-on, but I don't currently have it installed and I don't recall installing it recently.
I had Google as my default search engine, then I switched it manually to DuckDuckGo today, and then I tried to go back to Google but I can't seem to be able to. I should add that I am running Firefox Developer Edition, not sure if that makes a difference.View log here: https://justpaste.it/3xbwk
Thank you for your help, Mark!
Eduardo
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
Thank you for the log, I don't see anything unexpected in there.
One more thing, could you attach the search.json.mozlz4 file from your profile folder? You can get to the folder from about:support
. It contains only details about your installed search engine settings.
Once you've done that if close Firefox, move the file out the way, then start Firefox, it should restart with the default search settings. If that's an issue let me know.
I'm not totally sure how this happens, it could have been as a result of an old bug, but we should fix it anyway.
Reporter | ||
Comment 10•3 years ago
|
||
Reporter | ||
Comment 11•3 years ago
|
||
I've attached search.json.mozlz4.
After moving it from the profile folder and restarting Firefox, I can no longer reproduce the bug.
I am now able to switch Search Engines without an issue.
Thank you!
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 12•3 years ago
|
||
Thank you for the file, that confirms my suspicions as to the result of what happened.
I'm still not quite sure how you got into that state though, my current theory is that a third party app might have tried to change the default engine, but it was blocked.
In any case, there's a better way to do what we're trying to do in that piece of code, which would protect against it in future.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
Depends on D110563
Assignee | ||
Comment 14•3 years ago
|
||
Assignee | ||
Comment 15•3 years ago
|
||
Assignee | ||
Comment 16•3 years ago
|
||
There's a two part fix here:
- The first I found an issue when we were enabling engines (after disable) which could cause overrides to be set when they shouldn't be - when the engine wasn't going to be set as default.
- The second is a hardness fix to ensure that the default search engine can always be changed even if we're in a bad state, and get us back to a good one.
Assignee | ||
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
Comment on attachment 9213118 [details]
Bug 1693585 - When re-enabling an add-on that uses search engine override, only set the override if the engine will be set as default. r?mixedpuppy!
Revision D110563 was moved to bug 1705437. Setting attachment 9213118 [details] to obsolete.
Assignee | ||
Comment 19•3 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #16)
There's a two part fix here:
- The first I found an issue when we were enabling engines (after disable) which could cause overrides to be set when they shouldn't be - when the engine wasn't going to be set as default.
- The second is a hardness fix to ensure that the default search engine can always be changed even if we're in a bad state, and get us back to a good one.
We've changed the plan here slightly. The first part is going to be moved out to bug 1705437. The second part will continue to land in this bug to fix the user experience.
Comment 20•3 years ago
|
||
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a7273acca4c1 Ensure that the default search engine can be changed, even if overriden data is missing. r=daleharvey
Comment 21•3 years ago
|
||
bugherder |
Comment 22•3 years ago
|
||
I verified this issue using Fx 89.0 on macOS 10.13, Ubuntu 20.04 LTS and Windows 10 x64.
Description
•