Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

targetCreatedHandler triggers UnhandledPromiseRejectionWarning

Aperta
#3,037 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, node.js, playwright
Ambito
testing-qa

Direzione di ricerca

Esegui i test CI con un output della console minimo usando la configurazione Playwright mostrata, quindi esamina targetCreatedHandler e la posizione nello stack di Playwright.js intorno alla riga 2643. Il lavoro è completato quando i test continuano a superare l’esecuzione senza la UnhandledPromiseRejectionWarning.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
    }
  }
}
Lingua principale
JavaScript
Stelle
4.2k
Fork
756
Merge medio
2g 9h
PR unite (30g)
16

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeceptjs/CodeceptJS

Tutte le issue di codeceptjs/CodeceptJS

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.