Closed Bug 1420447 Opened 7 years ago Closed 7 years ago

Cannot install WebExtension addon showing warning: There is no item named 'install.rdf' in the archive

Categories

(Testing :: mozregression, defect)

Version 3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xidorn, Unassigned)

References

Details

It seems that mozregression doesn't support installing WebExtension addons.

I tried to install the gecko profiler addon via "--addon gecko_profiler.xpi" in commandline, however, it isn't installed, and there is a warning:
> mozprofile.addons WARNING | Could not install gecko_profiler.xpi: "There is no item named 'install.rdf' in the archive"
Depends on: 1420935
It looks like support for web extensions only landed in mozprofile recently. With the in-tree version of mozprofile installed, gecko_profiler installs correctly. We'll need to release a new version of mozrunner (since the last version released is incompatible with the current in-tree version), then release the in-tree version of mozprofile, then bump the required versions in mozregression itself.

It seems like by default webextensions installed via mozprofile are disabled by default, I'm not sure if there's a preference we can tweak to enable them. :rwood, do you know?
Flags: needinfo?(rwood)
I don't know offhand, from a quick look where webextensions are installed in talos [1] I don't see any prefs being set besides turning off signatures required [2].

[1] https://searchfox.org/mozilla-central/rev/8839daefd69087d7ac2655b72790d3a25b6a815c/testing/talos/talos/ffsetup.py#132
[2] https://searchfox.org/mozilla-central/source/testing/talos/talos/test.py#158
Flags: needinfo?(rwood)
I assume that mozregression is using mozprofile? Support for that has been added via bug 1377510, but we actually never released a new version to PyPI.
(In reply to Henrik Skupin (:whimboo) from comment #4)
> I assume that mozregression is using mozprofile? Support for that has been
> added via bug 1377510, but we actually never released a new version to PyPI.

I released a new version today.
Oh wonderful. Thanks a lot.
I also have a PR which uses the new version of mozprofile:

https://github.com/mozilla/mozregression/pull/475

But I'd like to figure out if we can't get the extensions enabled-by-default first.
Tarek, since you made the changes to mozprofile, maybe you would know? Do you have any idea on why webextensions installed via mozprofile are disabled by default? See rwood's remarks in comment 2.
Flags: needinfo?(tarek)
The change I made in mozprofile does the following:

- copy the extension like it does for older xpi addons 
- read a few metadata from the manifest.json file and create a uuid in case the manifest provides no id - https://searchfox.org/mozilla-central/source/testing/mozbase/mozprofile/mozprofile/addons.py#326


I have not done anything in particular with respect to enabling/disabling web extensions, so maybe there's a missing step in the mozprofile code to actually enable the extension once it's copied ? I don't see anything in the manifest that refers to it - https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json
Flags: needinfo?(tarek)
Thanks Tarek! Did some digging and I think we do indeed need to set a preference to allow sideloading extensions:

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Alternative_distribution_options/Add-ons_in_the_enterprise

Setting extensions.autoDisableScopes to "0" seems to do the trick if I do it manually. I'll add that to the default mozregression preference set.
Btw. we should finally clean-up mozprofile from setting all those extra test harness related preferences, which should nowadays all be set in the appropriate harnesses. There should already be a bug for that.
(In reply to Henrik Skupin (:whimboo) from comment #11)
> Btw. we should finally clean-up mozprofile from setting all those extra test
> harness related preferences, which should nowadays all be set in the
> appropriate harnesses. There should already be a bug for that.

I believe those preferences are optional, but in general I agree. The preferences we use for running stuff in automation don't belong in mozprofile itself. Please file a new bug. :)
This should be working now (new versions of mozregression/gui released with the change)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.