docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

[🐛 Bug]: Videos are being created in /videos despite SE_RECORD_VIDEO=false

Open stlxiii opened this issue 6 months ago • 8 comments

What happened?

The node-chrome container is accumulating videos in the /videos folder. We found the problem because the container eventually used up all available disk space. I have adjusted my docker-compose to specify SE_RECORD_VIDEO=false but it doesn't alter the behavior.

Possibly related to this change? https://github.com/seleniumhq/docker-selenium/commit/2585eaa165a1b8325514b3b2b6c772d76945ed47

Command used to start Selenium Grid with Docker (or Kubernetes)

services:


  chrome:
    image: selenium/node-chrome:latest
    restart: always
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_RECORD_VIDEO=false
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
      - SE_NODE_MAX_SESSIONS=9
      - SCREEN_WIDTH=1920
      - SCREEN_HEIGHT=1920
      - SE_OPTS=--enable-managed-downloads true
      - TZ=America/Toronto

  edge:
    image: selenium/node-edge:latest
    restart: always
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_RECORD_VIDEO=false
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
      - SE_NODE_MAX_SESSIONS=9
      - SCREEN_WIDTH=1920
      - SCREEN_HEIGHT=1920
      - SE_OPTS=--enable-managed-downloads true
      - TZ=America/Toronto

  firefox:
    image: selenium/node-firefox:latest
    restart: always
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_RECORD_VIDEO=false
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
      - SE_NODE_MAX_SESSIONS=9
      - SCREEN_WIDTH=1920
      - SCREEN_HEIGHT=1920
      - SE_OPTS=--enable-managed-downloads true
      - TZ=America/Toronto

  selenium-hub:
    image: selenium/hub:latest
    restart: always
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"

Relevant log output

