Closed Bug 1782311 Opened 2 years ago Closed 2 years ago

Can't add a new search engine from search bar when only one search engine exists

Categories

(Firefox :: Search, defect)

Firefox 105
defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox-esr102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix
firefox105 --- fixed

People

(Reporter: ti8bpxk2y, Assigned: daisuke)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

Attached image actual_beahvior.png (deleted) —

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0

Steps to reproduce:

  1. Add the search bar in the toolbar
  2. Remove all the search engines in about:preferences#search > Search shortcuts
  3. Visit a website that you can add a search engine, eg. https://metager.org
  4. Try to add the search engine from the toolbar

Actual results:

The icon to add the search engine doesn't show up.

Expected results:

The icon should show up, just like it would when you have more than one search engine in about:preferences#search > Search shortcuts.

Attached image expected.png (deleted) —

that's the icon that should show up, as you can see it works when you have more than one search engine in your list.

The Bugbug bot thinks this bug should belong to the 'Firefox::Search' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Search

Hello,

I have managed to reproduce this issue with a Nightly build from 2022-07-29, as well as on the latest FF Nightly 105.0a1 (2022-08-04).

I have managed to determine that this is a recent regression:

2022-08-04T16:09:50.522000: INFO : Narrowed integration regression window from [e64c83e9, f9d68808] (3 builds) to [e64c83e9, dc004270] (2 builds) (~1 steps left)
2022-08-04T16:09:50.541000: DEBUG : Starting merge handling...
2022-08-04T16:09:50.542000: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=dc0042704c8729e7f3c40e30533946ad1af0e2ea&full=1
2022-08-04T16:09:50.542000: DEBUG : redo: attempt 1/3
2022-08-04T16:09:50.542000: DEBUG : redo: retry: calling _default_get with args: ('https://hg.mozilla.org/integration/autoland/json-pushes?changeset=dc0042704c8729e7f3c40e30533946ad1af0e2ea&full=1',), kwargs: {}, attempt #1
2022-08-04T16:09:50.635000: DEBUG : urllib3.connectionpool: Resetting dropped connection: hg.mozilla.org
2022-08-04T16:09:51.895000: DEBUG : urllib3.connectionpool: https://hg.mozilla.org:443 "GET /integration/autoland/json-pushes?changeset=dc0042704c8729e7f3c40e30533946ad1af0e2ea&full=1 HTTP/1.1" 200 None
2022-08-04T16:09:51.928000: DEBUG : Found commit message:
Bug 1761513 - Remove Engine(about:preferences#search) should be disabled for current Default Engine r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D148389

2022-08-04T16:09:51.928000: DEBUG : Did not find a branch, checking all integration branches
2022-08-04T16:09:51.931000: INFO : The bisection is done.
2022-08-04T16:09:51.932000: INFO : Stopped 

The following pushlog was returned .

It would seem that the culprit for this regression would be 1761513

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #3)

The following pushlog was returned .

It would seem that the culprit for this regression would be 1761513

The link for the range doesn't seem right, but I did get it to work - though it only returned that bug. I don't think it can be the bug as that only affected the preferences code.

I could also reproduce this issue in latest Nightly, but got a different regressor: bug 1709405. Daisuke, could you please take a look? Thank you!

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2d291a99004dd0aea5304bb8cae306a47083ff94&tochange=3350b68026ed51868a2100acb87d1833d61ac486

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1709405

Set release status flags based on info from the regressing bug 1709405

:daisuke, since you are the author of the regressor, bug 1709405, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(daisuke)

Yes, I also could reproduce this issue, and will take a look at it.

Flags: needinfo?(daisuke)
Assignee: nobody → daisuke
Status: NEW → ASSIGNED

The cause of this bug was that we don’t consider the Add Engines to show/hide the
container of SearchOneOffs. To resolve the issue, we incorporated that into
willHide() function. And also, when the count of engines changes by added engine,
make the UI rebuild.

Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7307730b93c9 Do not hide oneoff buttons area when there is additional engine. r=Standard8,adw https://hg.mozilla.org/integration/autoland/rev/23414a710c13 Avoid flickering due to showing/hiding one-off buttons. r=adw

Backed out for causing mochitest failures on browser_heuristicNotAddedFirst.js.

Push with failures

Failure log

Backout link

[task 2022-08-19T08:38:09.362Z] 08:38:09     INFO - TEST-PASS | browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js | 7 == 7 - 
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - Console message: [JavaScript Error: "Returning HEURISTIC_FALLBACK for unrecognized heuristic result: Google - test" {file: "resource:///modules/UrlbarUtils.sys.mjs" line: 531}]
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - getResultGroup@resource:///modules/UrlbarUtils.sys.mjs:531:10
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - sort@resource:///modules/UrlbarMuxerUnifiedComplete.sys.mjs:95:31
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - _notifyResults@resource:///modules/UrlbarProvidersManager.sys.mjs:618:16
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - callback@resource:///modules/UrlbarProvidersManager.sys.mjs:602:30
[task 2022-08-19T08:38:09.363Z] 08:38:09     INFO - SkippableTimer/this.promise<@resource:///modules/UrlbarUtils.sys.mjs:2100:9
[task 2022-08-19T08:38:09.364Z] 08:38:09     INFO - 
[task 2022-08-19T08:38:09.364Z] 08:38:09     INFO - Leaving test bound slowHeuristicSelected
[task 2022-08-19T08:38:09.364Z] 08:38:09     INFO - Entering test bound oneOffRemainsSelected
[task 2022-08-19T08:38:09.365Z] 08:38:09     INFO - Awaiting for the urlbar panel to open
[task 2022-08-19T08:38:09.365Z] 08:38:09     INFO - Awaiting for the urlbar panel to open
[task 2022-08-19T08:38:09.366Z] 08:38:09     INFO - Urlbar panel opened
[task 2022-08-19T08:38:09.366Z] 08:38:09     INFO - Urlbar panel opened
[task 2022-08-19T08:38:09.366Z] 08:38:09     INFO - Buffered messages finished
[task 2022-08-19T08:38:09.367Z] 08:38:09     INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js | 7 == 2 - JS frame :: chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js :: oneOffRemainsSelected :: line 143
[task 2022-08-19T08:38:09.367Z] 08:38:09     INFO - Stack trace:
[task 2022-08-19T08:38:09.367Z] 08:38:09     INFO - chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js:oneOffRemainsSelected:143
[task 2022-08-19T08:38:09.367Z] 08:38:09     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-08-19T08:38:09.368Z] 08:38:09     INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js | Uncaught exception in test - at resource://testing-common/UrlbarTestUtils.sys.mjs:180 - Error: Not enough results
[task 2022-08-19T08:38:09.368Z] 08:38:09     INFO - Stack trace:
[task 2022-08-19T08:38:09.368Z] 08:38:09     INFO - waitForAutocompleteResultAt@resource://testing-common/UrlbarTestUtils.sys.mjs:180:13
[task 2022-08-19T08:38:09.369Z] 08:38:09     INFO - Leaving test bound oneOffRemainsSelected
[task 2022-08-19T08:38:09.369Z] 08:38:09     INFO - GECKO(3986) | MEMORY STAT | vsize 16719MB | residentFast 766MB | heapAllocated 229MB
[task 2022-08-19T08:38:09.370Z] 08:38:09     INFO - TEST-OK | browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js | took 2570ms
[task 2022-08-19T08:38:09.370Z] 08:38:09     INFO - GECKO(3986) | [Child 3997: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 10a25bc00 == 3 [pid = 3997] [id = 12]
[task 2022-08-19T08:38:09.370Z] 08:38:09     INFO - GECKO(3986) | [Child 3997: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 7 (10949c820) [pid = 3997] [serial = 37] [outer = 0]
[task 2022-08-19T08:38:09.371Z] 08:38:09     INFO - GECKO(3986) | [Child 3997: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 8 (10a25c800) [pid = 3997] [serial = 38] [outer = 10949c820]
[task 2022-08-19T08:38:09.371Z] 08:38:09     INFO - checking window state
[task 2022-08-19T08:38:09.372Z] 08:38:09     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-08-19T08:38:09.372Z] 08:38:09     INFO - TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_heuristicNotAddedFirst.js | Found an unexpected browser window at the end of test run - 
[task 2022-08-19T08:38:09.372Z] 08:38:09     INFO - GECKO(3986) | must wait for focus
[task 2022-08-19T08:38:09.373Z] 08:38:09     INFO - GECKO(3986) | [Parent 3986, Main Thread] WARNING: '!CanHandleWith(aPresContext)', file /builds/worker/checkouts/gecko/dom/events/IMEStateManager.cpp:498
[task 2022-08-19T08:38:09.373Z] 08:38:09     INFO - GECKO(3986) | [Child 3995: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 13 (10a89bd40) [pid = 3995] [serial = 100] [outer = 0] [url = about:newtab]
[task 2022-08-19T08:38:09.374Z] 08:38:09     INFO - GECKO(3986) | [Child 3995: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 12 (10a89dfb0) [pid = 3995] [serial = 97] [outer = 0] [url = about:newtab]
[task 2022-08-19T08:38:09.374Z] 08:38:09     INFO - TEST-START | browser/components/urlbar/tests/browser/browser_hideHeuristic.js
Flags: needinfo?(daisuke)
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bb28a75ddbcb Do not hide oneoff buttons area when there is additional engine. r=Standard8,adw https://hg.mozilla.org/integration/autoland/rev/d3f88b71bd6d Avoid flickering due to showing/hiding one-off buttons. r=adw
Flags: needinfo?(daisuke)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: