-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headless Chrome sessions not starting on recent Chrome versions #257
Comments
Thank you, Michał, for posting this. We hit the same issue, and your workaround worked nicely for us! Very much appreciated! |
Worked for us too! Thanks a bunch ❤️ |
@michallepicki How did you conclude that? %{
"sessionId" => "e9796a5997cef178db3120e89d0f1f28",
"status" => 33,
"value" => %{
"message" => "session not created: Chrome failed to start: exited normally.\n (session not created: 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=121.0.6167.184 (057a8ae7deb3374d0f1b04b36304d236f0136188-refs/branch-heads/6167@{#1818}),platform=Linux 5.15.49-linuxkit-pr aarch64)"
}
} Any idea? |
I inspected responses from chromedriver somewhere in hound code, and there was an error about incorrect browser name. Unfortunately I am not familiar with the problem you're facing |
I finally solved it by overriding the config :hound,
driver: "chrome_driver",
browser: "chrome_headless",
host: System.get_env("HEADLESS_BROWSER_URL"),
port: 9515 I started my defmodule SomeTest do
use ExUnit.Case
use Hound.Helpers
hound_session(additional_capabilities())
# some tests
defp additional_capabilities do
[
additional_capabilities: %{
:"goog:chromeOptions" => %{
"args" => [
"--headless",
"--disable-gpu",
"--no-sandbox",
"--disable-dev-shm-usage",
"--disable-software-rasterizer"
]
},
browserName: "chrome"
}
]
end
end I am using a flavour of this docker image for starting a chrome driver server. |
@HarshBalyan this shockingly worked for me as well. Thanks for the fix! |
To fix the “invalid session id” we need to call:
The text was updated successfully, but these errors were encountered: