• Почему ChromeDriver пытается открыть сайт через https?

    hanas
    @hanas Автор вопроса
    Максим Федоров, поменял, но результат не изменился:
    логи
    Creating network "codeception_default" with the default driver
    Creating codeception_chrome_1 ... done
    Creating codeception_selenium-hub_1 ... done
    Creating codeception_app_1          ... done
    Attaching to codeception_chrome_1, codeception_selenium-hub_1, codeception_app_1
    chrome_1        | 2019-04-04 13:33:49,031 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
    chrome_1        | 2019-04-04 13:33:49,034 INFO supervisord started with pid 8
    chrome_1        | 2019-04-04 13:33:50,036 INFO spawned: 'xvfb' with pid 11
    chrome_1        | 2019-04-04 13:33:50,038 INFO spawned: 'selenium-node' with pid 12
    chrome_1        | Connecting to the Hub using the host selenium-hub and port 4444
    chrome_1        | 2019-04-04 13:33:50,219 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
    chrome_1        | 2019-04-04 13:33:50,219 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
    selenium-hub_1  | 2019-04-04 13:33:49,855 INFO Included extra file "/etc/supervisor/conf.d/selenium-hub.conf" during parsing
    selenium-hub_1  | 2019-04-04 13:33:49,858 INFO supervisord started with pid 7
    chrome_1        | 13:33:50.716 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
    selenium-hub_1  | 2019-04-04 13:33:50,860 INFO spawned: 'selenium-hub' with pid 10
    selenium-hub_1  | Starting Selenium Hub with configuration:
    selenium-hub_1  | 2019-04-04 13:33:50,881 INFO success: selenium-hub entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
    selenium-hub_1  | {
    selenium-hub_1  |   "host": "0.0.0.0",
    selenium-hub_1  |   "port": 4444,
    selenium-hub_1  |   "role": "hub",
    selenium-hub_1  |   "maxSession": 5,
    selenium-hub_1  |   "newSessionWaitTimeout": -1,
    selenium-hub_1  |   "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
    selenium-hub_1  |   "throwOnCapabilityNotPresent": true,
    selenium-hub_1  |   "jettyMaxThreads": -1,
    selenium-hub_1  |   "cleanUpCycle": 5000,
    selenium-hub_1  |   "browserTimeout": 0,
    selenium-hub_1  |   "timeout": 1800,
    selenium-hub_1  |   "debug": false
    selenium-hub_1  | }
    chrome_1        | 13:33:50.944 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 5555
    chrome_1        | 2019-04-04 13:33:51.167:INFO::main: Logging initialized @906ms to org.seleniumhq.jetty9.util.log.StdErrLog
    selenium-hub_1  | 13:33:51.381 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
    chrome_1        | 13:33:51.627 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
    selenium-hub_1  | 13:33:51.645 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444
    chrome_1        | 13:33:51.775 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 5555
    chrome_1        | 13:33:51.775 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub
    chrome_1        | 13:33:51.863 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
    selenium-hub_1  | 2019-04-04 13:33:52.146:INFO::main: Logging initialized @1246ms to org.seleniumhq.jetty9.util.log.StdErrLog
    chrome_1        | 13:33:52.324 WARN [SelfRegisteringRemote.registerToHub] - Error getting the parameters from the hub. The node may end up with wrong timeouts.Failed to connect to selenium-hub/172.20.0.3:4444
    chrome_1        | 13:33:52.325 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://selenium-hub:4444/grid/register
    chrome_1        | 13:33:52.368 INFO [SelfRegisteringRemote$1.run] - Couldn't register this node: Error sending the registration request: Failed to connect to selenium-hub/172.20.0.3:4444
    selenium-hub_1  | 13:33:52.519 INFO [Hub.start] - Selenium Grid hub is up and running
    selenium-hub_1  | 13:33:52.521 INFO [Hub.start] - Nodes should register to http://172.20.0.3:4444/grid/register/
    selenium-hub_1  | 13:33:52.522 INFO [Hub.start] - Clients should connect to http://172.20.0.3:4444/wd/hub
    chrome_1        | 13:33:57.668 INFO [SelfRegisteringRemote.registerToHub] - Registering the node to the hub: http://selenium-hub:4444/grid/register
    chrome_1        | 13:33:57.755 INFO [SelfRegisteringRemote.registerToHub] - The node is registered to the hub and ready to use
    selenium-hub_1  | 13:33:57.750 INFO [DefaultGridRegistry.add] - Registered a node http://172.20.0.2:5555
    selenium-hub_1  | 13:34:04.237 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome}
    selenium-hub_1  | 13:34:04.254 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=9ccda515-7be9-4695-80bc-c373b6e00968, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=73.0.3683.86, applicationName=, platform=LINUX}
    chrome_1        | 13:34:04.397 INFO [ActiveSessionFactory.apply] - Capabilities are: {
    chrome_1        |   "browserName": "chrome",
    chrome_1        |   "goog:chromeOptions": {
    chrome_1        |   }
    chrome_1        | }
    chrome_1        | 13:34:04.400 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.grid.session.remote.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
    chrome_1        | Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 5954
    chrome_1        | Only local connections are allowed.
    chrome_1        | Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
    chrome_1        | [1554384844.447][SEVERE]: bind() failed: Cannot assign requested address (99)
    chrome_1        | 13:34:05.500 INFO [ProtocolHandshake.createSession] - Detected dialect: OSS
    chrome_1        | 13:34:05.976 INFO [RemoteSession$Factory.lambda$performHandshake$0] - Started new session f381ee5657fa472cd1d0d71200072c55 (org.openqa.selenium.chrome.ChromeDriverService)
    app_1           | [Thu Apr  4 13:34:06 2019] 172.20.0.2:47562 Invalid request (Unsupported SSL request)
    app_1           | [Thu Apr  4 13:34:06 2019] 172.20.0.2:47564 Invalid request (Unsupported SSL request)
    app_1           | [Thu Apr  4 13:34:06 2019] 172.20.0.2:47566 Invalid request (Unsupported SSL request)
    app_1           | [Thu Apr  4 13:34:06 2019] 172.20.0.2:47568 Invalid request (Unsupported SSL request)
    chrome_1        | 13:34:07.207 INFO [ActiveSessions$1.onStop] - Removing session f381ee5657fa472cd1d0d71200072c55 (org.openqa.selenium.chrome.ChromeDriverService)

    docker-compose.yml
    version: "3"
    
    services:
      app:
        image: php:latest
        volumes:
          - ./:/app
        working_dir: /app
        command: php -S 0.0.0.0:8080
        depends_on:
          - selenium-hub
    
      selenium-hub:
        image: selenium/hub:3.141.59-mercury
        depends_on:
          - chrome
        ports:
          - 4444:4444
    
      chrome:
        image: selenium/node-chrome:3.141.59-mercury
        volumes:
          - /dev/shm:/dev/shm
        environment:
          - HUB_HOST=selenium-hub
          - HUB_PORT=4444
  • Почему ChromeDriver пытается открыть сайт через https?

    hanas
    @hanas Автор вопроса
    Максим Федоров, он ходить то доходит, и в консоли веб сервера вижу что был запрос, значит с сетью у них все в порядке. Проблема в Invalid request (Unsupported SSL request)