LoginSignup
1
1

More than 3 years have passed since last update.

GitLab-CI + Cypressで自動テストを実行すると、レンダラーのクラッシュで異常終了

Posted at

背景

以前の投稿GitLab-CICypressを連携して、Webアプリケーションの自動テスト環境を構築した。

当初は何ら問題なく動いていたが、ある時から以下のエラーを吐いてパイプラインがFailedになるようになってしまった。

本投稿では、その対処方法を掲載する。

We detected that the Chromium Renderer process just crashed.

This is the equivalent to seeing the 'sad face' when Chrome dies.

This can happen for a number of different reasons:

- You wrote an endless loop and you must fix your own code
- There is a memory leak in Cypress (unlikely but possible)
- You are running Docker (there is an easy fix for this: see link below)
- You are running lots of tests on a memory intense application
- You are running in a memory starved VM environment
- There are problems with your GPU / GPU drivers
- There are browser bugs in Chromium

You can learn more including how to fix Docker here:

https://on.cypress.io/renderer-process-crashed

環境

  • CentOS 7.5.1804
  • GitLab CE 11.11.3
  • gitlab-runner v12.6.0
  • Cypress v3.7.0

調査

ヒントは、エラーメッセージ末尾に書かれていた。

You can learn more including how to fix Docker here:
https://on.cypress.io/renderer-process-crashed

リンクを辿ると最終的にGitHubのIssueスレッドにたどり着く。
スレッドを読むと、この投稿に解決策が記載されていた。

対処

1. gitlab-runnerのconfigを修正

修正すべきファイルは、gitlab-runnerのコンテナの中であれば/etc/gitlab-runner/config.toml、コンテナ作成時にvolumesを指定してホストOS側のパスをマウントしている場合は、そのファイルを直接編集すると良い。

config.toml
[[runners]]
  ...
  executor = "docker"
  ...
  [runners.docker]
   ...
    volumes = ["/dev/shm:/dev/shm", ...other volumes...]
  ...
  [runners.cache]

2. gitlab-runnerを再起動

# ホストOSから実行する場合
docker exec gitlab-runner-docker gitlab-runner restart

# コンテナにログイン後に実行する場合
gitlab-runner restart
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1