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

Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISyncMessageSender.sendSyncMessage] #2506

Closed
fdellwing opened this Issue May 23, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@fdellwing

fdellwing commented May 23, 2017

I get the following error while running a userscript more than ~5 times at the same time. (Yes, this is a very likely situation for this script, because you open a lot of new tabs)

19:48:41.905 Exception { message: "Component returned failure code: 0x…", result: 2147549183, name: "NS_ERROR_UNEXPECTED", filename: "chrome://greasemonkey-modules/conte…", lineNumber: 59, columnNumber: 0, data: null, stack: "GM_ScriptStorageFront.prototype.get…", location: XPCWrappedNative_NoHelper } 1 mm_skills_0_21.user.js:936:3

filename: chrome://greasemonkey-modules/content/storageFront.js
message: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsISyncMessageSender.sendSyncMessage]
stack: "GM_ScriptStorageFront.prototype.getValue@chrome://greasemonkey-modules/content/storageFront.js:59:15hitch/<@chrome://greasemonkey-modules/content/util/hitch.js:27:12saveSkillDescIntoStorage@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:925:14skillDescMain@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:1602:2@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:356:2evalWithWrapper@chrome://greasemonkey-modules/content/sandbox.js:191:7evalWithCatch@chrome://greasemonkey-modules/content/sandbox.js:215:7runScriptInSandbox@chrome://greasemonkey-modules/content/sandbox.js:230:3injectScripts@chrome://greasemonkey/content/framescript.js:119:5runScripts@chrome://greasemonkey/content/framescript.js:149:3contentLoad@chrome://greasemonkey/content/framescript.js:72:3openTabPrompt@resource://gre/components/nsPrompter.js:420:13openPrompt@resource://gre/components/nsPrompter.js:535:17alert@resource://gre/components/nsPrompter.js:602:9transmitErrorMessageToServer@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:384:3saveSkillDescIntoStorage@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:937:3skillDescMain@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:1602:2@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Mach_fertigkeiten_huebsch/mm_skills_0_21.user.js:356:2evalWithWrapper@chrome://greasemonkey-modules/content/sandbox.js:191:7evalWithCatch@chrome://greasemonkey-modules/content/sandbox.js:215:7runScriptInSandbox@chrome://greasemonkey-modules/content/sandbox.js:230:3injectScripts@chrome://greasemonkey/content/framescript.js:119:5runScripts@chrome://greasemonkey/content/framescript.js:149:3contentLoad@chrome://greasemonkey/content/framescript.js:72:3waitForSyncCallback@resource://services-common/async.js:98:7makeSpinningCallback/callback.wait@resource://services-common/async.js:168:27promiseSpinningly@resource://services-common/async.js:234:12get changedIDs@resource://services-sync/engines.js:97:5addChangedID@resource://services-sync/engines.js:158:1notifyEvent@chrome://greasemonkey-modules/content/sync.js:229:11Config.prototype._notifyObservers@chrome://greasemonkey/content/config.js:47:5Config.prototype._changed@chrome://greasemonkey/content/config.js:56:3Script.prototype._changed@chrome://greasemonkey-modules/content/script.js:91:3GM_ScriptStorageBack.prototype.setValue@chrome://greasemonkey-modules/content/storageBack.js:83:3service.prototype.handleScriptValMsg@jar:file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/extensions/%7Be4a8a97b-f2ed-450b-b12d-ee082ba24781%7D.xpi!/components/greasemonkey.js:243:12GM_ScriptStorageFront.prototype.setValue@chrome://greasemonkey-modules/content/storageFront.js:52:3hitch/<@chrome://greasemonkey-modules/content/util/hitch.js:27:12onload@file:///C:/Users/Zero10/AppData/Roaming/Mozilla/Firefox/Profiles/71wnn5e5.dev-edition-default/gm_scripts/Dunuins_Countdown/dunuins_countdown_gm_0_4_12.user.js:143:57GM_xmlhttpRequester.prototype.setupRequestEvent/</<@chrome://greasemonkey-modules/content/xmlhttprequester.js:285:31setTimeout handler*GM_xmlhttpRequester.prototype.setupRequestEvent/<@chrome://greasemonkey-modules/content/xmlhttprequester.js:284:5fileXhr@chrome://greasemonkey-modules/content/util/fileXhr.js:20:3loadFile@chrome://greasemonkey-modules/content/util/loadFile.js:63:10evalWithWrapper@chrome://greasemonkey-modules/content/sandbox.js:189:18evalWithCatch@chrome://greasemonkey-modules/content/sandbox.js:215:7runScriptInSandbox@chrome://greasemonkey-modules/content/sandbox.js:230:3injectScripts@chrome://greasemonkey/content/framescript.js:119:5runScripts@chrome://greasemonkey/content/framescript.js:149:3contentLoad/<@chrome://greasemonkey/content/framescript.js:73:32observe@chrome://greasemonkey-modules/content/util/timeout.js:17:7"

This is the code that throws the error:

function saveSkillDescIntoStorage(skillName, content) {
	var functionName = "saveSkillDescIntoStorage";
	try {
		
	var skill = GM_getValue(world + '_' + skillName, false)
	
	//If it is only a placeholder or if the content is different from the saved content save the readout.
	if (skill == 'Platzhalter')
		GM_setValue(world + '_' + skillName, JSON.stringify(content));
	else if (skill != JSON.stringify(content))
		GM_setValue(world + '_' + skillName, JSON.stringify(content));
	else
		return false;
	
	} catch(e) {
		console.log(e);
		transmitErrorMessageToServer(functionName, e);
	}
}