extract from docker inspect, shows "SE_RECORD_VIDEO=false"

   "StdinOnce": false,
            "Env": [
                "SE_NODE_OVERRIDE_MAX_SESSIONS=true",
                "SCREEN_HEIGHT=1920",
                "SE_OPTS=--enable-managed-downloads true",
                "SE_EVENT_BUS_HOST=selenium-hub",
                "SE_EVENT_BUS_SUBSCRIBE_PORT=4443",
                "SCREEN_WIDTH=1920",
                "SE_RECORD_VIDEO=false",
                "SE_NODE_MAX_SESSIONS=9",
                "SE_EVENT_BUS_PUBLISH_PORT=4442",
                "TZ=America/Toronto",
                "PATH=/home/seluser/venv/bin:/usr/l


extract from docker logs:

Virtual environment detected at /home/seluser/venv, activating...
Python 3.14.5
2026-05-27 13:29:47,170 INFO Included extra file "/etc/supervisor/conf.d/chrome-cleanup.conf" during parsing
2026-05-27 13:29:47,171 INFO Included extra file "/etc/supervisor/conf.d/recorder.conf" during parsing
2026-05-27 13:29:47,171 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2026-05-27 13:29:47,171 INFO Included extra file "/etc/supervisor/conf.d/uploader.conf" during parsing
2026-05-27 13:29:47,183 INFO RPC interface 'supervisor' initialized
2026-05-27 13:29:47,185 INFO supervisord started with pid 9
2026-05-27 13:29:47,188 INFO spawned: 'video-ready' with pid 10
2026-05-27 13:29:47,211 INFO spawned: 'xvfb' with pid 11
2026-05-27 13:29:47,223 INFO spawned: 'video-upload' with pid 12
2026-05-27 13:29:47,240 INFO spawned: 'vnc' with pid 13
2026-05-27 13:29:47,298 INFO spawned: 'novnc' with pid 15
2026-05-27 13:29:47,364 INFO spawned: 'video-recording' with pid 22
2026-05-27 13:29:47,400 INFO spawned: 'selenium-node' with pid 26
2026-05-27 13:29:47,604 INFO success: video-ready entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-05-27 13:29:47,606 INFO success: video-upload entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-05-27 13:29:47,606 INFO success: video-recording entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-05-27 13:29:47,606 INFO success: selenium-node entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2026-05-27 13:29:48,218 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Appending Selenium options: --enable-managed-downloads true
Selenium option: --enable-managed-downloads already set in env variable SE_OPTS. Ignore new option: --enable-managed-downloads true
Appending Selenium option: --register-period 120
Appending Selenium option: --register-cycle 10
Appending Selenium option: --register-shutdown-on-failure
Appending Selenium option: --delete-session-on-ui true
Appending Selenium option: --heartbeat-period 15
Appending Selenium option: --node-down-failure-threshold 0
Appending Selenium option: --log-level INFO
2026-05-27 13:29:48,451 INFO success: vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2026-05-27 13:29:48,451 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Appending Selenium option: --http-logs false
Appending Selenium option: --structured-logs false
Appending Selenium option: --plain-logs true
Generating Selenium Config
Configuring server...
Setting up SE_NODE_HOST...
Setting up SE_NODE_PORT...
Setting up SE_NODE_GRID_URL...
Backing up original environment variables...
Backed up original SE_NODE_BROWSER_VERSION=stable to SE_NODE_BROWSER_VERSION_ORIGINAL
Backed up original SE_NODE_PLATFORM_NAME=Linux to SE_NODE_PLATFORM_NAME_ORIGINAL
Backed up original SE_NODE_MAX_SESSIONS=9 to SE_NODE_MAX_SESSIONS_ORIGINAL
===Start generating stereotype for browser: CHROME===
Inherited original SE_NODE_BROWSER_VERSION_ORIGINAL=stable to SE_NODE_BROWSER_VERSION
Inherited original SE_NODE_PLATFORM_NAME_ORIGINAL=Linux to SE_NODE_PLATFORM_NAME
Inherited original SE_NODE_MAX_SESSIONS_ORIGINAL=9 to SE_NODE_MAX_SESSIONS
Restoring original environment variables...
Cleared SE_NODE_ENABLE_BROWSER (no original backup)
Cleared SE_NODE_STEREOTYPE (no original backup)
Cleared SE_NODE_BROWSER_NAME (no original backup)
Restored original SE_NODE_BROWSER_VERSION_ORIGINAL=stable to SE_NODE_BROWSER_VERSION
Restored original SE_NODE_PLATFORM_NAME_ORIGINAL=Linux to SE_NODE_PLATFORM_NAME
Cleared SE_BROWSER_BINARY_LOCATION (no original backup)
Cleared SE_NODE_STEREOTYPE_EXTRA (no original backup)
Restored original SE_NODE_MAX_SESSIONS_ORIGINAL=9 to SE_NODE_MAX_SESSIONS
===Stop generating stereotype for browser: CHROME===
Appending Selenium option: --tracing false
Tracing is disabled
Appending Selenium option: --bind-host false
Appending Selenium option: --config /opt/selenium/config.toml
Selenium Grid Node configuration:
[events]
    publish = "tcp://selenium-hub:4442"
    subscribe = "tcp://selenium-hub:4443"

[node]
session-timeout = 300
override-max-sessions = true
max-sessions = 9
detect-drivers = false
drain-after-session-count = 0

[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName":"chrome","browserVersion":"148.0","platformName":"Linux","se:containerName":"09ec6dd9c667","container:hostname":"09ec6dd9c667","goog:chromeOptions":{"binary":"/usr/bin/google-chrome"}}'
max-sessions = 9

Starting Selenium Grid Node...
Using JAVA_OPTS:  -Dwebdriver.remote.enableTracing=false -Dwebdriver.httpclient.version=HTTP_1_1
2026-05-27 13:29:49, [video.service] - ============================================================
2026-05-27 13:29:49, [video.service] - Starting unified video recording and upload service
2026-05-27 13:29:49, [video.service] - ============================================================
2026-05-27 13:29:49, [video.service] - Configuration:
2026-05-27 13:29:49, [video.service] -   Standalone mode: False
2026-05-27 13:29:49, [video.service] -   Event bus: selenium-hub:4442
2026-05-27 13:29:49, [video.service] -   Video folder: /videos
2026-05-27 13:29:49, [video.service] -   Video file name: auto
2026-05-27 13:29:49, [video.service] -   Video size: 1920x1080
2026-05-27 13:29:49, [video.service] -   Upload enabled: False
2026-05-27 13:29:49, [video.service] -   Upload destination:
2026-05-27 13:29:49, [video.service] -   Retain on failure: False
2026-05-27 13:29:49, [video.service] -   Failure events: [':failure', ':failed', ':error', ':aborted']
2026-05-27 13:29:49, [video.service] -   Max sessions (drain): unlimited
2026-05-27 13:29:49, [video.service] - Waiting for display: localhost:99.0
2026-05-27 13:29:49, [video.service] - Display ready: localhost:99.0
2026-05-27 13:29:49, [video.service] - Waiting for Node /status endpoint: http://localhost:5555/status (verify_ssl=False)
13:29:51.279 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
13:29:51.334 INFO [LoggingOptions.getTracer] - Using null tracer
13:29:51.726 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp://selenium-hub:4442 and tcp://selenium-hub:4443
13:29:51.919 INFO [ZmqUtils.configureHeartbeat] - ZMQ SUB socket heartbeat configured: interval=60s, timeout=180s, ttl=360s
13:29:51.949 INFO [ZmqUtils.configureHeartbeat] - ZMQ PUB socket heartbeat configured: interval=60s, timeout=180s, ttl=360s
13:29:51.969 INFO [UnboundZmqEventBus.<init>] - Sockets created
13:29:52.979 INFO [UnboundZmqEventBus.<init>] - Event bus ready
13:29:53.511 INFO [NodeServer.createHandlers] - Reporting self as: http://172.17.2.4:5555

Operating System

Ubuntu 24.04.4 LTS

Docker Selenium version (image tag)

sha256:2bd78a1b7b646cbe71a0653285afd1d5be223991443d5b08c9a86d8d2d4363df

Selenium Grid chart version (chart version)

No response

stlxiii avatar May 27 '26 17:05 stlxiii

@stlxiii, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar May 27 '26 17:05 github-actions[bot]

Did you set capability se:recordVideo true in test code?

VietND96 avatar May 28 '26 06:05 VietND96

I don't explicitly set any video capability. Here's the robot framework code I'm using:

    ${options}    Evaluate    sys.modules['selenium.webdriver'].${{ $browser.title() }}Options()    sys
    Call Method   ${options}   add_argument   --ignore-certificate-errors

    ${other_options}    Create Dictionary    
    ...    plugins.always_open_pdf_externally=${True}
    ...    download.prompt_for_download=${False}
  
    Call Method   ${options}   add_experimental_option   prefs                  ${other_options}
    Call Method   ${options}   set_capability            se:downloadsEnabled    ${True}
    Call Method   ${options}   add_argument              --lang\=${language}

    Open Browser  
    ...    about:blank   
    ...    remote_url=${USE_GRID_BROWSER_URL}    
    ...    browser=${browser}    
    ...    options=${options}  

stlxiii avatar May 28 '26 15:05 stlxiii

Same issue i also observed , was about to raise a new issue and saw this :) SE_RECORD_VIDEO=false is set from my end , still videos are recorded.

Swapnillll avatar Jun 03 '26 07:06 Swapnillll

I found that if I explicitly set se:recordVideo to false, the videos are no longer recorded. Previously I was not setting that capability, so it seems the default flipped from false to true and I have to explicitly set it back to false.

lorenzodallavecchia avatar Jun 04 '26 11:06 lorenzodallavecchia

Could you please try nightly tag and confirm it works as previous expectation, then we can deploy a new image tag?

VietND96 avatar Jun 10 '26 04:06 VietND96

Could you please try nightly tag and confirm it works as previous expectation, then we can deploy a new image tag?

Hello,

I confirm that no videos are being created with the nightly build. Thank you!

stlxiii avatar Jun 10 '26 17:06 stlxiii

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Jul 10 '26 23:07 github-actions[bot]