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

'No User Scripts Installed!' after FF and GM4 update #2668

Closed
Vhati opened this issue Nov 14, 2017 · 21 comments
Closed

'No User Scripts Installed!' after FF and GM4 update #2668

Vhati opened this issue Nov 14, 2017 · 21 comments

Comments

@Vhati
Copy link

Vhati commented Nov 14, 2017

I had a few user scripts installed, including one I had installed locally via dragging onto "Manage User Scripts". FireFox updated today, and a tab announced GreaseMonkey 4.

Now, all my scripts are gone. ("No User Scripts Installed!")

I can't install a local file directly ( Issue #2612 ).

Running CivetWeb to serve my script on localhost, I could click the file in a directory listing, to reach the description/cancel/install screen. The install button counts down, but clicking it does nothing other than return to the server's directory listing.

The install screen's console only prints this.

The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature. [Hello.user.js]

Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src moz-extension://98f68056-ebee-4433-bb00-091d79825287”). Source: onerror attribute on IMG element. [install-dialog.html]

This happens even when the script is just a bare header.

// ==UserScript==
// @name        Hello World 2
// @namespace   HelloWorld2
// @description This script does nothing.
// @include     https://google.com/*
// @version     1.0
// @grant       none
// ==/UserScript==

Occasionally, the install button randomly results in a success screen, and the console reports that scripts cannot close a page it didn't open, but I still see "No User Scripts Installed!" in GreaseMonkey's dropdown menu.

I also noticed that as I edited the script's @include and tried again, the install screen didn't update its info. The console's undeclared encoding nag provided a link to the script, so clicking that let me see the cached javascript in a new tab. Reloading that tab let GreaseMonkey see the changes I'd made the next time I tried to install.

@jerone
Copy link
Contributor

jerone commented Nov 14, 2017

Same issue; "No user scripts installed!".

Today I updated to Firefox 57.0 build 20171112125346 (latest). and updated GM to 4.0 (after following the official builds).

My gm_scripts folder is full of userscript I previously installed and used.

@tobbexiv
Copy link
Contributor

I have an assumption why this happened:

The migration from files to IndexedDB was run once. All changes to scripts after the migration were not saved properly. All of the scripts I had updated prior to the GM and FF update now have the old status again. So I need to update all of them again ...

So my assumption for your case would be that during the migration there was no script copied and as there was no update to the IndexedDB afterwards, it still seems like no script is installed.

@arantius
Copy link
Collaborator

I'm having a difficult time responding because there is such a mix of various unrelated things mentioned here.

I'm going to

A) Suggest that if you have no scripts installed anyway: uninstall GM completely, restart Firefox, reinstall GM, and try again.
B) If you still have problems, please report more issues, but about only a single topic per issue.

(I'm guessing that something about the 3.x -> 4.0 migration didn't work well. If you're not on Firefox 57 yet, including an "install 3.17" between the uninstall/reinstall steps above might help. Or just leaving the fresh/empty reinstall and starting over?)

@jerone
Copy link
Contributor

jerone commented Nov 15, 2017

Instead of closing this issue, is there any information that i can deliver?

I have the exact same environment at work and updating there worked, resulting in all my userscripts being activated in GM. On my personal environment no userscripts at all are converted (or at least visually activated)!

Isn't there an offline tool or steps of action to convert the "old" userscripts in the gm_scripts folder to the new way of storing?

Windows 10 Pro
Firefox 57.0 x64 build 20171112125346
GM to 4.0 (after following the official builds)

@Vhati
Copy link
Author

Vhati commented Nov 15, 2017

I can confirm my FF profile folder still contains scripts from before the GM update. I can at least copy them elsewhere for safe keeping.

%HOMEPATH%\AppData\Roaming\Mozilla\Firefox\Profiles\rwr1iyq2.default\gm_scripts

I currently have FF 57.0. The UI changed that day, so the FF and GM updates likely coincided.

@Vhati
Copy link
Author

Vhati commented Nov 16, 2017

I tried removing the GM extension, restarting FF, adding GM, and installing another bare "hello world" script (hosted with CivetWeb on localhost).

The "Web Console" says the same stuff as before. GM menu still says "No user scripts installed!"

The "Browser Console" popup says this...

The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature. [Hello.user.js]

Security Error: Content at http://localhost:8080/Hello.user.js may not load or link to moz-extension://892aea1c-fd07-4378-9329-c077b95e2eb1/src/content/install-dialog.html?%7B%22downloadUrl%22%3A%22http%3A//localhost%3A8080/Hello.user.js%22%2C%22excludes%22%3A%5B%5D%2C%22grants%22%3A%5B%22none%22%5D%2C%22includes%22%3A%5B%22https%3A//google.com/*%22%5D%2C%22matches%22%3A%5B%5D%2C%22name%22%3A%22Hello%20World%22%2C%22namespace%22%3A%22HelloWorld%22%2C%22requireUrls%22%3A%5B%5D%2C%22resourceUrls%22%3A%7B%7D%2C%22runAt%22%3A%22end%22%2C%22description%22%3A%22This%20script%20does%20nothing.%22%2C%22version%22%3A%221.0%22%7D.

NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0 [nsISerializationHelper.serializeToString] [Utils.jsm:125]

Security Error: Content at http://localhost:8080/Hello.user.js may not load or link to moz-extension://892aea1c-fd07-4378-9329-c077b95e2eb1/src/content/install-dialog.html?%7B%22downloadUrl%22%3A%22http%3A//localhost%3A8080/Hello.user.js%22%2C%22excludes%22%3A%5B%5D%2C%22grants%22%3A%5B%22none%22%5D%2C%22includes%22%3A%5B%22https%3A//google.com/*%22%5D%2C%22matches%22%3A%5B%5D%2C%22name%22%3A%22Hello%20World%22%2C%22namespace%22%3A%22HelloWorld%22%2C%22requireUrls%22%3A%5B%5D%2C%22resourceUrls%22%3A%7B%7D%2C%22runAt%22%3A%22end%22%2C%22description%22%3A%22This%20script%20does%20nothing.%22%2C%22version%22%3A%221.0%22%7D.

Content Security Policy: The page’s settings blocked the loading of a resource at self (“script-src moz-extension://892aea1c-fd07-4378-9329-c077b95e2eb1”). Source: onerror attribute on IMG element. [install-dialog.html]

SessionHistory: [Exception... "Could not convert JavaScript argument arg 0 [nsISerializationHelper.serializeToString]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: resource://gre/modules/sessionstore/Utils.jsm :: serializePrincipal :: line 125" data: no]

SessionHistory: [Exception... "Could not convert JavaScript argument arg 0 [nsISerializationHelper.serializeToString]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: resource://gre/modules/sessionstore/Utils.jsm :: serializePrincipal :: line 125" data: no]

Migration certainly didn't take place.
But is there an obvious reason I can't install even the simplest script, now?

@arantius
Copy link
Collaborator

https://wiki.greasespot.net/Troubleshooting_(Users)

Try a fresh profile. Does that change anything?

@ocumo
Copy link

ocumo commented Nov 16, 2017

I have the same problem ("No user scripts installed!") but only when I use firefox in private mode, i.e. I run firefox -private in my console (Linux).
If I run firefox in its default non-private mode, then I can see the scripts. I suspect this is what some of you guys are having?
So: could there be anything about private mode that affects greasemonkey or its scripts?
I haven't had enough time yet to troubleshoot this, I have just had the firefox 57 upgrade a couple of hours ago.

@Sxderp
Copy link
Contributor

Sxderp commented Nov 16, 2017

but only when I use firefox in private mode

https://bugzilla.mozilla.org/show_bug.cgi?id=1406675

@ocumo
Copy link

ocumo commented Nov 16, 2017

Aha! Thanks for the bug link! It seems to confirm my observations.

https://bugzilla.mozilla.org/show_bug.cgi?id=1406675

It's a long reading, but there are several pointers there, including a "status-firefox59: --- → affected" that is not very encouraging...
In that discussion, it is said that the bug is not so much related to the private browsing itself, but mostly to the user having selected 'Use custom settings for history' in the History settings (in about:preferences#privacy) and set certain combination of options.

However, I have tried setting the 'Firefox will Remember history' option in private browsing and restarted, and still the problem persists, whereas having an aggressive custom cookie settings in non-private browsing does not show the reported problem. This suggests me that either the issue is not related just with that specific set of options, or it is related with something else altogether, apparently related to the private browsing mode.

@ocumo
Copy link

ocumo commented Nov 16, 2017

Since @arantius already closed this issue with this comment:

If you still have problems, please report more issues, but about only a single topic per issue.

Should this be reopened or should a new issue be created?

@Vhati
Copy link
Author

Vhati commented Nov 16, 2017

@ocumo
Not private for me, but I did have "Never remember history" set. And it would've been that way during the upgrade

I changed it to "Remember history", restarted FF, hosted HelloWorld.user.js via CivetWeb, and installed. This time it worked. I didn't see a success screen, just returned to the directory listing. But that script now appears in the menu.

script_installed

The scripts I had prior to the upgrade did not reappear when I changed the setting, so they were omitted from migration not merely hidden. Installing one of those non-HelloWorld scripts was successful as well.

@Vhati
Copy link
Author

Vhati commented Nov 16, 2017

Hmm, reappearing scripts wouldn't have been a possibility for me. I had removed & reinstalled GM in my previous round of troubleshooting, so stored data, if any, would've been erased, I think.

The scripts I've just installed DO get hidden now when I toggle back and forth between "Remember History" and "Never Remember History" as one might expect.

@Sxderp
Copy link
Contributor

Sxderp commented Nov 17, 2017

if any, would've been erased, I think.

No. I think files are still left in the extension directory. Greasemonkey just doesn't list them. Try going to your Firefox profile and poking around.

@Vhati
Copy link
Author

Vhati commented Nov 17, 2017

@Sxderp

I think files are still left in the extension directory.

Yes, the gm_scripts directory survived the extension removal, and that is worth noting. I meant any inside-the-browser storage, which migration was supposed to populate, was probably erased. That's what happens IIRC when removing an extension in Chrome.
.
Just now, I had that HelloWorld script installed. I removed GreaseMonkey, restarted, installed GreaseMonkey, and HelloWorld is no longer present.

In any case, that I had "Never Remember History" set when migration occurred meant the extension couldn't have populated IndexedDB for me anyway.

@IlBaffo
Copy link

IlBaffo commented Nov 18, 2017

I can confirm that the installed scripts reappear when changing the history option from "Never Remember History" to "Remember History".
I don't know if the script has survived the migration because I have reinstalled it when it disappeared the first time.

@arantius
Copy link
Collaborator

#2598

@robbyone
Copy link

You just need to authorize this moz-extension in your cookies.
First solution:

  • go to Firefox Options > Security
  • add cookie site exception and authorize: moz-extension://fe15e830-aaba-49c6-8f88-8b43105ee5dc

Second solution:

  • authorize all cookies
  • edit one of your user script
  • copy the beginning of opened url : it must be the one I provided you above

@ocumo
Copy link

ocumo commented Nov 23, 2017

@robbyone
No, that url you are showing will not work for any other user than you. The UUID (the string after 'moz-extension://') is a random unique value generated on each install of the extension, so it will not work even for you after you would reinstall the extension. How To Set Extension Cookie Exceptions

@ocumo
Copy link

ocumo commented Nov 23, 2017

Unfortunately, none of the above workarounds, including setting an Extension cookie exception have any effect if you are using Private Browsing Mode (PBM). When you are in PBM, whatever cookie exceptions you set are lost when you close the last PBM window, and when you open again firefox in PBM, your exceptions list will be empty. Also, in PBM, Greasemonkey is still broken no matter what cookie/history settings you set, no matter how restrictive or how relaxed it might be.

In simple words:

Greasemonkey is broken in Private Browsing ("incognito") mode.

@Sxderp
Copy link
Contributor

Sxderp commented Nov 23, 2017

Greasemonkey is broken in Private Browsing ("incognito") mode.

IndexedDB doesn't work in private browsing mode. It's in some Bugzilla somewhere. So while Greasemonkey could use another storage mechanism (though IndexedDB really should be what it uses), this is more of a Mozilla not fixing their stuff before forcing WebExtensions on us.

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

8 participants