Closed Bug 757174 Opened 12 years ago Closed 12 years ago

Marionette throws opaque error if gecko is closed while session is active

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jgriffin, Assigned: automatedtester)

Details

Attachments

(1 file)

See c.f. bug 756085.  When a marionette session is active and gecko is closed, the Python testrunner shows this very unhelpful error message:

Traceback (most recent call last):
  File "../mats_runner\mats_runner.py", line 63, in start
    print self.marionette.navigate(self.url)
  File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\m
arionette.py", line 271, in navigate
    response = self._send_message('goUrl', 'ok', value=url)
  File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\m
arionette.py", line 160, in _send_message
    response = self.client.send(message)
  File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\c
lient.py", line 111, in send
    response = self.receive()
  File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\c
lient.py", line 78, in receive
    response += self._recv_n_bytes(int(length) + 1 + len(length) - 10)
ValueError: invalid literal for int() with base 10: ''

This happens because the socket is closed, but the Python client isn't handling this well.
Assignee: nobody → dburns
Comment on attachment 626375 [details] [diff] [review]
Handle nothing coming from socket and error

Review of attachment 626375 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great, thanks!

::: testing/marionette/client/marionette/client.py
@@ +53,1 @@
>  

Let's replace 'browser' with 'gecko', since our target isn't always a browser, and let's add ', socket closed?' to the end to indicate to the most likely cause of this error.
Attachment #626375 - Flags: review?(jgriffin) → review+
landed in https://github.com/mozilla/marionette_client/commit/4b5d016be3fa9a21f1fdd16e922dcaf2db6188a5
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: