Hello there.
I can't run test only with chrome on my server.
I have no problems in same situations on "PC (win7).+firefox/chrome" and "Debian+firefox"
Meta -
OS: Linux debian-8-64bit 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
selenium-server-standalone: 3.6.0
chromedriver 2.33
Google Chrome 62.0.3202.75
Expected Behavior -
Run php example with standalone selenium and chrome
Actual Behavior -
errors
Steps to reproduce -
I do:
a)
selenium start command:
DISPLAY=:99 xvfb-run -a -n 1 -l -s "-screen 0, 1024x768x8" java -Dwebdriver.chrome.driver="/var/path/to/chromedriver" -jar /var/path/to/selenium-server-standalone-3.6.0.jar -debug
output:
14:31:00.779 INFO - Selenium build info: version: '3.6.0', revision: '6fbf3ec767'
14:31:00.780 INFO - Launching a standalone Selenium Server
2017-11-01 14:31:00.822:INFO::main: Logging initialized @453ms to org.seleniumhq.jetty9.util.log.StdErrLog
14:31:00.927 INFO - Driver class not found: com.opera.core.systems.OperaDriver
14:31:00.995 INFO - Driver provider class 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 LINUX
14:31:00.995 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX
14:31:00.996 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX
14:31:01.048 INFO - Using the passthrough mode handler
2017-11-01 14:31:01.114:INFO:osjs.Server:main: jetty-9.4.5.v20170502
2017-11-01 14:31:01.187:WARN:osjs.SecurityHandler:main: ServletContext@o.s.j.s.ServletContextHandler@eec5a4a{/,null,STARTING} has uncovered http methods for path: /
2017-11-01 14:31:01.198:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@eec5a4a{/,null,AVAILABLE}
2017-11-01 14:31:01.221:INFO:osjs.AbstractConnector:main: Started ServerConnector@4d20d191{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-11-01 14:31:01.222:INFO:osjs.Server:main: Started @854ms
14:31:01.222 INFO - Selenium Server is up and running
b) run php script
<?php
namespace Facebook\WebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
require_once('vendor/autoload.php');
$host = 'http://localhost:4444/wd/hub';
$capabilities = DesiredCapabilities::chrome();
try {
$driver = RemoteWebDriver::create($host, $capabilities, 5000);
}
catch(\Exception $e){
print $e->getMessage()."\r\n";
exit;
}
$driver->quit();
selenium's new output:
2017-11-01 14:31:05.811:INFO:osjshC.ROOT:qtp1910163204-9: org.openqa.selenium.remote.server.WebDriverServlet-28d25987: Initialising WebDriverServlet
14:31:05.889 INFO - Binding default provider to: org.openqa.selenium.chrome.ChromeDriverService
14:31:05.892 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@a0ebfd1
14:31:05.898 INFO - /session: Executing POST on /session (handler: BeginSession)
14:31:05.953 DEBUG - Memory-based payload for: {desiredCapabilities={browserName=chrome, platform=ANY}}
14:31:05.970 INFO - Capabilities are: Capabilities {browserName=chrome, platformName=ANY, platform=ANY, }
14:31:05.973 INFO - Capabilities {browserName=chrome, platformName=ANY, platform=ANY, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
14:31:05.974 INFO - Capabilities {browserName=chrome, platformName=ANY, platform=ANY, } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
14:31:06.004 DEBUG - Waiting for [http://localhost:7580/status]
14:31:06.014 DEBUG - Polling http://localhost:7580/status
Starting ChromeDriver 2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4) on port 7580
Only local connections are allowed.
14:31:06.045 DEBUG - sun.net.www.MessageHeader@32cfe9d5 pairs: {GET /status HTTP/1.1: null}{User-Agent: Java/1.8.0_151}{Host: localhost:7580}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
14:31:06.047 DEBUG - sun.net.www.MessageHeader@462e609c4 pairs: {null: HTTP/1.1 200 OK}{Content-Length: 130}{Content-Type: application/json; charset=utf-8}{Connection: close}
14:31:06.772 DEBUG - CookieSpec selected: default
14:31:06.787 DEBUG - Auth cache not set in the context
14:31:06.789 DEBUG - Connection request: [route: {}->http://localhost:7580][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
14:31:06.811 DEBUG - Connection leased: [id: 0][route: {}->http://localhost:7580][total kept alive: 0; route allocated: 1 of 2000; total allocated: 1 of 2000]
14:31:06.813 DEBUG - Opening connection {}->http://localhost:7580
14:31:06.814 DEBUG - Connecting to localhost/127.0.0.1:7580
14:31:06.816 DEBUG - Connection established 127.0.0.1:47958<->127.0.0.1:7580
14:31:06.817 DEBUG - http-outgoing-0: set socket timeout to 10800000
14:31:06.817 DEBUG - Executing request POST /session HTTP/1.1
14:31:06.817 DEBUG - Target auth state: UNCHALLENGED
14:31:06.818 DEBUG - Proxy auth state: UNCHALLENGED
14:31:06.820 DEBUG - http-outgoing-0 >> POST /session HTTP/1.1
14:31:06.820 DEBUG - http-outgoing-0 >> Content-Type: application/json; charset=utf-8
14:31:06.820 DEBUG - http-outgoing-0 >> Content-Length: 65
14:31:06.820 DEBUG - http-outgoing-0 >> Host: localhost:7580
14:31:06.821 DEBUG - http-outgoing-0 >> Connection: Keep-Alive
14:31:06.821 DEBUG - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)
14:31:06.821 DEBUG - http-outgoing-0 >> Accept-Encoding: gzip,deflate
14:31:06.821 DEBUG - http-outgoing-0 >> "POST /session HTTP/1.1[\r][\n]"
14:31:06.822 DEBUG - http-outgoing-0 >> "Content-Type: application/json; charset=utf-8[\r][\n]"
14:31:06.822 DEBUG - http-outgoing-0 >> "Content-Length: 65[\r][\n]"
14:31:06.822 DEBUG - http-outgoing-0 >> "Host: localhost:7580[\r][\n]"
14:31:06.823 DEBUG - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
14:31:06.828 DEBUG - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_151)[\r][\n]"
14:31:06.829 DEBUG - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
14:31:06.829 DEBUG - http-outgoing-0 >> "[\r][\n]"
14:31:06.830 DEBUG - http-outgoing-0 >> "{"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}"
14:32:06.852 DEBUG - http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
14:32:06.852 DEBUG - http-outgoing-0 << "Content-Length:262[\r][\n]"
14:32:06.853 DEBUG - http-outgoing-0 << "Content-Type:application/json; charset=utf-8[\r][\n]"
14:32:06.853 DEBUG - http-outgoing-0 << "Connection:close[\r][\n]"
14:32:06.853 DEBUG - http-outgoing-0 << "[\r][\n]"
14:32:06.853 DEBUG - http-outgoing-0 << "{"sessionId":"a2854bd9899102bc1cf281e13dfe34f6","status":13,"value":{"message":"unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 3.16.0-4-amd64 x86_64)"}}"
14:32:06.858 DEBUG - http-outgoing-0 << HTTP/1.1 200 OK
14:32:06.858 DEBUG - http-outgoing-0 << Content-Length:262
14:32:06.859 DEBUG - http-outgoing-0 << Content-Type:application/json; charset=utf-8
14:32:06.859 DEBUG - http-outgoing-0 << Connection:close
14:32:06.864 DEBUG - http-outgoing-0: Close connection
14:32:06.865 DEBUG - Connection discarded
14:32:06.865 DEBUG - Connection released: [id: 0][route: {}->http://localhost:7580][total kept alive: 0; route allocated: 0 of 2000; total allocated: 0 of 2000]
php's output
root@debian-8-64bit:/var/www/site# php test.php
Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}
Hello there.
I can't run test only with chrome on my server.
I have no problems in same situations on "PC (win7).+firefox/chrome" and "Debian+firefox"
Meta -
OS: Linux debian-8-64bit 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
selenium-server-standalone: 3.6.0
chromedriver 2.33
Google Chrome 62.0.3202.75
Expected Behavior -
Run php example with standalone selenium and chrome
Actual Behavior -
errors
Steps to reproduce -
I do:
a)
selenium start command:
DISPLAY=:99 xvfb-run -a -n 1 -l -s "-screen 0, 1024x768x8" java -Dwebdriver.chrome.driver="/var/path/to/chromedriver" -jar /var/path/to/selenium-server-standalone-3.6.0.jar -debugoutput:
b) run php script
selenium's new output:
php's output