Issue when running undetectedchrome-driver in a Docker Image #1261
Replies: 2 comments
-
what is your complete Dockerfile content? |
Beta Was this translation helpful? Give feedback.
-
Thanks for responding @timiil! I am running on an Apple m1 which I think was causing the issue. Last night, I decided to run the docker build on a cloud service and voila the existing code ran without a hitch and everything worked. I think it has something to do with running it through the Docker Desktop on Mac (more specifically, if I had to guess, something to do with the new chip). Unfortunately, for anyone who sees this and is running Docker Desktop on Mac, I'm not sure there was a resolution. If you do end up finding how to fix it, please add on to this discussion for visibility. |
Beta Was this translation helpful? Give feedback.
-
Hey all, I've scoured through the Discussions to try and find an answer to this but have been unsucessful.
I am running multiple threads in python to scrape certain pages and it is working fine on my local machine, but when moving into Docker to have it hosted elsewhere it seems to be failing.
Problem
When I run my code in a docker image I'm unable to have undetectedchrome-driver start. Originally I was getting an error:
Permission Denied: /root/.local/share/undetected_chromedriver
which I seemed to have fixed by forcing the Dockerfile to give access to this directory (since this is where undetectedchrome-driver is installed by default (yes it's very clunky):
Regardless, I'm now getting this error message:
Message: Service /root/.local/share/undetected_chromedriver/undetected_chromedriver unexpectedly exited. Status code was: 255
I have tried setting the browser_executable_path and updating the permissions of that directory in the Dockerfile but that also didn't work. This is how I'm initializing the driver, this function runs once per thread as I need to rotate the proxy (there's probably a better way to do this and noticed in the 3.4.7 update there are some updates and I may change this in the future if I can get around to it)
Has anyone run into this issue or have any guidance on how I can get this to work? Would greatly appreciate it, been banging my head against the wall for a couple of hours.
Beta Was this translation helpful? Give feedback.
All reactions