You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a working playwright setup for which we are using a custom reporter by a 3rd party.
This reporter requires the playwright config to use projects.
Whenever we add this to our config (in the use object):
we encounter the following error: TypeError: Cannot read properties of undefined (reading 'project') when adding projects to playwright.config.js.
The error seems to be coming from PW itself, as even without our custom reporter, the error pops up when we add the projects to the config.
Reproducible on PW version 1.50.
Is there maybe a specific property that is expected in project objects, that we're missing?
We have tried adding quite a few properties, but can't seem to get solve the error. We've tried -on top of name- title, use, devices, ...
Full config:
/* global process */// Prepare Playwright launch argumentsconstlaunchArgs=['--disable-dev-shm-usage','--disable-gpu'];if('LOCAL'===process.env.ENVIRONMENT){// Ignore certificate errors on locallaunchArgs.push('--ignore-certificate-errors');}// Prepare Playwright reporters - dedicated Zephyr reporter when env variable is setletreporters;if('true'===process.env.PLAYWRIGHT_ZEPHYR_REPORTING_ENABLED){reporters=[['list'],['@y9f-zephyr/reporter',{auth: {username: process.env.PLAYWRIGHT_ZEPHYR_USERNAME,password: process.env.PLAYWRIGHT_ZEPHYR_PASSWORD,PatId: process.env.PLAYWRIGHT_ZEPHYR_PAT_ID,},zephyr: {projectKey: process.env.PLAYWRIGHT_ZEPHYR_PROJECT,testPlanKey: process.env.PLAYWRIGHT_ZEPHYR_TESTPLAN,environment: process.env.ENVIRONMENT,},},],];}else{reporters=[['junit',{// Place the junit results somewhere our Jenkins pipeline will look for themoutputFile: 'e2e/results/junit-results.xml',stripANSIControlSequences: true,},],['list'],];}exportdefault{use: {projects: [{name: 'Automated Playwright tests',},],channel: 'chrome',headless: true,screenshot: 'only-on-failure',video: 'on-first-retry',ignoreHTTPSErrors: true,contextOptions: {reducedMotion: 'reduce',},launchOptions: {executablePath: process.env.CHROMIUM_BIN,args: launchArgs},trace: 'retain-on-failure'},workers: 1,updateSnapshots: 'missing',reporter: reporters,retries: 1,testDir: 'e2e/specs',snapshotDir: 'e2e/snapshots',testMatch: '**/*.spec.js',outputDir: 'e2e/results',};
The text was updated successfully, but these errors were encountered:
senn
changed the title
TypeError: Cannot read properties of undefined (reading 'project') when adding projects to playwright.config.js
[BUG] TypeError: Cannot read properties of undefined (reading 'project') when adding projects to playwright.config.js
Jan 30, 2025
We have a working playwright setup for which we are using a custom reporter by a 3rd party.
This reporter requires the playwright config to use
projects
.Whenever we add this to our config (in the
use
object):we encounter the following error:
TypeError: Cannot read properties of undefined (reading 'project') when adding projects to playwright.config.js
.The error seems to be coming from PW itself, as even without our custom reporter, the error pops up when we add the projects to the config.
Reproducible on PW version 1.50.
Is there maybe a specific property that is expected in project objects, that we're missing?
We have tried adding quite a few properties, but can't seem to get solve the error. We've tried -on top of
name
-title
,use
,devices
, ...Full config:
The text was updated successfully, but these errors were encountered: