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

Unexpected behaviour if MOZ_SERVICES_SYNC is disabled for firefox compile #2003

Closed
stevenhoneyman opened this issue Aug 27, 2014 · 10 comments
Closed
Milestone

Comments

@stevenhoneyman
Copy link

One of the configure variables for firefox during build time is MOZ_SERVICES_SYNC. This prevents the Sync service from being compiled in. Greasemonkey is the only thing I could find a problem with - it still runs, still works, and still applies any userscripts that I had installed -- but the menu doesn't list any scripts, the options window just hangs (nothing happens clicking OK), and "Manage User Scripts" isn't there at all.

@arantius
Copy link
Collaborator

Can you check the error console?

@stevenhoneyman
Copy link
Author

Before I go looking for something that I might have disabled... can you point me in the right direction of where I should be looking for that? I thought they disabled the Error Console years ago?

(If it's the web developer console, nothing in that shown for this issue)

@arantius
Copy link
Collaborator

I still call it that because "Browser Console" .. blech. Ctrl-Shift-J should do it.

@stevenhoneyman
Copy link
Author

Ah-ha! that did it. This is the log from open firefox, click the GM dropdown button, click "manage user scripts" (which just opens the extentions page, because GM User Scripts has gone). I then clicked "preferences" for greasemonkey, and tried to click OK (which does nothing visibly)

It doesn't look happy!

TypeError: GM_BrowserUI.gmSvc is undefined browser.js:100
Error: Could not import util getService:
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: resource://greasemonkey/util/getService.js :: <TOP_LEVEL> :: line 3"  data: no] util.js:27
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:94
Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:63
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:100
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:94
Error: Could not import util getService:
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: resource://greasemonkey/util/getService.js :: <TOP_LEVEL> :: line 3"  data: no] util.js:27
[Exception... "Attempting to show unknown type greasemonkey-user-script"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: chrome://mozapps/content/extensions/extensions.js :: gListView_show :: line 2573"  data: no] extensions.js:2573
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:94
Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:63
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:100
A promise chain failed to handle a rejection.

Date: Thu Aug 28 2014 20:56:07 GMT+0100 (BST)
Full Message: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import] XPCOMUtils.jsm:226
Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:63
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:94
Use of getUserData() or setUserData() is deprecated.  Use WeakMap or element.dataset instead. requestNotifier.js:63
TypeError: GM_BrowserUI.gmSvc is undefined browser.js:100

@stevenhoneyman
Copy link
Author

Now I have something to look for...
Seems related: #1842

@arantius
Copy link
Collaborator

From those, it looks like we need an error somewhere at initial launch time to know why the service object wasn't correctly created. (Most of those are just pointing to it missing.)

@Ventero
Copy link
Contributor

Ventero commented Aug 29, 2014

I think Full Message: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import] XPCOMUtils.jsm:226 might be the root cause for this issue, probably triggered by line 19 ff. in sync.js - I'd assume for a build without sync service, there won't be any JS files under resource://sync-service/. This in turn then would cause the import of sync.js in greasemonkey.js to fail.

@stevenhoneyman
Copy link
Author

I've still got my "sync-less" build if you want me to test anything out or provide more info

Ventero added a commit to Ventero/greasemonkey that referenced this issue Aug 30, 2014
@Ventero
Copy link
Contributor

Ventero commented Aug 30, 2014

Ventero@63d11de should fix this issue, if I'm not mistaken. I couldn't verify this myself though, as I seem to be hitting https://bugzilla.mozilla.org/show_bug.cgi?id=883679 (or a similar bug) with my sync-less build.

@stevenhoneyman
Copy link
Author

Great work! It does indeed fix the issue:

2.2 Stable (no "User Scripts" option on the left):
before

With your git branch (notice there is no Sync option in firefox prefs at all!):
after

@arantius arantius added this to the 2.3 milestone Aug 30, 2014
@arantius arantius modified the milestones: 2.3, 2.4 Sep 21, 2014
@arantius arantius modified the milestones: 2.4, 2.5, 2.6 Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants