Tools: Error: Unable to connect to selenium

Created on 24 Jun 2017  路  4Comments  路  Source: Polymer/tools

Hey currently i am trying to use web component tester and when i run wct on the seed element then i keep on getting this error(Error: Unable to connect to selenium) after some time.

This is exactly what is happening when i run wct in the terminal. How can i solve this?

selenium-standalone installation starting


selenium install:
from: https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar

to: /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/.selenium/selenium-server/3.0.1-server.jar

chrome install:
from: https://chromedriver.storage.googleapis.com/2.30/chromedriver_mac64.zip

to: /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/.selenium/chromedriver/2.30-x64-chromedriver

firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-macos.tar.gz

to: /usr/local/lib/node_modules/web-component-tester/node_modules/selenium-standalone/.selenium/geckodriver/0.11.1-x64-geckodriver

File from https://chromedriver.storage.googleapis.com/2.30/chromedriver_mac64.zip has already been downloaded

File from https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.1.jar has already been downloaded

File from https://github.com/mozilla/geckodriver/releases/download/v0.11.1/geckodriver-v0.11.1-macos.tar.gz has already been downloaded


selenium-standalone installation finished

11:52:56.823 INFO - Selenium build info: version: '3.0.1', revision: '1969d75'
11:52:56.824 INFO - Launching a standalone Selenium Server
2017-06-24 11:52:56.921:INFO::main: Logging initialized @2052ms
11:52:57.039 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC
11:52:57.040 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC
11:52:57.040 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:52:57.040 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
11:52:57.041 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:52:57.041 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
2017-06-24 11:52:57.250:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2017-06-24 11:52:57.342:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@7dc7cbad{/,null,AVAILABLE}

2017-06-24 11:52:57.508:INFO:osjs.ServerConnector:main: Started ServerConnector@1d057a39{HTTP/1.1}{0.0.0.0:49740}

2017-06-24 11:52:57.508:INFO:osjs.Server:main: Started @2639ms

11:52:57.509 INFO - Selenium Server is up and running

Error: Unable to connect to selenium

web-component-tester

Most helpful comment

Finally i got it fixed after lot of struggle. It was happening because my localhost was mapped according to new Ipv6 standard like [::1] but the selenium needed the ipv4 address like 127.0.0.1. so i had to change it using the command in my system like this :

Open a terminal window and type this line:
sudo open -a TextEdit /etc/hosts
You will be prompt to type in your admin password and your host file will open in TextEdit. Add this line in your host file :

127.0.0.1 localhost
Save the file and close. That's it.

All 4 comments

Finally i got it fixed after lot of struggle. It was happening because my localhost was mapped according to new Ipv6 standard like [::1] but the selenium needed the ipv4 address like 127.0.0.1. so i had to change it using the command in my system like this :

Open a terminal window and type this line:
sudo open -a TextEdit /etc/hosts
You will be prompt to type in your admin password and your host file will open in TextEdit. Add this line in your host file :

127.0.0.1 localhost
Save the file and close. That's it.

I saw you posted this issue this morning and was going to ask you about your /etc/hosts because I recall the same thing happening when running wct in a Vagrant environment. I'm glad you figured it out 馃憤

@gauravkk22 Thanks for the post, we were stuck for almost day, with no clue why chrome is not working.

This post helped a lot.
Faced issue on - Chrome -72, selenium driver -2.46 and mac os 10.13

@gauravkk22 Thanks for the post, we were stuck for almost day, with no clue why chrome is not working.

This post helped a lot.
Faced issue on - Chrome -72, selenium driver -2.46 and mac os 10.13

Great @nsmandal 馃憤

Was this page helpful?
0 / 5 - 0 ratings