Open Bug 1353635 Opened 3 years ago Updated 2 years ago
Script error: chrome://marionette/content/proxy .js, line 195: NS _ERROR _ILLEGAL _VALUE: Component returned failure code: 0x80070057 (send Async)
I think there should be a general message receiver in chrome space that we can send errors to when they arise during the lifetime of a promise. When we fail to send back a message, there is often a promise somewhere that waits for the response. It would be good if we had the ability to abort/reject such promises whenever an internal problem arise in proxy.js. A first pass on this would be to register a global error message handler in driver.js and have proxy.js use that when this.sendAsync fails.
So you would handle this and bug 1336137 differently? I think having such a global message receiver for errors, the promise code in proxy.js could fully make use of it, so we don't even experience a hang and also wouldn't need a timeout. But what I wonder about this is how we can send a message to such a general receiver in chrome scope when the local message sender doesn't work anymore.
The solution I sketched out in https://bugzilla.mozilla.org/show_bug.cgi?id=1336137#c4 requires the same infrastructure: it needs a global handler in chrome that can receive messages at any point in time. A failed call to sendAsync from the frame script could hit this, and a series of actions could be taken. The first basic action would be to log a better error message than “NS_ERROR_ILLEGAL_VALUE: Component returned failure code”, but might also involve cancelling promises or mitigate experiences of a hang.
You need to log in before you can comment on or make changes to this bug.