I've got an ActionDispatch::SystemTestCase that runs fine locally, but fails with the following error in Heroku CI:
Selenium::WebDriver::Error::UnknownError: unknown error: net::ERR_NAME_NOT_RESOLVED
(Session info: headless chrome=85.0.4183.83)
test/system/my_failing_test.rb:29
It might be worth noting that line 29 is a Capybara visit command, hence the DNS-related error message.
More importantly, I've followed the Heroku documentation for setting up Selenium on headless Chrome. The important parts of that configuration, I believe, are here: https://devcenter.heroku.com/articles/heroku-ci-browser-and-user-acceptance-testing-uat#testing-with-selenium
To sum my configuration up:
I have the following buildpacks for my test environment in my app.json:
heroku/ruby
heroku/google-chrome
heroku/chromedriver
...and I've added verbatim the "special configuration" Heroku advises (#3 from the above link) https://github.com/heroku/heroku-buildpack-google-chrome#selenium
Is there some piece of server configuration that's missing when the buildpacks are used?
What is is about rails test that handles the test server web calls that the buildpacks lack?
I've fought with this for a while, so any suggestions are greatly appreciated!