Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

targetCreatedHandler triggers UnhandledPromiseRejectionWarning

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js, playwright
領域
testing-qa

調査の方向性

示されている Playwright 設定を使用して、コンソール出力を最小限に抑えた状態で CI テストを実行し、その後 targetCreatedHandler と、2643 行付近の Playwright.js スタック位置を調査します。テストが UnhandledPromiseRejectionWarning なしで引き続きパスすれば完了です。

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

説明

bug playwright
What are you trying to achieve?

Running tests on the CI with minimum text output to the console

What do you get instead?

Though the tests pass the UnhandledPromiseRejectionWarning message creates redundant text output.

Provide console output if related. Use --verbose mode for more details.

(node:21420) UnhandledPromiseRejectionWarning: frame.frameElement: Frame has been detached.
    at C:\Users\...\..\...\node_modules\codeceptjs\lib\helper\Playwright.js:2643:46
(node:21420) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

photo_2021-09-11_14-31-21

Provide test source code if related

// paste test
Details
  • CodeceptJS version: 3.1.2
  • NodeJS Version: 14.17.5
  • Operating System: Windows and Linux
  • puppeteer || webdriverio || protractor || testcafe version (if related)
  • Configuration file:
//unrelated data omitted with "..."
exports.config = {
  tests: './test/steps/*_test.js',
  "translation": "ru-RU",
  output: './output',
  helpers: {
    Playwright: {
      url: 'someurl',
      show: false,
      browser: 'chromium'
    },
    GraphQL: {
      endpoint: '...',
    },
    ChaiWrapper : {
      "require": "codeceptjs-chai"
    },
    CustomPlaywrightHelper: {
      require: '.../customPlaywright_helper.js',
    },
    DateHelper: {
      require: '.../date_helper.js',
    },
    REST: {
    }
  },
  include: {
    I: './test/steps_file.js',
    pages: '...',
  },
  bootstrap: null,
  mocha: {
    "reporterOptions": {
      "reportDir": "output"
    }
  },
  name: 'foo',
  plugins: {
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true
    },
    tryTo: {
      enabled: true
    },
    screenshotOnFail: {
      enabled: true
    },
    "allure": {
      "enabled": true
    }
  }
}
主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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