Skip to content
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

Add disable-dev-shm-usage to Chrome Options #98

Open
jacektrocinski opened this issue Nov 15, 2020 · 2 comments
Open

Add disable-dev-shm-usage to Chrome Options #98

jacektrocinski opened this issue Nov 15, 2020 · 2 comments

Comments

@jacektrocinski
Copy link

Heroku’s /dev/shm is often too small to run Google Chrome and as a result generates the following error: session deleted because of page crash from tab crashed

This issue can be resolved by add the option disable-dev-shm-usage and in my opinion should be a default option when running the Google Chrome build pack on Heroku.

At the very least I think this option should be discussed in the README.md since many users report having this issue on Stackoverflow.

@CrazybutSolid
Copy link

As a newbie, is this the right way to do so?

chrome_bin = ENV.fetch('GOOGLE_CHROME_SHIM', nil)

chrome_opts = { "chromeOptions" => { "binary" => chrome_bin,
                                     args: %w[disable-dev-shm-usage]
                                     } }
Capybara.register_driver :chrome do |app|
  Capybara::Selenium::Driver.new(
    app,
    browser: :chrome,
    desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(chrome_opts),
  )
end

Capybara.javascript_driver = :chrome

I'm still getting errors and

2021-02-07T12:43:42.670067+00:00 app[worker.1]: 4 TID-1uto WARN: Selenium::WebDriver::Error::UnknownError: unknown error: session deleted because of page crash

Even after adding it like that

@brodyhoskins
Copy link

I'm getting these errors all the time now. It seems to have happened once I jumped from Chrome 93.0.4577.82 to 94.0.4606.61. I would like to test it out at the old version but I'm reviewing the code here and can't find a way to downgrade Chrome for testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants