Hi, would like to seek help regarding issue I encountered when running RobotFramework script in custom docker I built using this image marketsquare/robotframework-browser:18.8.0
Setup failed: SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn’t exist)
(The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace: #0 0x55f155e4486a #1 0x55f155b12e50 #2 0x55f155b4ae05 #3 0x55f155b46c78 #4 0x55f155b9364e #5 0x55f155b92e66 #6 0x55f155b87233 #7 0x55f155b55093 #8 0x55f155b5609e #9 0x55f155e0bacb #10 0x55f155e0fa81 #11 0x55f155df7695 #12 0x55f155e105f2 #13 0x55f155ddc86f #14 0x55f155e33668 #15 0x55f155e33832 #16 0x55f155e4365c #17 0x7f747e740609 start_thread
Skipped for Retry
I already tried using these ${chrome_options}= --no-sandbox --disable-dev-shm-usage --headless --disable-gpu --use-fake-ui-for-media-stream but still the same issue
I’m a little curious why you chose that docker image which is built for Browser Library when you’re using SeleniumLibrary, why didn’t you choose a docker image which is built SeleniumLibrary?
How did you know that it is build for Browser Library? Also I installed
SeleniumLibrary and others in the docker image but still encountered the issue. Anything I missed?
I can see you’ve added seleniumlibrary and other stuff, I was just curious why you chose a Browser library image as your base and not an image that already had a working seleniumlibrary?
I would have thought if you knew you wanted to use seleniumlibrary it’d be easier to start from a base that already had seleniumlibrary and the browser you want so there was less to install to your final image.
But you might also have a really good reason for using this base and by asking I could learn something.
I only got the direction to use this specific image. Ops who provided this image based the selection from the image mentioned here GitLab | ROBOT FRAMEWORK . So I think its a reliable source and secured from Ops perspective.
In terms of security of using any dockerimage built for SeleniumLibrary, how do you make sure which image is secured and which is not?
I guess my question then becomes when there’s no “official” image what makes a community contributed image not secure or not trustworthy for your ops team?
I ask because I’ve developed a tool that works with robot framework, I don’t have the skill or time to setup “official” images, however one of the users of my tool has put their hand up to make community contributed images available, would your ops team reject those images because they’re not “official” images?
I’ll discuss the matter with them. I think I really need to change the image I also tried installing some chrome dependencies and running chrome as non-root but still no luck. Will share here in thread once I find a suitable image.
I’m trying to search for possible replacement here in https://hub.docker.com/ I’m using the filter under Trusted Content. Which do you think is better for running RobotFramework scripts in different browsers? Should I select Python or Selenium image then customize it by installing other necessary packages, dependencies and libraries.
Any recommendations on which is more reliable and will give less headache such as this Chrome issue
Personnaly I use this docker image that works pretty well:
Images will never fit 100% your requirements, but you can modify the Dockerfile easily, change versions, start script etc…
About your issues, you mentioned you downloaded the chromedriver from the testing availability site, but usually it is installed when building the image alongside with chrome, from a package depending of your docker OS (Fedora or else… with dnf).
Also it needs a virtual screen, such as xfvb (you can check Dockerfile from the link above how the .sh endpoint script is done, also for packages installation).
For security concerns, anyway the update rate of the available or maintained images might not be sufficient sometimes to cover the ongoing and found vulnerabilities. But Docker Desktop for example gives you info on the build image with CVE and vulnerabilities.
You can then update the Dockerfile and rebuild the image with the needed versions.
Hi @CharlieScene , I was able to run a test using the image you suggested ppodgorsek/robot-framework. I noticed the chrome and chromedriver version is 126. How can I update the Chrome and Chromedriver version the latest?
You could eventually use Chrome testing versions this way (personnaly I rather rely on a stable/managed version):
RUN dnf install -y --enablerepo=updates-testing \
chromedriver \
chromium \
Finally if you want automatic update at each run of the image-based container, you can look into the link I sent by mail for selenium driver manager (can be done I think when running the container with endpoint, but you’ll maybe have to manage authorization) here :
It seems you’re missing the \bin folder needed next to dockerfile.
When building the image, it copies/paste the entrypoint file run run-tests-in-virtual-screen.sh that contains robot and pabot start command. This file is needed and called in the last command CMD [“run-tests-in-virtual-screen.sh”]
As well as the 2 other .sh file that setup parameters for chrome and chromedriver :
I tried with this Dockerfile to build and had an issue with chrome version that wasn’t found, but changed to 128 (instead of 128.0) and it worked.
Here it seems fedora repo cannot be reached (with 40 it worked here although).
Can you try with 39 eventually if you have same issue?
Eventually:
Check and update your certificates locally
Try to remove the previous image before build and build with nocache:
docker build --no-cache -t image_name .