SeleniumHQ / SeleniumHQ/docker-selenium
[🐛 Bug]: Chrome profiles not getting deleted after driver quit
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 2.5k
- Avg merge
- 10h 16m
- Merged PRs (30d)
- 20
Description
What happened?
Hi Team,
Please refer to this ticket - https://github.com/SeleniumHQ/selenium/issues/17518#issuecomment-4488170886
Even after setting the variables, the chrome profiles still remain. Is there any specific directory where the user-data-dir need to be set. Is there any specific folder name pattern that need to be used so that clean up script automatically picks it up for clean up. Presently these are the variables set:
SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true -- For cleanup enable
SE_BROWSER_LEFTOVERS_INTERVAL_SECS=300 -- Cleanup in every 5mins
SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS=0 -- Delete temporary file more than 1 day after browser closes
SE_BROWSER_LEFTOVERS_PROCESSES_SECS=3600
Regards,
Rumki
Command used to start Selenium Grid with Docker (or Kubernetes)
compose file content below:
version: "3.4"
services:
chrome:
image: selenium/node-chrome:latest
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3
- SE_VNC_NO_PASSWORD=1
- SE_NODE_SESSION_TIMEOUT=300
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
- SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true
- SE_BROWSER_LEFTOVERS_INTERVAL_SECS=300
- SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS=1
- SE_BROWSER_LEFTOVERS_PROCESSES_SECS=300
volumes:
- selDownloadsTestPlus:/home/seluser/Downloads
edge:
image: selenium/node-edge:latest
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3
- SE_VNC_NO_PASSWORD=1
- SE_NODE_SESSION_TIMEOUT=300
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
volumes:
- selDownloadsTestPlus:/home/seluser/Downloads
firefox:
image: selenium/node-firefox:latest
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_SESSIONS=3
- SE_VNC_NO_PASSWORD=1
- SE_NODE_SESSION_TIMEOUT=300
- SE_NODE_OVERRIDE_MAX_SESSIONS=true
volumes:
- selDownloadsTestPlus:/home/seluser/Downloads
selenium-hub:
image: selenium/hub:latest
container_name: selenium-hub
ports:
- "4442:4442"
- "4443:4443"
- "4445:4444"
environment:
- SE_SESSION_TIMEOUT=900
- SE_SESSION_REQUEST_TIMEOUT=900
- SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP=true
- SE_BROWSER_LEFTOVERS_INTERVAL_SECS=30
- SE_BROWSER_LEFTOVERS_TEMPFILES_DAYS=1
- SE_BROWSER_LEFTOVERS_PROCESSES_SECS=300
volumes:
selDownloadsTestPlus:
name: selDownloadsTestPlus
external: false
Relevant log output
Clean up script says it is done - please refer to the screenshots from the original ticket - https://github.com/SeleniumHQ/selenium/issues/17518#issuecomment-4488170886
Operating System
docker
Docker Selenium version (image tag)
4.43
Selenium Grid chart version (chart version)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked issue and the configured browser-leftovers cleanup environment variables in the Docker Compose setup. Reproduce the profile behavior with the stated Selenium 4.43 image and inspect the cleanup logs; the issue is done when profiles created by the browser sessions are removed after driver quit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100