Getting protocol error in Open Browser Keyword

Hello,

I have installed robot framework in docker. While trying to run a simple script to open browser, it gives error ProtocolError: (“Connection broken: ConnectionResetError(104, ‘Connection reset by peer’)”, ConnectionResetError(104, ‘Connection reset by peer’))

Here is my test case. Can some one please help

*** Settings ***
Library SeleniumLibrary

*** Variables ***
${BROWSER} chrome

*** Test Cases ***
Visit Bing
Open Browser https://www.bing.com ${BROWSER}
Capture Page Screenshot

Visit Google
Open Browser https://www.google.com ${BROWSER}
Capture Page Screenshot

Welcome to the Robot Framework Forum!

I would do a standard check on updating all the Python packages (Selenium, SeleniumLibrary, Robot Framework) to their latest. I would also check the Chrome Browser version and the chromedriver version making sure they match. Or allowing the new selenium-manager, which is bundled with selenium, to handle/check this. One last item is that I would make sure one is not running under root on the docker but as a user.

This last suggestions comes from some threads which people notice issues with browsers and drivers and make various suggestions on a fix. After checking the versions I might suggest these.

1 Like

Thanks for your reply.

Double checked the versions and they are on latest
robotframework-requests 0.9.5
robotframework-seleniumlibrary 6.1.0
robotframework 6.1
robotframework-assertion-engine 3.0.2
robotframework-browser 16.2.0

chromium-119.0.6045.123-1.fc38.x86_64
chromedriver-119.0.6045.123-1.fc38.x86_64
xorg-x11-server-Xvfb-1.20.14-26.fc38.x86_64

And I am running as a non root user.

Those versions all look good. My next guess would be docker configuration issues which I haven’t used docker in a while. Any way to log into the remote docker and explore from there?

Actually I ran the robot command inside the docker only where it throws the error. Not sure where I can get more logs of this to troubleshoot further

So searching on that error and “docker” I see others having issues; interesting many with Python involved - which I don’t know if this is just google knowing I am usually working with python or an actual trend.

There are some selenium / webdriver logs one can enable. See the selenium.dev docs.