bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Marionette server should return to the client any internal errors/exceptions it hits

RESOLVED INCOMPLETE

Status

Testing
Marionette
RESOLVED INCOMPLETE
4 years ago
2 years ago

People

(Reporter: mdas, Unassigned)

Tracking

({ateam-marionette-server})

Trunk
ateam-marionette-server
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Whenever possible (ie: whenever the marionette-server doesn't go down or the connection isn't severed), if the server hits an exception when processing a command, we should return that exception to the client. For example, if the client wants to call send_keys, then we should do our best to execute the send_keys command, but if it fails (let's say an uncaught exception is thrown from marionette-sendkeys.js for some reason) and the server can still continue working, we should return that uncaught exception to the client.

We currently just hang instead of respond, and the user has to go and look at gecko logs for any errors, which makes it a time consuming and annoying process to go through.
Using callbacks for this kind of this is totally doable if your really paranoid about adding lots of try/catch on the other hand using promises (generators add tons of memory overhead still lets not go there yet) have a clear path towards handling both passes errors and uncaught exceptions... Something like this for example could be used.

on('marionetteCommand', function(stuffFromClient) { 
  runSomeMarionetteCommand(stuffFromClient).then(function(response) {
    // send response
  }).catch(function(err) {
    // handle some error in either sending the response or from further up the promise chain...
    // log internal error
    // send internal error message to client
  });
});
Keywords: ateam-marionette-server
we have solved this as part of the larger refactor we did. THere may be edge cases but we can raise bugs accordingly.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.