Skip to content

[🐛 Bug]: cant find webdriver logs inside node container #1575

@i4ali

Description

@i4ali

What happened?

unable to find the chromedriver.log when using the dynamic grid using docker compose. I have docker exec into both the node container and the chrome container to find the file 'chromedriver.log' under / but its not there.

version: "3"
services:
  node-docker:
    image: selenium/node-docker:4.1.4-20220427
    volumes:
      - ./assets:/opt/selenium/assets
      - ./NodeDocker/config.toml:/opt/bin/config.toml
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443

  selenium-hub:
    image: selenium/hub:4.1.4-20220427
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"

my config.toml is below

[docker]
configs = [
    "selenium/standalone-chrome:4.1.4-20220427", "{\"browserName\": \"chrome\"}"
    ]

url = "http://127.0.0.1:2375"
# Docker image used for video recording
video-image = "selenium/video:ffmpeg-4.3.1-20220427"

my client code is follows

profile = {"download.prompt_for_download": False,
                   "download.directory_upgrade": True,
                   "plugins.always_open_pdf_externally": True,
                   'safebrowsing.disable_download_protection': True,
                   'safebrowsing.enabled': False}
self.options.add_experimental_option("prefs", profile)
        self.options.set_capability('unhandledPromptBehavior', 'accept')
        self.options.add_argument("--disable-popup-blocking")
        self.options.add_argument("log-path=/chromedriver.log")
        self.options.add_argument('--disable-notifications')
        self.options.set_capability("se:screenResolution", "1920x1480")
        self.options.set_capability("se:recordVideo", "true")
        browser = webdriver.Remote(command_executor=self.remote_url, options=self.options,
                                       keep_alive=True)

Command used to start Selenium Grid with Docker

And running docker compose as follows

docker-compose -f docker-compose-v3-dynamic-grid.yml up

Relevant log output

node logs

23:00:48.036 INFO [DockerSessionFactory.apply] - Starting session for Capabilities {browserName: chrome, goog:chromeOptions: {args: [--disable-popup-blocking, --disable-notifications, --start-maximized, log-path=/chromedriver.log], extensions: [], prefs: {download.default_directory: /Users/Imran.Ali/Documents/..., download.directory_upgrade: true, download.prompt_for_download: false, plugins.always_open_pdf_externally: true, safebrowsing.disable_download_protection: true, safebrowsing.enabled: false}}, pageLoadStrategy: normal, se:screenResolution: 1920x1480, unhandledPromptBehavior: accept}

23:00:48.037 INFO [DockerSessionFactory.apply] - Creating container...

23:00:48.083 INFO [Container.<init>] - Created container 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d

23:00:48.083 INFO [Container.start] - Starting container 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d

23:00:48.475 INFO [Container.inspect] - Inspecting container 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d

23:00:48.482 INFO [DockerSessionFactory.apply] - Waiting for server to start (container id: 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d, url http://172.21.0.4:4444/wd/hub)

23:00:51.694 INFO [DockerSessionFactory.apply] - Server is ready (container id: 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d)

23:00:52.810 INFO [ProtocolHandshake.createSession] - Detected dialect: W3C

23:00:52.830 INFO [LocalNode.newSession] - Session created by the Node. Id: 0782c62b044b8b38367b6d18a221086f, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 101.0.4951.41, chrome: {chromedriverVersion: 101.0.4951.41 (93c720db8323..., userDataDir: /tmp/.com.google.Chrome.vZBQCx}, goog:chromeOptions: {debuggerAddress: localhost:44297}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), se:cdp: ws://172.21.0.4:4444/sessio..., se:cdpVersion: 101.0.4951.41, se:forwardCdp: ws://172.21.0.4:4444/sessio..., se:screenResolution: 1920x1480, se:vnc: ws://172.21.0.4:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.21.0.4:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}

23:06:59.250 INFO [Container.stop] - Stopping container 32c2c3d8d88c1d60d77c3dd8eab7f305bc04c44db2939260da7a05086f12f24d

23:07:02.307 INFO [SessionSlot.stop] - Stopping session 0782c62b044b8b38367b6d18a221086f

Operating System

Mac OS Monterey 12.2.1

Docker Selenium version (tag)

4.1.4-20220427

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions