Gecko driver not launching / not found on Travis CI

458 views
Skip to first unread message

Alan Blyth

unread,
Oct 27, 2016, 12:23:11 PM10/27/16
to Selenium Users
My test's are working great locally, but I am really struggling to get them working on TravisCI, I think my problem is launching the geckodriver, this is the error i am seeing:

-------------------------------------------------------

T E S T S

-------------------------------------------------------

Running test.java.ATest

Does geckodriver exist? true

Start of Tests

Working Directory = /home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium

/home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: 1: /home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: cannot open U �� __const__TEXTA 0� A __cstring__TEXT0@ � 0@ __unwind_info__TEXT p8 __eh_frame__TEXT�� @m �� h __DATA! : No such file

/home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: 1: /home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: ���� � : not found

/home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: 2: /home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium/geckodriver: Syntax error: "(" unexpected


If i remove the geckodriver from the directory I get this error:

-------------------------------------------------------

T E S T S

-------------------------------------------------------

Running test.java.ATest

Start of Tests

Working Directory = /home/travis/build/alan-blyth/tririga-test-automation/Selenium Workspace/mandsiwms-selenium

java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases



Any help would be greatly appreciated!

David Savage

unread,
Aug 11, 2017, 10:17:16 AM8/11/17
to Selenium Users
Apologies if this is the wrong protocol for this group. Just to say that I too have this issue. Slightly different scenario: I'm trying to use geckodriver to run selenium tests written in Java/JUnit (built with maven) on Raspberry PI 3 (Raspbian).

I have this in my unit test setUp:
wd = new FirefoxDriver();
wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

That works on Windows but I get this on my Linux box:
Running com.business.homestead.app.LoginTest
/usr/local/bin/geckodriver: 1: /usr/local/bin/geckodriver: Syntax error: "(" unexpected
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 22.872 sec <<< FAILURE!
LoginTest(com.assureconsulting.homestead.app.LoginTest)  Time elapsed: 22.62 sec  <<< ERROR!
org.openqa.selenium.WebDriverException: The driver server has unexpectedly died!
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'raspberrypi', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'arm', os.version: '4.9.28-v7+', java.version: '1.8.0_65'
Driver info: driver.version: FirefoxDriver
 at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:88)
 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
 at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
 at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
 at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
 at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
 at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:108)
 at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:104)
 at com.assureconsulting.homestead.app.BaseUITest.setUp(BaseUITest.java:17)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
 at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
 at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:19013 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused
 at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)
 at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
 at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
 at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
 at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
 at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
 at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
 at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
 at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:139)
 at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:87)
 at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:343)
 at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
 at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
 at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
 ... 38 more
Caused by: java.net.ConnectException: Connection refused
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
 at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
 at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
 at java.net.Socket.connect(Socket.java:589)
 at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
 at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
 ... 53 more
LoginTest(com.assureconsulting.homestead.app.LoginTest)  Time elapsed: 22.623 sec  <<< ERROR!
java.lang.NullPointerException
 at com.assureconsulting.homestead.app.BaseUITest.tearDown(BaseUITest.java:26)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
 at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
 at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Results :
Tests in error:
  LoginTest(com.assureconsulting.homestead.app.LoginTest): The driver server has unexpectedly died!(..)
Reply all
Reply to author
Forward
0 new messages