Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@require kills script after updating to 0.9.14 #1502

Closed
dima-stefantsov opened this issue Jan 23, 2012 · 15 comments
Closed

@require kills script after updating to 0.9.14 #1502

dima-stefantsov opened this issue Jan 23, 2012 · 15 comments
Milestone

Comments

@dima-stefantsov
Copy link

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
Copy link
Collaborator

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

@dima-stefantsov
Copy link
Author

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
Copy link

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
Copy link

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
Copy link
Author

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

@garyking
Copy link

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...

@Trezoid
Copy link

Trezoid commented Jan 25, 2012

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

@Ventero
Copy link
Contributor

Ventero commented Jan 25, 2012

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 pushed a commit to arantius/greasemonkey that referenced this issue Jan 25, 2012
It was breaking in combination with RemoteScript, when dependencies needed to be downloaded.

Fixes greasemonkey#1502
@arantius
Copy link
Collaborator

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

@garyking
Copy link

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
Copy link
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
Copy link
Author

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
Copy link
Collaborator

Add how? New how?

On Thu, Jan 26, 2012 at 9:20 AM, Dimps <
reply@reply.github.com

wrote:

after I manually add new script

@dima-stefantsov
Copy link
Author

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
Copy link
Collaborator

Thanks, recorded as #1504.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants