Hello Elixir community,
I am facing an issue with running Chrome on my server using Wallaby for Elixir. My setup works fine on my local machine, but when I try to run it on the server, I encounter an error.
Here is my Wallaby configuration in config.exs
config :wallaby, driver: Wallaby.Chrome, chrome: [ chromedriver_path: "/usr/bin/chromedriver", binary: "/usr/bin/chromium-browser", flags: ["--headless"] ]
I’ve tried to install chromdriver via Dockerfile:
RUN apk upgrade --no-cache && \ apk add --no-cache bash chromium-chromedriver libgcc libstdc++ openssl
But when I try to run my code I see this:
{:error, "unknown error: Chrome failed to start: exited abnormally.\n (unknown error: DevToolsActivePort file doesn't exist)\n (The process started from chrome location /usr/lib/chromium/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\n (Driver info: chromedriver=102.0.5005.182 (0),platform=Linux 5.4.238-148.346.amzn2.x86_64 x86_64)"}
As I mentioned earlier, everything works fine on my local machine, where I have installed chromedriver, chrome, and added them to the PATH.
I would appreciate any suggestions or solutions to help me resolve this issue with running Chrome on the server using Wallaby.
Thank you in advance!