SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
346 stars 194 forks source link

Quicker and clearer failing of 7055+ 7054 ports #2308

Open lukeis opened 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 2308

Some folks have iptables, or bizarreo /etc/hosts entries that prevent Selenium kicking
off a firefox then attaching to it.

If Selenium were to first ....

   a) open a SocketServer (Java) and try to attach to it from the same process

   b) launch a known exe on the arch in question to do (a) because its more representative
of real world problems than a java<-->java thing inside the same process.

.... we could prove that the 'causes' above are not going to thwart the subsequent
firefox.exe invocation (and JS listening on a socket).

Reported by paul@hammant.org on 2011-08-19 19:20:54

lukeis commented 8 years ago
I have noticed, at least with the python driver, that if you get caught in this, you
have to explicitly kill the firefox session. We could be more friendly and close firefox,
outputing the exception to the console. 

Reported by kenneth@decipherinc.com on 2011-08-19 22:05:47

lukeis commented 8 years ago
is there a known solution for this, I am seeing this using python and the webdriver....

  File "test_example.py", line 6, in <module>
    driver = webdriver.Firefox()
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.py",
line 46, in __init__
    self.binary, timeout),
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/extension_connection.py",
line 46, in __init__
    self.binary.launch_browser(self.profile)
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py",
line 44, in launch_browser
    self._wait_until_connectable() 
  File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/firefox_binary.py",
line 87, in _wait_until_connectable
    raise WebDriverException("Can't load the profile. Profile Dir : %s" % self.profile.path)
selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile
Dir : /tmp/tmpU36SEh" 

Reported by aquaperf on 2011-08-25 00:28:05

lukeis commented 8 years ago
This appears to be the same exception I was encountering. Unblocking the port seems
to have fixed this for me.

Reported by Kenneth.Koontz on 2011-08-25 03:08:19

lukeis commented 8 years ago
thanks kenneth think we figured it out, we create profiles in our configuration and
ended up creating a "selenium" profile and a new instance of the driver

Reported by aquaperf on 2011-08-25 21:33:23

lukeis commented 8 years ago
Have noticed this problem when trying to run tests where $DISPLAY is not set. That could
be something to quickly check for too?

Reported by nigel@shoptime.co.nz on 2011-08-31 01:46:40

lukeis commented 8 years ago

Reported by barancev on 2011-10-13 08:11:09

lukeis commented 8 years ago
Hi 
I am running in the same error. 
WebDriverException: Message: "Can't load the profile. Profile Dir :%dir%".
I am using Windows 7, Selenium 2.13.
The error happen after updating Firefox to version 8. With 3.6 and 7.0 I didn't get
this error. 
I have tried almost everything described and also creating new profiles, but the error
is still there. 
Please help how to solve it.
By investigating on this I found the the Socket is not getting connected for some reason.
I make all ports free, but it doesn't change it.

Reported by hali4ka on 2011-11-23 11:51:33

lukeis commented 8 years ago
I'm seeing it too, on Windows 7.

Reported by jaibel@accurev.com on 2011-11-30 21:07:36

lukeis commented 8 years ago
the same thing is happening on c#

Reported by souza.luizdiego on 2013-01-28 11:01:35

lukeis commented 8 years ago
Is it ever possible to implement such a schema that will be compatible with ability
to run tests in parallel? (ports 7054,7055 can be locked by parallel tests and we should
wait instead of failing fast)

Reported by barancev on 2013-05-19 12:46:21

lukeis commented 8 years ago

Reported by barancev on 2013-05-19 12:46:58

lukeis commented 8 years ago

Reported by a.u.savchuk on 2013-09-20 13:52:06

lukeis commented 8 years ago

Reported by barancev on 2014-01-30 07:45:48

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 17:44:25