CircleCI 上での System Spec (RSpec) が unknown error: DevToolsActivePort file doesn't exist と怒られて失敗する場合

結論

Headless Chrome の設定の箇所において、optionsno-sandbox を指定しましょう。例えば以下のようになります。

  config.before(:each) do |example|
    driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400], options: { args: ['no-sandbox'] } if example.metadata[:type] == :system
  end

補足

RSpec とか CircleCI とかに関わらない一般的な内容かと思います。

Powered by はてなブログ