1

Using Codeship as an automatic test plateform I have this error that occur only on codeship automatic run, not on my local environment, nor if I run the same test on codeship via ssh debug console :

Selenium::WebDriver::Error::UnknownError:
  unknown error: session deleted because of page crash
  from unknown error: cannot determine loading status
  from tab crashed
    (Session info: headless chrome=98.0.4758.102)
    (Driver info: chromedriver=98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758@{#1151}),platform=Linux 5.4.0-1065-aws x86_64)
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `new'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:81:in `create_response'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/oss/bridge.rb:579:in `execute'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/remote/oss/bridge.rb:50:in `get'
# /home/rof/cache/bundler/ruby/2.7.0/gems/selenium-webdriver-3.8.0/lib/selenium/webdriver/common/navigation.rb:30:in `to'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/selenium/driver.rb:71:in `visit'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/session.rb:278:in `visit'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/dsl.rb:53:in `call'
# /home/rof/cache/bundler/ruby/2.7.0/gems/capybara-3.33.0/lib/capybara/dsl.rb:53:in `visit'
# ./spec/features/authentications_spec.rb:17:in `block (2 levels) in <top (required)>'
# /home/rof/cache/bundler/ruby/2.7.0/gems/webmock-3.9.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

The headless configuration run is :

Capybara.register_driver :headless_chrome do |app|
  client = Selenium::WebDriver::Remote::Http::Default.new
  client.read_timeout = 120
  options = ::Selenium::WebDriver::Chrome::Options.new()
  options.add_argument 'headless'
  options.add_argument('log-level=OFF')
  options.add_argument('disable-dev-shm-usage') #The location of the shared memory file/dev/from shm/Move to tmp
  options.add_argument('window-size=1024,768')
  options.add_option('prefs', {'intl.accept_languages': 'en,en_US'})
  options.add_option('w3c', false)
  Capybara::Selenium::Driver.new app, browser: :chrome, options: options, http_client: client
end

Does someone have any clue on why it occurs? Or how I can find it out?

GPif
  • 543
  • 2
  • 6
  • 22

0 Answers0