Cypress component test crashes within github actions

オープン
#703 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cypress, docker, github-actions, next.js, node.js, typescript
領域
ci-cd, devops, testing

調査の方向性

提供された Cypress、Node、Ubuntu、plugin のバージョンを使用して、まず Docker 化された GitHub Actions runner で報告された Cypress コンポーネントテストから始めます。失敗する実行とローカルでの実行を比較し、その後、Chrome DevTools の再接続エラーと併せて .babelrc および .nyc_output/out.json を調査します。完了条件は、instrumentation に関連するクラッシュを再現または切り分け、coverage 出力を伴う安定したテスト実行を確認することです。

索引モデルが issue の本文から書いたものです。

説明

Logs and screenshots
image

Versions

  • What is this plugin's version? 3.12.3
  • What is Cypress version? 13.3.0
  • What is your operating system? Github runner uses: ubuntu-latest-8-cores
    • Ubuntu 22.04.3 LTS
  • What is the shell? bash
  • What is the Node version? 16.20.2
  • How do you instrument your application? Instanbul
    • .babelrc contains: {"presets": ["next/babel"], "plugins": ["istanbul"]}
  • When running tests, if you open the web application in regular browser, and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?
    • Coverage works locally (see screenshots), but issue is on runner.
    • image
    • image
  • Is there .nyc_output folder? Is there .nyc_output/out.json file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?
    • image
  • Do you have any custom NYC settings? No
  • Do you run Cypress tests in a Docker container? The runner does

Describe the bug
I have tried adding code coverage to our cypress tests. The coverage works locally but when running within github actions it seems the addition of instrumentation causes cypress to crash with the error There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser. after the first cypress test tries to run.

Link to the repo
Our repo is private and confidential, this will limit some things I can share to help troubleshoot the issue.

主要言語
TypeScript
スター
440
フォーク
114
平均マージ
42分
マージ済み PR(30日)
19

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cypress-io/code-coverage のほかの issue

cypress-io/code-coverage の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。