It is pretty hard to really log this error, because the error object GM throws is protected as hell. I cant even run toString oder JSON.stringify on it and me error function fails completely...

This seems to be a problem like in #2503 bit without the xmlhttprequest.

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci May 23, 2017

Contributor

Using sendRpcMessage instead of sendSyncMessage?
See also #2107 (comment)

Maybe it would help...

Contributor

janekptacijarabaci commented May 23, 2017

Using sendRpcMessage instead of sendSyncMessage?
See also #2107 (comment)

Maybe it would help...

@fdellwing

This comment has been minimized.

Show comment
Hide comment
@fdellwing

fdellwing May 24, 2017

Will try this, but it is not a solution, because I cannot tell everyone using this script to hack into GM themself.

fdellwing commented May 24, 2017

Will try this, but it is not a solution, because I cannot tell everyone using this script to hack into GM themself.

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci May 24, 2017

Contributor

Yes. but... It doesn't happen often (throws this errors). I can't verify if this is the solution (or at least partially - if it was better than nothing).

Contributor

janekptacijarabaci commented May 24, 2017

Yes. but... It doesn't happen often (throws this errors). I can't verify if this is the solution (or at least partially - if it was better than nothing).

@fdellwing

This comment has been minimized.

Show comment
Hide comment
@fdellwing

fdellwing May 24, 2017

I tried this, but firefox deactivated the addon because reasons. Any ideas how to get around that?

fdellwing commented May 24, 2017

I tried this, but firefox deactivated the addon because reasons. Any ideas how to get around that?

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci May 24, 2017

Contributor

You can try using a Unbranded build or a Nightly version with:
about:config
xpinstall.signatures.required = false

Contributor

janekptacijarabaci commented May 24, 2017

You can try using a Unbranded build or a Nightly version with:
about:config
xpinstall.signatures.required = false

@fdellwing

This comment has been minimized.

Show comment
Hide comment
@fdellwing

fdellwing May 24, 2017

Ok, got it to work.

The problem is gone after replacing all 4 occurences of this._messageManager.sendSyncMessage with this._messageManager.sendRpcMessage. Run the script like 40 times at the same time and no errors.

But as I statet above, I need this to be fixxed from official site :/

fdellwing commented May 24, 2017

Ok, got it to work.

The problem is gone after replacing all 4 occurences of this._messageManager.sendSyncMessage with this._messageManager.sendRpcMessage. Run the script like 40 times at the same time and no errors.

But as I statet above, I need this to be fixxed from official site :/

@janekptacijarabaci

This comment has been minimized.

Show comment
Hide comment
@janekptacijarabaci

janekptacijarabaci May 24, 2017

Contributor

Thank you.

Contributor

janekptacijarabaci commented May 24, 2017

Thank you.

@fdellwing

This comment has been minimized.

Show comment
Hide comment
@fdellwing

fdellwing May 24, 2017

Thank you, too.

fdellwing commented May 24, 2017

Thank you, too.

@makyen

This comment has been minimized.

Show comment
Hide comment
@makyen

makyen May 28, 2017

For me, this issue immediately began occurring upon upgrade to Firefox 53.0. In the script I'm working on, under normal use, the exception occurs 100% of the time for some calls to GM_getValue(), but not all. It does not occur at all using the same profile and the same conditions, under Firefox 52.0.2.

The above pull request, #2507, does fix the problem in FF53.0.3 (testing in FF53.0.3 required disabling signature checking).

makyen commented May 28, 2017

For me, this issue immediately began occurring upon upgrade to Firefox 53.0. In the script I'm working on, under normal use, the exception occurs 100% of the time for some calls to GM_getValue(), but not all. It does not occur at all using the same profile and the same conditions, under Firefox 52.0.2.

The above pull request, #2507, does fix the problem in FF53.0.3 (testing in FF53.0.3 required disabling signature checking).

@arantius arantius modified the milestone: Bankruptcy Jul 25, 2017

@arantius arantius closed this Jul 25, 2017

Repository owner deleted a comment from fdellwing Sep 13, 2017

@arantius arantius modified the milestones: Bankruptcy, 3.12 Sep 13, 2017

@arantius arantius reopened this Sep 13, 2017

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Sep 13, 2017

Collaborator

Handled in #2537 .

Collaborator

arantius commented Sep 13, 2017

Handled in #2537 .

@arantius arantius closed this Sep 13, 2017

@arantius

This comment has been minimized.

Show comment
Hide comment
@arantius

arantius Sep 13, 2017

Collaborator

This should be fixed in: https://addons.mozilla.org/firefox/downloads/file/722216/greasemonkey-3.12beta1-fx.xpi?src=devhub

Testing this beta version and reporting back here would be very useful!

Collaborator

arantius commented Sep 13, 2017

This should be fixed in: https://addons.mozilla.org/firefox/downloads/file/722216/greasemonkey-3.12beta1-fx.xpi?src=devhub

Testing this beta version and reporting back here would be very useful!

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