Closed Bug 959517 Opened 10 years ago Closed 10 years ago

Clarify connection error message

Categories

(Remote Protocol :: Marionette, defect)

x86
All
defect
Not set
normal

Tracking

(firefox29 wontfix, firefox30 fixed, firefox31 fixed, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
mozilla31
Tracking Status
firefox29 --- wontfix
firefox30 --- fixed
firefox31 --- fixed
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: mdas, Assigned: mishravikas)

Details

Attachments

(1 file)

The Marionette connection error messages is unclear.

If you didn't forward your port or if marionette is unreachable, you get:
"Exception: Could not connect to given marionette host:port: [Errno 61] Connection refused"

Which 1) doesn't print out which host/port was given, 2) not clear whether the host is unreachable or the host/port combination, 3) "refused" is not the right word and 4) doesn't give you an actionable item.
Hi, I would like to work on this bug, can you assign this to me please?
Assignee: mdas → vikasmishra95
You'll need a local copy of mozilla-central to make changes and test them:

https://hg.mozilla.org/mozilla-central/

the Marionette client lives in 
<mozilla-central>/source/testing/marionette/client/marionette/

And this exact line is from:
http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/runner/base.py#657

To replicate the error locally, go into:

<mozilla-central>/source/testing/marionette/client/

and start a virtual environment:

virtualenv my_venv

(if you do not have virtualenv, install it using `pip install virtualenv`)

Then activate it and install marionette client:

. my_venv/bin/activate
python setup.py develop

To get the error message, do:

marionette --address=localhost:2828 marionette/tests/unit/test_log.py

This should cause that message to show up.

To fix this, we should 1) print out which host and port combination we're trying.

2) we should verify if the host is reachable, perhaps by pinging the host.

3) the language should be more like: "Connection attempt failed"

4) If the host is not reachable, we shoudl print something like "<host> could not be pinged, is <host> available?"  If the host is reachable, we should ask them to check if the port is actually open.

To test the case where a connection is actually made, you can start firefox with marionette enabled. To do this, find where your Firefox executable is on your computer and launch it via the shell with the command line argument --marionette. For example, unix systems like OSX you can do:

/Applications/Firefox.app/Contents/MacOS/firefox --marionette

This will launch Firefox with Marionette running on localhost:2828
verifying the host through a ping might be flaky, so we'll leave that up to the user.
Attached patch bug959517.patchSplinter Review
Attachment #8392296 - Flags: review?(mdas)
Comment on attachment 8392296 [details] [diff] [review]
bug959517.patch

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

Thanks!
Attachment #8392296 - Flags: review?(mdas) → review+
https://hg.mozilla.org/mozilla-central/rev/bf236376056c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
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: