Auto update not working (Firefox, Mac)

842 views
Skip to first unread message

mike cupcake

unread,
May 17, 2012, 7:45:16 AM5/17/12
to greasemon...@googlegroups.com
So I've uploaded a few basic scripts to userscripts.org and installed loads of useful ones from other people, but I can't get auto updates to work for any of them.

Currently running Firefox 12.0, GM 0.9.19 on Mac 10.6.8

My checklist:
 - script installed from userscripts.org Install button, install URL is secure (https)
 - Greasemonkey preferences has all 3 boxes ticked for Update Checking (minimum interval set to 1 day if that makes any difference)
 - the script has autoupdate ticked on Firefox's rightclick menu

No updates take place, even after a forced check.

Discovered I could query GM_info and put this in the script, it returned False:
alert(String(GM_info.scriptWillUpdate));

Tried adding a @version metatag, then also unticking Require Secure Updates.  scriptWillUpdate still returns False.

This is the script I'm testing with: http://userscripts.org/scripts/show/125470

I'm missing something obvious, right?  Any help appreciated.


Anthony Lieuallen

unread,
May 17, 2012, 10:58:28 AM5/17/12
to greasemon...@googlegroups.com
On Thu, May 17, 2012 at 7:45 AM, mike cupcake <mikec...@gmail.com> wrote:
My checklist:
 - script installed from userscripts.org Install button, install URL is secure (https)

You're sure of this?  This isn't the default behavior for us.o.
 
Discovered I could query GM_info and put this in the script, it returned False:
alert(String(GM_info.scriptWillUpdate));

There's a few things that checks:
 
( https://github.com/greasemonkey/greasemonkey/blob/e8fe33dd4b987c1b0dac7b8f41e106db83aa246f/modules/script.js#L446 )

* Updates preference for this script enabled?  (You say it is.)
* Script is enabled?  (It probably is.)
* Have an update URL? (If you installed it recently, there should be one.)
* Have not modified the script on disk since the last install?  (This might be the culprit -- we intentionally do not overwrite local modifications with updates.)
* Update URL is secure?  (You say it is.)

So there's one obvious thing to check.

mike cupcake

unread,
May 18, 2012, 7:56:56 AM5/18/12
to greasemon...@googlegroups.com


On Thursday, May 17, 2012 3:58:28 PM UTC+1, Anthony Lieuallen wrote:
On Thu, May 17, 2012 at 7:45 AM, mike cupcake  wrote:
My checklist:
 - script installed from userscripts.org Install button, install URL is secure (https)

You're sure of this?  This isn't the default behavior for us.o.

Yes, am using this script to change the URL:
http://userscripts.org/scripts/show/127520
 
Discovered I could query GM_info and put this in the script, it returned False:
alert(String(GM_info.scriptWillUpdate));

 
* Have an update URL? (If you installed it recently, there should be one.)

Do you know where I can find this?  I understand that if not specified in the metadata it defaults to the install URL (or in the case of us.o the meta.js)  but couldn't find out how to check.
 
* Have not modified the script on disk since the last install?  (This might be the culprit -- we intentionally do not overwrite local modifications with updates.)

AHA,  this I did not know.    Would explain this particular script not updating as yes I had edited it on disk.   Is there a way to manually change this flag?  Or I guess deleting the script, restarting Firefox and reinstalling from us.o would clear it?

(I've got into the habit of working on changes locally then updating the version on us.o,   and I move between a few different machines so the locally-edited flags will be spread among them for different scripts....)

Thanks for the help!

mike cupcake

unread,
May 18, 2012, 8:19:09 AM5/18/12
to greasemon...@googlegroups.com
> Do you know where I can find this?

Aha found it in config.xml, located here on Mac:
~/Library/Application Support/Firefox/Profiles/[profile name]/gm_scripts/config.xml


Anthony Lieuallen

unread,
May 18, 2012, 9:34:23 AM5/18/12
to greasemon...@googlegroups.com
On Fri, May 18, 2012 at 7:56 AM, mike cupcake <mikec...@gmail.com> wrote:
Is there a way to manually change this flag?  Or I guess deleting the script, restarting Firefox and reinstalling from us.o would clear it?

Yes.  Just reinstalling at all should make the updated/modified times match properly to allow updates.


(I've got into the habit of working on changes locally then updating the version on us.o,   and I move between a few different machines so the locally-edited flags will be spread among them for different scripts....)

But it's tough for us to know what the local changes are, so we err on the side of safety (not throwing away the potentially valuable changes that only exist on your disk).

mike cupcake

unread,
May 18, 2012, 11:38:51 AM5/18/12
to greasemon...@googlegroups.com
On Friday, May 18, 2012 2:34:23 PM UTC+1, Anthony Lieuallen wrote:
But it's tough for us to know what the local changes are, so we err on the side of safety (not throwing away the potentially valuable changes that only exist on your disk).

 Indeed,  I'd be interested in an option (per script maybe) to turn this off

So my problem seems to be down to secure updates,   I reinstalled the script then made a change on us.o and confirmed the config.xml is set for HTTPS:

installurl="https://userscripts.org/scripts/source/125470.user.js"
updateurl="http://userscripts.org.nyud.net/scripts/source/125470.meta.js"

click on the script in Firefox's list, Find Updates.  Nothing happens,  but if I turn off Secure Updates in GM options and repeat updates straightaway.   Same behaviour on a Win7 box.

Looking like this might not be an issue at my end.. ?

mike cupcake

unread,
May 18, 2012, 1:55:55 PM5/18/12
to greasemon...@googlegroups.com
Confirmed as a network issue,  trying to load the updateurl from config.xml as https in a browser:
https://userscripts.org.nyud.net/scripts/source/125470.meta.js

instantly brings up a connection error, also a traceroute doesn't get anywhere.  I guess either Virgin have decided to block it along with the Pirate Bay or this distribution network isn't up to much :-)

It'd be useful if GM raised an alert if it gets a connection error when forcing an update check.

Anthony Lieuallen

unread,
May 18, 2012, 3:46:24 PM5/18/12
to greasemon...@googlegroups.com
On Fri, May 18, 2012 at 1:55 PM, mike cupcake <mikec...@gmail.com> wrote:
Confirmed as a network issue,  trying to load the updateurl from config.xml as https in a browser:
https://userscripts.org.nyud.net/scripts/source/125470.meta.js

But that URL is specifically "http" (no S) as you posted it, no?

I'd expect that not to work, coral doesn't offer HTTPS.

It'd be useful if GM raised an alert if it gets a connection error when forcing an update check.

I personally wouldn't want popups at random times because of automated update checks.  But some sort of notification somewhere might be nice.  I think there might be an appropriate way to annotate this in the AOM.

mike cupcake

unread,
May 19, 2012, 7:39:48 AM5/19/12
to greasemon...@googlegroups.com
On Friday, May 18, 2012 8:46:24 PM UTC+1, Anthony Lieuallen wrote:
On Fri, May 18, 2012 at 1:55 PM, mike cupcake <mikec...@gmail.com> wrote:
Confirmed as a network issue,  trying to load the updateurl from config.xml as https in a browser:
https://userscripts.org.nyud.net/scripts/source/125470.meta.js

But that URL is specifically "http" (no S) as you posted it, no?

I'd expect that not to work, coral doesn't offer HTTPS.

Whoops,  I've gone and got myself confused by some info from the us.o forum.  So backing up a couple steps and re-evalutating:

 - the metadata check over Coral is http, this url loads fine.

 - The https us.o installurl loads fine when I install the script.

 - Nothing happens when I force an update with GM set to Secure Updates

 - Turning off GM Secure Updates,  scripts (mine and others) autoupdate from us.o as expected, no need to force a check.

 - Same behaviour on two machines, Mac10.6  (gm 0.9.20) and Win7 (gm 0.9.19).

I'm stumped.

 

It'd be useful if GM raised an alert if it gets a connection error when forcing an update check.

I personally wouldn't want popups at random times because of automated update checks.  But some sort of notification somewhere might be nice.  I think there might be an appropriate way to annotate this in the AOM.

Agreed, that's why I said when forcing a check ;-)    AOM annotation would be great.

thanks,
  mike

Anthony Lieuallen

unread,
May 19, 2012, 7:29:33 PM5/19/12
to greasemon...@googlegroups.com
On Sat, May 19, 2012 at 7:39 AM, mike cupcake <mikec...@gmail.com> wrote:
I'm stumped.

I'd love to see more concrete information but at this point I suspect stale caches.

mike cupcake

unread,
May 20, 2012, 8:57:41 AM5/20/12
to greasemon...@googlegroups.com
On Sunday, May 20, 2012 12:29:33 AM UTC+1, Anthony Lieuallen wrote:
I'd love to see more concrete information but at this point I suspect stale caches.

I've tried clearing the Mac's Firefox cache then restarting FF   (repeated just now to confirm) -  are there other caches involved?

I'll follow the greasespot wiki advice about testing in a fresh FF profile next,  I realised yesterday that as the FF profile is synced between my Mac and PC machines I've only really been testing this in one environment.

Tried to find out how to log what's happening behind the scenes when I right-click/Find Updates (as there's no visible change in the AOM window),   having greasemonkey.logChrome set true doesn't bring anything up in the error console;    is there a way to do this?

thanks again,
 mike

mike cupcake

unread,
May 20, 2012, 9:22:24 AM5/20/12
to greasemon...@googlegroups.com
Testing in new Mac FF profile  =   exact same behaviour.

New profile;  install GM;  install script;  edit script on us.o;  clear FF cache; restart FF.
Find Updates    =  nothing happens.
Turn off GM Secure Updates;  Find Updates   =  update downloads and installs fine.


mike cupcake

unread,
May 20, 2012, 9:29:01 AM5/20/12
to greasemon...@googlegroups.com
On Sunday, May 20, 2012 2:22:24 PM UTC+1, mike cupcake wrote:
Testing in new Mac FF profile  =   exact same behaviour.

New profile;  install GM;  install script;  edit script on us.o;  clear FF cache; restart FF.
 
+ I forgot to mention:    Turned off all other plugins;   confirmed installurl="https://userscripts.org/scripts/source/125470.user.js"

Anthony Lieuallen

unread,
May 20, 2012, 11:29:54 AM5/20/12
to greasemon...@googlegroups.com

mike cupcake

unread,
May 20, 2012, 12:05:01 PM5/20/12
to greasemon...@googlegroups.com
On Sunday, May 20, 2012 4:29:54 PM UTC+1, Anthony Lieuallen wrote:

Let me know if you need anything further.
Reply all
Reply to author
Forward
0 new messages