Skip to content
This repository

Conflict with Add-on Update Checker #1621

Closed
mawie opened this Issue August 31, 2012 · 5 comments

2 participants

mawie arantius
mawie

Greasemonkey is slowing down the update check process of Add-on Update Checker if you have scripts installed. Without scripts everything works fine. Normally it takes about 1-2 seconds for AUC to search for updates. With Greasemonkey plus Script the AUC spinner is actice for about 30 seconds (until timeout?).

Tested on Windows 7 64-bit (SP1), Firefox 15 (new/clean profile), Greasemonkey 1.0, Add-on Update Checker 2.0.

arantius
Collaborator

When you see this problem behavior, how many scripts do you have installed?

mawie

For the test only one (YouTube Center). But it makes no difference which script or how many. One script is enough to get this issue.

arantius
Collaborator
  1. Start Firefox 15, new empty profile.
  2. Install https://addons.mozilla.org/en-US/firefox/addon/addon-update-checker/ and restart.
  3. Put the update checker button on my toolbar. It's grey.
  4. Press it. It turns into a blue spinner for a brief moment and turns grey again.
  5. Install https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ and restart.
  6. Press the update button. See behavior as in #4. But I think the spinner was green. Maybe it was the first time too, it was very brief.
  7. Install http://userscripts.org/scripts/show/114002
  8. Press the update button. See described long-spinner.

Also see in the error console:

Timestamp: 9/5/12 4:29:35 PM
Warning: WARN addons.manager: Exception calling callback: TypeError: aListener.onNoUpdateAvailable is not a function
Source File: resource://greasemonkey/script.js
Line: 775

and

Timestamp: 9/5/12 4:29:35 PM
Warning: WARN addons.updates: Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property

Which are prime candidates for somewhere to look.

arantius
Collaborator

The "update manifest" line references the default theme. Red herring.

The onNoUpdateAvailable error references handleRemoteUpdate:
https://github.com/greasemonkey/greasemonkey/blob/master/modules/script.js#L763

This is either called a few times from checkForRemoteUpdate or its XHR callbacks, which never passes an aListener argument, or from findUpdates ( https://github.com/greasemonkey/greasemonkey/blob/master/modules/addons4.js#L177 ), which directly passes its argument aListener into handleRemoteUpdate.

Add-on Update Checker calls this method twice, both times passing a javascript object literal which does not implement the UpdateListener interface ( https://developer.mozilla.org/en-US/docs/Addons/Add-on_Manager/UpdateListener ), only a subset of it. So when GM tries to call onNoUpdateAavailable it fails. Because it's not there, but it should be. This is their bug.

The "home page" and "support site" links on their AMO page are both broken. You can pass this information to them if you know how.

arantius arantius closed this September 05, 2012
arantius arantius reopened this September 06, 2012
arantius
Collaborator

Reopened for 1.2, as http://forums.mozillazine.org/viewtopic.php?p=12263123#p12263123 correctly points out that we don't call onUpdateFinished, which we should. This will depend on not trying to call undefined (i.e. add-on update checker will need to be fixed, too) but should be a simple tweak.

arantius arantius closed this issue from a commit September 16, 2012
arantius Call onUpdateFinished when appropriate.
Also, don't die if the expected AddonListener method isn't defined.

Fixes #1621
5f332fc
arantius arantius closed this in 5f332fc September 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.