-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
Hello, and thank you for your project!
SeleniumBase works perfectly in CDP mode in Kubernetes when run as the root user, but when I try to run it as a non-root user, I get an error.
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: cannot connect to chrome at 127.0.0.1:9222
Could you please advise if it’s possible to run SeleniumBase without root privileges?
Beta Was this translation helpful? Give feedback.
All reactions
Sounds like Chrome might not be in the default location for non-root users.
Try setting the binary_location
arg with the location of Chrome when using a non-root user.
If that doesn't help, then there are probably missing permissions that are needed.
UC Mode / CDP Mode require more permissions than regular mode because of launching Chrome from the command-line, and for modifying the default chromedriver to turn it into uc_driver.
Replies: 2 comments 1 reply
-
Sounds like Chrome might not be in the default location for non-root users.
Try setting the binary_location
arg with the location of Chrome when using a non-root user.
If that doesn't help, then there are probably missing permissions that are needed.
UC Mode / CDP Mode require more permissions than regular mode because of launching Chrome from the command-line, and for modifying the default chromedriver to turn it into uc_driver.
Beta Was this translation helpful? Give feedback.
All reactions
-
As I understand, Chrome should use --no-sandbox
flag. But there is no option to set sandbox parameter to False for cdp here: source
Beta Was this translation helpful? Give feedback.
All reactions
-
It’s already set when using Linux from SB():
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1