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

Match metdata processing can fail and destroy config.xml contents #1912

Closed
LL25255252 opened this Issue Apr 12, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@LL25255252
Copy link

LL25255252 commented Apr 12, 2014

After Upgrading from 1.15 (I'm not sure it was 1.15) to 1.16b3 I've noticed that half of my installed scripts are not detected.
Beta3 cut my config.xml from around 90kb to about 30kb.

I have a backup of gm_scripts folder from March so I did a test.
https://www.dropbox.com/s/nrumgrro4og5sfd/2014-March-14%20gm_scripts%20folder.rar

I've created new/fresh FF profile.
Install GM 1.16b3.
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/1.16beta3
Exit FF.
Copy March gm_script folder to the new profile.
The problem is reproduced - config.xml is cut.
https://www.dropbox.com/s/4b2sog332vkd71n/config.xml%20after%20beta3.rar

Same procedure with 1.16b2 - GM works fine (no cut).
https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/1.16beta2
https://www.dropbox.com/s/5eiscg9iwt4ndt5/config.xml%20after%20beta2.rar

FF28
Win 7

@arantius

This comment has been minimized.

Copy link
Collaborator

arantius commented Apr 12, 2014

Does anything show in the error console when launching with beta 3 installed?

@arantius arantius added this to the 1.16 milestone Apr 12, 2014

@LL25255252

This comment has been minimized.

Copy link

LL25255252 commented Apr 13, 2014

OK... I've found the culprit that breaks 1.16b3
YouTube Link Cleaner:
http://userscripts.org/scripts/show/108606

I guess 1.16b3 has a problem with the "match" lines of this script.

capture

As of now userscripts.org is currently down so here's a gm_script folder with only the problematic script.
https://www.dropbox.com/s/vq3g393qe6gtbht/gm_scripts_with_only_1_script.rar

Error Console:
This error line I don't get with the "reduced" gm_scripts but I got it with my original big gm_scripts folder.
SyntaxError: invalid quantifier
MatchPattern.js:105

This Error line I get in all the situations I've tested (even with GM 1.15)
[object ErrorEvent]
Promise.jsm:770
nextValue = this.onReject(nextValue);

Ventero added a commit to Ventero/greasemonkey that referenced this issue Apr 13, 2014

Ventero added a commit to Ventero/greasemonkey that referenced this issue Apr 13, 2014

@Ventero

This comment has been minimized.

Copy link
Contributor

Ventero commented Apr 13, 2014

Sorry, this was caused by my "fix" for #1899. Ventero@94ac387 shows a possible fix for this - though I don't really like it, as the host handling is getting more and more complex.

For reference, here's the test suite I used to verify my changes: https://gist.github.com/Ventero/10564913.

With Ventero@7633a88, parsing errors during initial config load are handled more gracefully. Some more explanation should probably be added so that the user can figure out which script caused the error. Though that's not really reliable, as the script might not even have an .id property when the exception is caught.

@arantius arantius changed the title 1.16b3 cuts config.xml Match metdata processing can fail and destroy config.xml contents Apr 17, 2014

arantius added a commit to arantius/greasemonkey that referenced this issue Apr 17, 2014

@arantius arantius closed this in 05edf94 Apr 17, 2014

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