Closed Bug 1281030 Opened 8 years ago Closed 8 years ago

Not compatible error when trying to install Webextension with update_url

Categories

(WebExtensions :: Untriaged, defect, P1)

48 Branch
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: pmheil, Assigned: bsilverberg)

Details

(Whiteboard: [investigate] triaged)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160606200529

Steps to reproduce:

Create extension and add update_url to applications gecko.  (For unlisted extension)
Try to install extension
(Signed status does not affect error)

Related post:  https://discourse.mozilla-community.org/t/webextensions-update-url-in-manifest-json-exception/9102


Actual results:

Error message that extension is not compatible and this console message.

1466450667609	addons.manager	WARN	InstallListener threw exception when calling onNewInstall: TypeError: app is undefined (resource://gre/modules/commonjs/toolkit/loader.js -> resource://testpilot-addon/index.js:536:5) JS Stack trace: installListener.onNewInstall@index.js:536:5 < AddonManagerInternal.callInstallListeners@AddonManager.jsm:1716:15 < this.AddonManagerPrivate.callInstallListeners@AddonManager.jsm:2976:12 < AddonInstall.prototype.initAvailableDownload@XPIProvider.jsm:5347:5 < AddonInstall.createDownload@XPIProvider.jsm:6339:5 < this.XPIProvider.getInstallForURL@XPIProvider.jsm:3858:5 < callProviderAsync@AddonManager.jsm:254:12 < AddonManagerInternal.getInstallForURL@AddonManager.jsm:1911:9 < this.AddonManager.getInstallForURL@AddonManager.jsm:3315:5 < buildNextInstall@addonManager.js:114:7 < amManager.prototype.installAddonsFromWebpage@addonManager.js:155:5 < amManager.prototype.receiveMessage@addonManager.js:191:16
1466450667615	addons.manager	WARN	InstallListener threw exception when calling onDownloadStarted: TypeError: app is undefined (resource://gre/modules/commonjs/toolkit/loader.js -> resource://testpilot-addon/index.js:542:5) JS Stack trace: installListener.onDownloadStarted@index.js:542:5 < AddonManagerInternal.callInstallListeners@AddonManager.jsm:1716:15 < this.AddonManagerPrivate.callInstallListeners@AddonManager.jsm:2976:12 < AddonInstall.prototype.startDownload@XPIProvider.jsm:5718:10 < AddonInstall.prototype.install@XPIProvider.jsm:5362:7 < AddonInstallWrapper.prototype.install@XPIProvider.jsm:6424:5 < Installer@amWebInstallListener.js:78:7 < extWebInstallListener.prototype.onWebInstallRequested@amWebInstallListener.js:335:5 < AddonManagerInternal.installAddonsFromWebpage@AddonManager.jsm:2200:16 < this.AddonManager.installAddonsFromWebpage@AddonManager.jsm:3394:5 < buildNextInstall@addonManager.js:110:9 < amManager.prototype.installAddonsFromWebpage/buildNextInstall/<@addonManager.js:152:9 < safeCall@AddonManager.jsm:179:5 < getInstallForURL_safeCall@AddonManager.jsm:1914:11 < this.XPIProvider.getInstallForURL/<@XPIProvider.jsm:3859:7 < makeSafe/<@XPIProvider.jsm:1982:24 < AddonInstall.prototype.initAvailableDownload@XPIProvider.jsm:5350:5 < AddonInstall.createDownload@XPIProvider.jsm:6339:5 < this.XPIProvider.getInstallForURL@XPIProvider.jsm:3858:5 < callProviderAsync@AddonManager.jsm:254:12 < AddonManagerInternal.getInstallForURL@AddonManager.jsm:1911:9 < this.AddonManager.getInstallForURL@AddonManager.jsm:3315:5 < buildNextInstall@addonManager.js:114:7 < amManager.prototype.installAddonsFromWebpage@addonManager.js:155:5 < amManager.prototype.receiveMessage@addonManager.js:191:16


Expected results:

Add-on should install
andrew swan looked at stack traces and addon manager and test pilot in the mix... more concrete steps to repro helpful and then update bug/potentially hand to aswan
Assignee: nobody → bob.silverberg
Priority: -- → P1
Whiteboard: [investigate] triaged
I have been unable to reproduce this error in 48, 49 or 50. I have attached a simple web extension that does specify an `update_url` which I used for testing. Could you provide us with a web extension that reproduces the problem for you?
Flags: needinfo?(pmheil)
(In reply to Bob Silverberg [:bsilverberg] from comment #3)
> Created attachment 8765536 [details]
> Web extension with an update_url which installs without error

I've narrowed down the issue.  If you change your update_url to 'http' instead of 'https' then you cannot install the testcase.  Non-secure domains work with unlisted SDK addons so hopefully it should work with Webextensions.
Flags: needinfo?(pmheil)
Thanks Paul. I tried making that change to my extension and testing on Fx 48. I noticed that Test Pilot was mentioned in the errors, so I tried both with Test Pilot installed and uninstalled. In either case I do now see a message from Firefox in the doorhanger which says "bug1281030Test could not be installed because it is not compatible with Firefox 48.0." With Test Pilot installed I also see similar error messages in the console:

1467057904979	addons.manager	WARN	InstallListener threw exception when calling onNewInstall: TypeError: app is undefined (resource://gre/modules/commonjs/toolkit/loader.js -> resource://testpilot-addon/index.js:536:5) JS Stack trace: installListener.onNewInstall@index.js:536:5 < AddonManagerInternal.callInstallListeners@AddonManager.jsm:1716:15 < this.AddonManagerPrivate.callInstallListeners@AddonManager.jsm:2976:12 < AddonInstall.prototype.initLocalInstall/</<@XPIProvider.jsm:5319:11 < makeSafe/<@XPIProviderUtils.js:168:17 < getRepositoryAddon@XPIProviderUtils.js:149:5 < this.XPIDatabase.getAddon/<@XPIProviderUtils.js:1119:9 < Handler.prototype.process@Promise-backend.js:937:23 < this.PromiseWalker.walkerLoop@Promise-backend.js:816:7 < this.PromiseWalker.scheduleWalkerLoop/<@Promise-backend.js:750:11
1467057904983	addons.manager	WARN	InstallListener threw exception when calling onDownloadCancelled: TypeError: app is undefined (resource://gre/modules/commonjs/toolkit/loader.js -> resource://testpilot-addon/index.js:551:5) JS Stack trace: installListener.onDownloadCancelled@index.js:551:5 < AddonManagerInternal.callInstallListeners@AddonManager.jsm:1716:15 < this.AddonManagerPrivate.callInstallListeners@AddonManager.jsm:2976:12 < AddonInstall.prototype.cancel@XPIProvider.jsm:5422:7 < AddonInstallWrapper.prototype.cancel@XPIProvider.jsm:6443:5 < Installer.prototype.checkAllDownloaded@amWebInstallListener.js:148:11 < Installer@amWebInstallListener.js:81:3 < extWebInstallListener.prototype.onWebInstallRequested@amWebInstallListener.js:335:5 < AddonManagerInternal.installAddonsFromWebpage@AddonManager.jsm:2200:16 < this.AddonManager.installAddonsFromWebpage@AddonManager.jsm:3394:5 < buildNextInstall@addonManager.js:110:9 < amManager.prototype.installAddonsFromWebpage/buildNextInstall/<@addonManager.js:152:9 < safeCall@AddonManager.jsm:179:5 < getInstallForURL_safeCall@AddonManager.jsm:1914:11 < this.XPIProvider.getInstallForURL/<@XPIProvider.jsm:3874:7 < makeSafe/<@XPIProvider.jsm:1997:24 < AddonInstall.prototype.initLocalInstall/</<@XPIProvider.jsm:5323:11 < makeSafe/<@XPIProviderUtils.js:168:17 < getRepositoryAddon@XPIProviderUtils.js:149:5 < this.XPIDatabase.getAddon/<@XPIProviderUtils.js:1119:9 < Handler.prototype.process@Promise-backend.js:937:23 < this.PromiseWalker.walkerLoop@Promise-backend.js:816:7 < this.PromiseWalker.scheduleWalkerLoop/<@Promise-backend.js:750:11

However without Test Pilot installed I do not see any of those messages, so I think they might be a red herring.

On Fx 49 I get the doorhanger error, but not the console error messages, regardless of Test Pilot.
On Fx 50 I also get the doorhanger error, and this time I see two messages in the console:

1467059113097	addons.xpi	WARN	Updates for add-on bug1281030@mozilla.org">bug1281030@mozilla.org must be provided over HTTPS.
1467059113262	addons.xpi	WARN	Updates for add-on bug1281030@mozilla.org">bug1281030@mozilla.org must be provided over HTTPS.

Is it the case that an update url must have a schema of https, and http is not allowed, and if so might that be the problem?
I have confirmed that update_url must contain an https link. I have also updated the MDN docs [1] to specify this. If you change your update_url to be over https it should resolve your issue.

[1] https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/applications
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Filed https://github.com/mozilla/addons-linter/issues/787 for the AMO linter to raise an error.
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: