Skip to content
This repository

@require kills script after updating to 0.9.14 #1502

Closed
Dimps opened this Issue January 23, 2012 · 15 comments

6 participants

Dima Stefantsov arantius ciaranmcnamara GaryKing Liam Davis Ventero
Dima Stefantsov

How to reproduce:
1. Get 0.9.14
2. Add new script
3. Add something like // @require http://jquery.com/src/jquery-latest.js
4. Save script, update page.
Wuala, script and it's folder have disappeared, config have empty script filename.

It took me like half of a day to figure the root of the bug. Have fun =)

arantius
Collaborator

On Windows? This is probably a dupe of #1466.

Dima Stefantsov

Win 7 x64 ultimate. I thought it's not dupe because on 0.9.13 everything works great. Plus, in my case script is being lost, not just stops working.

ciaranmcnamara

This happened to me too last night - I changed an @require line, saved the script and reloaded the included page. The script failed to run and the contents of my gm_scripts folder had disappeared, except for config.xml. I'm on Windows XP SP3.

GaryKing

Yes! I have this same problem on OS X Lion. GS has been real buggy this past year; I recall a similar bug that prevented me from using the @require keyword, I believe, which was pretty annoying to say the least.

Dima Stefantsov

A-ha, and after rolling back to 0.9.13, i'm getting symptoms of #1466.
Will wait for 0.9.14+.

GaryKing

I guess I'll just write my scripts keep them in a holding pen somewhere for now, then. And, I feel sorry for developers who haven't backed up their scripts...

Liam Davis

OS X Lion, firefox 12.0a1, GM 0.9.14, same script deletion problem. Wipes out everything in the gm_scripts folder.

Ventero Ventero referenced this issue from a commit January 24, 2012
Commit has since been removed from the repository and is no longer available.
Ventero

This patch seems to fix this specific issue (i.e. any data loss). Note that after applying it, scripts will stop running when their dependencies are updated, since a new equivalent for GM_ScriptDownload#finishInstall that deals with the pendingExec seems to be missing.

arantius arantius referenced this issue from a commit in arantius/greasemonkey January 25, 2012
arantius Repair Script.updateFromNewScript() to work properly.
It was breaking in combination with RemoteScript, when dependencies needed to be downloaded.

Fixes #1502
908c31f
arantius arantius closed this issue from a commit January 25, 2012
Ventero Don't call GM_config.install when only updating dependencies, since n…
…ew and old script are identical.

Fixes #1502.
84b2562
arantius arantius closed this in 84b2562 January 25, 2012
arantius
Collaborator

Reporters: Please test and report whether this build fixes your issues:
https://github.com/downloads/arantius/greasemonkey/greasemonkey-0.9.15.xpi

GaryKing

0.9.15 doesn't delete scripts anymore, but @require also does not work. When using it, the required script is not downloaded locally, and the script that had the @require but then removed the @require no longer works.

On a side note, I notice that new scripts have their folder names in whatever case you put it in (upper/lower), rather than always in lowercase. Is that a new thing?

arantius
Collaborator

If I install https://gist.github.com/1157543 then I get the "@require works!" line as expected.

If I install https://gist.github.com/1677686 then I get both lines as expected. If I edit it to remove one, then it still runs and I get one line. All as expected.

Can you be (a lot) more specific about what exactly does and does not work?

(And yes. URL -> saved file name logic was updated to be much more flexible in what it allows.)

Dima Stefantsov

I have not tested it good enough, but problem appears after I manually add new script, paste new line "@require http://jquery.com/src/jquery-latest.js", then I add alert("qwe"); below config header. I could see no alert. Then script got lost after FF reboot.

arantius
Collaborator
Dima Stefantsov

GM icon, little arrow to the right, New User Script..., Some Good Name, Somenamespace, empty description, /path//morepath/,
I get
// ==UserScript==
// @name Some Good Name
// @namespace Somenamespace
// @include */path/
/morepath/*
// ==/UserScript==

make it look

// ==UserScript==
// @name Some Good Name
// @namespace Somenamespace
// @require http://jquery.com/src/jquery-latest.js
// @include /path//morepath/*
// ==/UserScript==

alert("qwe");

Save, refresh page. Nothing happened. I can see script in list of page scripts on little arrow to the right of GM icon. Restart FF. Script disappears from this list. It still is in folder on disk (name with upper case characters), Config.xml have no records about this script. jquery-latest is not downloaded (in 0.9.14 when it was bugging, it used to be downloaded near Config.xml)
I have just repeated it again, same thing.

arantius
Collaborator

Thanks, recorded as #1504.

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.