Closed Bug 749745 Opened 13 years ago Closed 13 years ago

test-addon-installer.testUpdate has been failing on mozilla-central ever since it landed

Categories

(Add-on SDK Graveyard :: General, defect)

x86_64
Windows 8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: KWierso, Assigned: ochameau)

References

()

Details

Attachments

(1 file)

It passes just fine on beta and release, and it passed Aurora when it first landed (but has been failing there since the branches merged earlier this week), and has never passed on central. error: TEST FAILED: test-addon-installer.testUpdate (failure) error: fail: [1] addon's bootstrap.js functions have been called ("[\"install\"]" != "[\"install\",\"startup\"]") info: Traceback (most recent call last): File "resource:///modules/XPIProvider.jsm", line 4948, in null callbacks.forEach(function(aCallback) { File "resource:///modules/XPIProvider.jsm", line 4949, in null aCallback(aAddon); File "resource:///modules/XPIProvider.jsm", line 4039, in null AddonRepository.getCachedAddonByID(aAddon.id, completeAddon); File "resource://gre/modules/AddonRepository.jsm", line 508, in null aCallback(null); File "resource:///modules/XPIProvider.jsm", line 4035, in completeAddon self.callback(self.addons); File "resource:///modules/XPIProvider.jsm", line 5071, in null aCallback(aAddons[0]); File "resource:///modules/XPIProvider.jsm", line 6686, in null createWrapper(self.addon)); File "resource://gre/modules/AddonManager.jsm", line 1692, in AMP_callInstallListeners arguments); File "resource://gre/modules/AddonManager.jsm", line 1019, in AMI_callInstallListeners listeners.forEach(function(listener) { File "resource://gre/modules/AddonManager.jsm", line 1022, in null if (listener[aMethod].apply(listener, args) === false) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/addon/installer.js", line 45, in null resolve(aAddon.id); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 131, in resolve while (pending.length) result.then.apply(result, pending.shift()) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 25, in then return { then: function then(resolve) { resolve(value) } } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 105, in resolved function resolved(value) { deferred.resolve(resolve(value)) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 43, in effort try { return f(options) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/tests/test-addon-installer.js", line 108, in onInstalled prefix + "addon's bootstrap.js functions have been called"); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 162, in assertEqual this.fail(message); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 69, in fail this.console.trace(); info: pass: [2] `id` is valid error: fail: [2] addon's bootstrap.js functions have been called ("[\"startup\",\"shutdown\",\"uninstall\",\"install\"]" != "[\"shutdown\",\"uninstall\",\"install\",\"startup\"]") info: Traceback (most recent call last): File "resource:///modules/XPIProvider.jsm", line 4948, in null callbacks.forEach(function(aCallback) { File "resource:///modules/XPIProvider.jsm", line 4949, in null aCallback(aAddon); File "resource:///modules/XPIProvider.jsm", line 4039, in null AddonRepository.getCachedAddonByID(aAddon.id, completeAddon); File "resource://gre/modules/AddonRepository.jsm", line 508, in null aCallback(null); File "resource:///modules/XPIProvider.jsm", line 4035, in completeAddon self.callback(self.addons); File "resource:///modules/XPIProvider.jsm", line 5071, in null aCallback(aAddons[0]); File "resource:///modules/XPIProvider.jsm", line 6686, in null createWrapper(self.addon)); File "resource://gre/modules/AddonManager.jsm", line 1692, in AMP_callInstallListeners arguments); File "resource://gre/modules/AddonManager.jsm", line 1019, in AMI_callInstallListeners listeners.forEach(function(listener) { File "resource://gre/modules/AddonManager.jsm", line 1022, in null if (listener[aMethod].apply(listener, args) === false) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/addon/installer.js", line 45, in null resolve(aAddon.id); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 131, in resolve while (pending.length) result.then.apply(result, pending.shift()) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 25, in then return { then: function then(resolve) { resolve(value) } } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 105, in resolved function resolved(value) { deferred.resolve(resolve(value)) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 43, in effort try { return f(options) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/tests/test-addon-installer.js", line 108, in onInstalled prefix + "addon's bootstrap.js functions have been called"); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 162, in assertEqual this.fail(message); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 69, in fail this.console.trace(); info: pass: [3] `id` is valid error: fail: [3] addon's bootstrap.js functions have been called ("[\"startup\",\"shutdown\",\"uninstall\",\"install\"]" != "[\"shutdown\",\"uninstall\",\"install\",\"startup\"]") info: Traceback (most recent call last): File "resource:///modules/XPIProvider.jsm", line 4948, in null callbacks.forEach(function(aCallback) { File "resource:///modules/XPIProvider.jsm", line 4949, in null aCallback(aAddon); File "resource:///modules/XPIProvider.jsm", line 4039, in null AddonRepository.getCachedAddonByID(aAddon.id, completeAddon); File "resource://gre/modules/AddonRepository.jsm", line 508, in null aCallback(null); File "resource:///modules/XPIProvider.jsm", line 4035, in completeAddon self.callback(self.addons); File "resource:///modules/XPIProvider.jsm", line 5071, in null aCallback(aAddons[0]); File "resource:///modules/XPIProvider.jsm", line 6686, in null createWrapper(self.addon)); File "resource://gre/modules/AddonManager.jsm", line 1692, in AMP_callInstallListeners arguments); File "resource://gre/modules/AddonManager.jsm", line 1019, in AMI_callInstallListeners listeners.forEach(function(listener) { File "resource://gre/modules/AddonManager.jsm", line 1022, in null if (listener[aMethod].apply(listener, args) === false) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/addon/installer.js", line 45, in null resolve(aAddon.id); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 131, in resolve while (pending.length) result.then.apply(result, pending.shift()) File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 25, in then return { then: function then(resolve) { resolve(value) } } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 105, in resolved function resolved(value) { deferred.resolve(resolve(value)) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/promise.js", line 43, in effort try { return f(options) } File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/tests/test-addon-installer.js", line 108, in onInstalled prefix + "addon's bootstrap.js functions have been called"); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 162, in assertEqual this.fail(message); File "resource://517439c6-8d56-40a4-824c-d841bcc00236-at-jetpack/api-utils/lib/unit-test.js", line 69, in fail this.console.trace();
Assignee: nobody → poirot.alex
Attached file Pull request 423
Call order changed between FF13 and FF14(Aurora) In FF13, `InstallListener.onInstallEnded` was called after `startup` bootstrap method. Now, it is called after it. http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/XPIProvider.jsm#6721 But Addon/installer.install method is expected to resolve its promise only after startup call. We can easily fix that by using a simple setTimeout 0 as the call to the startup method is done synchronously, right after the call to onInstallEnded.
Attachment #620317 - Flags: review?(rFobic)
Comment on attachment 620317 [details] Pull request 423 I knew that change was going to bite someone. I dislike the timeout but unless we want to add a new event to the add-ons manager API it's all we have right now.
Attachment #620317 - Flags: review?(rFobic) → review+
Commits pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/4e136d0f6fa6aa7d1587434c4a9b240651c31325 Bug 749745: Fix addon/installer on FF14+. Install promise was resolved before `startup` bootstrap method call. https://github.com/mozilla/addon-sdk/commit/7fecb27bbb94a730e91a4859fb3528cbc7fa73ab Merge pull request #423 from ochameau/bug/749745-fix-addon-installer Bug 749745: Fix addon/installer on FF14+. r=@mossop
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: