Closed Bug 1213860 Opened 9 years ago Closed 9 years ago

Can't install add-on on FxOS via reviewer tools

Categories

(Marketplace Graveyard :: Reviewer Tools, defect, P1)

Avenir
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: eviljeff, Assigned: kngo)

References

Details

Attachments

(1 file)

Install fails via reviewer tools.
might be a one-off, but I can't attempt to reproduce due to bug 1213820.  Logging in any case.
Attached file adb log
(noisy) adb log.
Priority: -- → P1
Assignee: nobody → kngo
once the patch for bug 1213919 lands I think (hope) this will be fixed.
Depends on: 1213919
How about now?
No, 
though I do get a different error:
E/GeckoConsole(  316): [JavaScript Error: "Error installing packaged app from: https://marketplace.firefox.com: MANIFEST_URL_ERROR" {file: "resource://gre/modules/Webapps.jsm" line: 2598}]

D/System  ( 2199): Content JS GROUP: action ADDON_INSTALL__INSTALL_ERROR @ 11:53:5 

- this is after switching to dogfood-latest (nightly-ish) channel, build id 20151015103418.
there isn't enough logging to say for certain what its trying to install - the view manifest link 500's (e.g. https://marketplace.firefox.com/extension/1ee2f3ed13e842fab67afed75492333b/manifest.json on https://marketplace.firefox.com/content/addon/review/back-button-4)
https://marketplace.firefox.com/extension/1ee2f3ed13e842fab67afed75492333b/manifest.json is 404 because it's the public mini-manifest URL. The reviewer mini-manifest URL is different, it's per version and the prefix is /extension/reviewers/. 

I'm not sure what's causing your issue, but in any case the whitelist to pick reviewer certs in Gecko seems wrong to me:
https://dxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#1068
https://dxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#3746

Instead of whitelisting "/reviewers/,/content/addon/review/" it should whitelist "/reviewers/,/extension/reviewers/", since it's the manifest that needs to be whitelisted, not the install origin.
(In reply to Mathieu Pillard [:mat] from comment #6)
> I'm not sure what's causing your issue, but in any case the whitelist to
> pick reviewer certs in Gecko seems wrong to me:
> https://dxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#1068
> https://dxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#3746
> 
> Instead of whitelisting "/reviewers/,/content/addon/review/" it should
> whitelist "/reviewers/,/extension/reviewers/", since it's the manifest that
> needs to be whitelisted, not the install origin.

Ah.  That could be it.
(In reply to Andrew Williamson [:eviljeff] from comment #7)
> (In reply to Mathieu Pillard [:mat] from comment #6)
> > I'm not sure what's causing your issue, but in any case the whitelist to
> > pick reviewer certs in Gecko seems wrong to me:
> > https://dxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#1068
> > https://dxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#3746
> > 
> > Instead of whitelisting "/reviewers/,/content/addon/review/" it should
> > whitelist "/reviewers/,/extension/reviewers/", since it's the manifest that
> > needs to be whitelisted, not the install origin.
> 
> Ah.  That could be it.

I still get MANIFEST_URL_ERROR after adding `,/extension/reviewers/` to the end of the pref value.
Looking at the source it indicates one of the status response codes (for the manifest or the package) isn't 200 (or 304).  The three instances of `sendError("MANIFEST_URL_ERROR")` are all connected to the response not being 200, as far as I can see.
This bug might have two layers.

One issue is that devhub login cookie expires when browser is closed. Need to have the frontend ping devhub to see if has a user session active, and force log out if it doesn't for content tools. No session cookie means reviewer can't access manifest.

The second issue is unknown. Needs investigation.
The second issue is that the whitelist is wrong in platform (bug 1213919 was re-opened for this). AFAIK once those 2 issues were worked around Andrew was able to successfully install an add-on from reviewer tools.
STR:

1. Be logged in on Developer Hub.
2. Go to Add-on Review Detail page on Content Tools.
3. You should be able to install (with the whitelist working) and not see any prompt to log in.
4. Log out of Developer Hub.
5. Go back to Content Tools.

Expected:

Reviewer is asked to log in again at the top of the page. Log in works. Prompt disappears after log in. User is now also logged into Developer Hub.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1217959
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: