Closed Bug 1570700 Opened 1 year ago Closed 1 year ago

browser.search.get() fails on ubuntu 18.04 FF68.0.1

Categories

(WebExtensions :: General, defect, P1)

68 Branch
defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 wontfix, firefox68 wontfix, firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: ssborbis, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

browser.search.get() run on ubuntu 18.04 64bit, FF 68.0.1 (debug console, web extension background page, etc )

Actual results:

An unexpected error occured

Expected results:

Promise resolves with array of one-click search engines

I need to check on FFx build vs Canonical build, Canonical may be removing it.

Edited: reporter did confirm it's a distro issue.

Flags: needinfo?(ehumphries)
Component: Untriaged → Search

Confirmed it only occurs in the Canonical build. Tarball 68.0.1 works as expected

Thank you for checking that!

This is always frustrating with distro builds, they may disable features for any number of reasons, which can cause things like this.

One more step, if you have time. Can you install this sample extension on the Canonical build and see if it works or not?

https://github.com/mdn/webextensions-examples/tree/master/menu-search

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox

Flags: needinfo?(ehumphries) → needinfo?(ssborbis)
Component: Search → Untriaged
Product: Firefox → WebExtensions
Version: 68 Branch → Firefox 68

Using menu-search as temp add-on

Canonical - fail ( Error: An unexpected error occurred .......... undefined )
Official - works as expected

Flags: needinfo?(ssborbis)

This is working with other distros. Maybe something Snap related?

(In reply to Mike Kaply [:mkaply] from comment #5)

This is working with other distros. Maybe something Snap related?

I had an addon user report this bug on ubuntu 18.04 64bit, confirmed on my vbox install. I'll test snap vs apt

Cannot reproduce on Ubuntu 18.04, Firefox 68.0.1 (Canonical, installed via apt, Dutch locale).

If you are able to reproduce, could you check whether the global JavaScript console (Ctrl-Shift-J) contains any errors?

The error could be caused by https://searchfox.org/mozilla-central/rev/b38e3beb658b80e1ed03e0fdf64d225bd4a40327/browser/components/extensions/parent/ext-search.js#56
... when a search engine is defined with a non-existing icon URL.

I went to https://packages.ubuntu.com/bionic/web/firefox
and downloaded the source package from http://archive.ubuntu.com/ubuntu/pool/main/f/firefox/firefox_68.0.1+build1-0ubuntu0.18.04.1.debian.tar.xz

Inside that package, there is debian/searchplugins/amazondotcom.xml (and many other amazon*.xml files). They reference resource://search-plugins/images/amazon.ico.
This file was removed in part 3 of bug 1496075, so any request to fetch that image URL will fail, and hence break browser.search.get.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Regressed by: 1496075

(In reply to Rob Wu [:robwu] from comment #8)

I went to https://packages.ubuntu.com/bionic/web/firefox
and downloaded the source package from http://archive.ubuntu.com/ubuntu/pool/main/f/firefox/firefox_68.0.1+build1-0ubuntu0.18.04.1.debian.tar.xz

Inside that package, there is debian/searchplugins/amazondotcom.xml (and many other amazon*.xml files). They reference resource://search-plugins/images/amazon.ico.
This file was removed in part 3 of bug 1496075, so any request to fetch that image URL will fail, and hence break browser.search.get.

Yep, simply deleting the Amazon engine without an icon fixed the issue. I'll let the user know.

All built-in engines have migrated from OpenSearch to WebExtensions.
WebExtensions do not support resource: or chrome:-URLs in their
favicon_url field, so the "resource:" and "chrome:" URLs can only be
used by external opensearch XML files. These should not rely on internal
resources from omni.ja, as the bug shows. So just drop support for
"chrome:" and "resource:"-URLs, as we don't need them any more.

Current OpenSearch engines that relied on chrome/resource:-URLs can
either replace the URL with a data:-URL, or migrate to WebExtensions.

(linking to meta bug 1517486, because the proposed patch removes a feature that is not supported by the WebExtension format)

Assignee: nobody → rob
Blocks: 1517486
Status: NEW → ASSIGNED
Component: Untriaged → General

Thanks everyone for their help getting to next steps on this bug! Y'all rock. 🙌

See Also: → 1567107
Priority: -- → P1

I'll fix the URLs in the partner distro repository.

Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/778471f56de7
Drop support for resource/chrome icons in search engines r=mkaply,daleharvey,mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Is this something we should consider for uplift or can it ride Fx70 to release?

Flags: needinfo?(rob)
Flags: in-testsuite+

Is this something we should consider for uplift or can it ride Fx70 to release?

Getting it on 69 would be nice, but the Snap problem specifically will be fixed by a change to their distro.

Let's ride the train. The number of users that are affected by this is probably small. A work-aroumd for them is to delete the (opensearch) file/engine.

Flags: needinfo?(rob)

Hello,
I've tried to reproduce this on Ubuntu 18.04.2 LTS 64-bit on Firefox Release 68.0.1 by downloading and temporarily adding in about:debugging the "menu-search" extension manifest from comment 3.
After which debugging mode was enabled, a Debug performed and also I used the the browser.search.get() function in the console.
No error was received; for more details please check the "console browser search" attachment.
If manual QA is still needed on this issue, could you please add the "qe+" verify flag and also provided more steps or details in order to test?
Thank you

Flags: needinfo?(rob)

There is automated test coverage.

Flags: needinfo?(rob) → qe-verify-
Version: Firefox 68 → 68 Branch
You need to log in before you can comment on or make changes to this bug.