[🐛 Bug]: Video recorder can be so slow to start that it misses the session entirely

Aperta
#3,279 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, go, kubernetes

Direzione di ricerca

Start by tracing how docker-selenium’s video service handles session-created and session-closed events, and compare those timestamps with the Grid node logs in the report. The payload does not name source files or tests, so locate the event handling entry point and any related tests first. Done means recording starts in time to capture the session and stops correctly when it closes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triaging
What happened?

I use the in node video recording, producing a separate recording for each session. Sometimes I see that the video recording doesn't begin until after the session has finished. Look at the session "9fd711426b480dcc532d4a8f3daf29af" in the logs below. The driver session beings at 17:01:16 and finishes by 17:01:24. Video recording doesn't start until 17:01:26 - 10 seconds after the driver session began and 2 seconds after it finished. So my questions are:

  1. Why start recording when the target session has already terminated.
  2. Why is video recording so slow to start? Is this a known issue? Should I be querying whether video recording has begun before I start actually performing the driver actions I want recorded?
Command used to start Selenium Grid with Docker (or Kubernetes)

I set these environment variables in my node containers:

SE_VIDEO_INTERNAL_UPLOAD=false
SE_VIDEO_FILE_NAME=auto
Relevant log output
17:01:16.054 INFO [LocalNode.newSession] - Session created by the Node. Id: 9fd711426b480dcc532d4a8f3daf29af, Caps: {acceptInsecureCerts=false, browserName=MicrosoftEdge, browserVersion=155.0.4283.45, fedcm:accounts=true, goog:processID=7823, ms:edgeOptions={debuggerAddress=localhost:46599}, msedge={msedgedriverVersion=155.0.4283.45 (50f24ef2aa5369a074b8888b7db82d9c0652d642), userDataDir=/home/seluser/selenium/profile}, networkConnectionEnabled=false, pageLoadStrategy=normal, platformName=linux, proxy=Proxy(), se:cdp=ws://localhost:4444/session/9fd711426b480dcc532d4a8f3daf29af/se/cdp, se:cdpVersion=155.0.4283.45, se:containerName=edge-node-4, se:deleteSessionOnUi=true, se:downloadsEnabled=true, se:gridWebSocketUrl=ws://localhost:3841/session/9fd711426b480dcc532d4a8f3daf29af, setWindowRect=true, strictFileInteractability=false, timeouts={implicit=0, pageLoad=300000, script=30000}, unhandledPromptBehavior=dismiss and notify, webSocketUrl=ws://localhost:4444/session/9fd711426b480dcc532d4a8f3daf29af/se/bidi, webauthn:extension:cmtgKey=true, webauthn:extension:credBlob=true, webauthn:extension:largeBlob=true, webauthn:extension:minPinLength=true, webauthn:extension:prf=true, webauthn:virtualAuthenticators=true}
17:01:16.078 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://localhost:3841/session/9fd711426b480dcc532d4a8f3daf29af
17:01:24.084 INFO [LocalNode.stopTimedOutSession] - Session id 9fd711426b480dcc532d4a8f3daf29af is stopping on demand...
17:01:24.084 INFO [SessionSlot.stop] - Stopping session 9fd711426b480dcc532d4a8f3daf29af (reason: QUIT_COMMAND)
17:01:24.084 INFO [SessionSlot.stop] - Session stopped successfully: 9fd711426b480dcc532d4a8f3daf29af
17:01:24.118 INFO [LocalNode.newSession] - Not using file system: desiredCapabilities=Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [--user-data-dir=/home/selus..., --profile-directory=Default]}, se:remoteUrl: http://localhost:4444/wd/hub/, webSocketUrl: true}
17:01:25.177 INFO [LocalNode.newSession] - Session created by the Node. Id: e014dfd6f5e08a9f5abee55fd8273ac3, Caps: {acceptInsecureCerts=false, browserName=MicrosoftEdge, browserVersion=155.0.4283.45, fedcm:accounts=true, goog:processID=8313, ms:edgeOptions={debuggerAddress=localhost:37057}, msedge={msedgedriverVersion=155.0.4283.45 (50f24ef2aa5369a074b8888b7db82d9c0652d642), userDataDir=/home/seluser/selenium/profile}, networkConnectionEnabled=false, pageLoadStrategy=normal, platformName=linux, proxy=Proxy(), se:cdp=ws://localhost:4444/session/e014dfd6f5e08a9f5abee55fd8273ac3/se/cdp, se:cdpVersion=155.0.4283.45, se:containerName=edge-node-4, se:deleteSessionOnUi=true, se:downloadsEnabled=true, se:gridWebSocketUrl=ws://localhost:19903/session/e014dfd6f5e08a9f5abee55fd8273ac3, setWindowRect=true, strictFileInteractability=false, timeouts={implicit=0, pageLoad=300000, script=30000}, unhandledPromptBehavior=dismiss and notify, webSocketUrl=ws://localhost:4444/session/e014dfd6f5e08a9f5abee55fd8273ac3/se/bidi, webauthn:extension:cmtgKey=true, webauthn:extension:credBlob=true, webauthn:extension:largeBlob=true, webauthn:extension:minPinLength=true, webauthn:extension:prf=true, webauthn:virtualAuthenticators=true}
17:01:25.212 INFO [ProxyNodeWebsockets.createWsEndPoint] - Establishing connection to ws://localhost:19903/session/e014dfd6f5e08a9f5abee55fd8273ac3
2026-10-20 17:01:26, [video.service] - Stopped recording: session=521ebd4a07896b620950ca41085f0c00, duration=483.3s
2026-10-20 17:01:26, [video.service] - Received event: session-created, nodeId=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac, self.node_id=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac
2026-10-20 17:01:26, [video.service] - Session created: 9fd711426b480dcc532d4a8f3daf29af, record=True, retain_on_failure=False, file=9fd711426b480dcc532d4a8f3daf29af.mp4
2026-10-20 17:01:27, [video.service] - Started recording: session=9fd711426b480dcc532d4a8f3daf29af, file=9fd711426b480dcc532d4a8f3daf29af.mp4
2026-10-20 17:01:27, [video.service] - Received event: session-closed, nodeId=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac, self.node_id=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac
2026-10-20 17:01:27, [video.service] - Session closed: 9fd711426b480dcc532d4a8f3daf29af, reason=QUIT_COMMAND, is_failed=False
2026-10-20 17:01:27, [video.service] - Stopped recording: session=9fd711426b480dcc532d4a8f3daf29af, duration=0.5s
2026-10-20 17:01:27, [video.service] - Received event: session-created, nodeId=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac, self.node_id=f1a8d5bf-f660-472d-b2f8-5a21c0f08bac
2026-10-20 17:01:27, [video.service] - Session created: e014dfd6f5e08a9f5abee55fd8273ac3, record=True, retain_on_failure=False, file=e014dfd6f5e08a9f5abee55fd8273ac3.mp4
2026-10-20 17:01:28, [video.service] - Started recording: session=e014dfd6f5e08a9f5abee55fd8273ac3, file=e014dfd6f5e08a9f5abee55fd8273ac3.mp4
Operating System

Windows 11 Docker Desktop

Docker Selenium version (image tag)

4.51.0-20261010

Selenium Grid chart version (chart version)

No response

Lingua principale
Go
Stelle
8.7k
Fork
2.5k
Merge medio
2g 7h
PR unite (30g)
28

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SeleniumHQ/docker-selenium

Tutte le issue di SeleniumHQ/docker-selenium

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.