Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

keepTraceForPassedTests failure

Open
#5,433 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, playwright
Domain
testing-qa

Research direction

Start with server.js around line 37 and the Playwright helper at Playwright.js:2509, using the reported configuration with keepVideoForPassedTests or keepTraceForPassedTests enabled. Reproduce the failure and trace how the passed-test options affect the helper state; done means either option works without the undefined screenshot error while retaining the requested trace or video.

Written by the indexing model from the issue text.

Description

stale

I try to use the config options keepTraceForPassedTests and keepVideoForPassedTests.

I use the codeception module for php.

trace and video works. But when i try to activate one of the keepTraceForPassedTests and keepVideoForPassedTests options. it fails.

it use the playwright helper object. https://github.com/Codeception/module-playwright/blob/main/server.js#L37

playwright-1  | Init:  {
playwright-1  |   pw_debug: true,
playwright-1  |   timeout: 5000,
playwright-1  |   url: 'https://event-ticketing.local',
playwright-1  |   browser: 'webkit',
playwright-1  |   show: true,
playwright-1  |   fullPageScreenshots: true,
playwright-1  |   trace: true,
playwright-1  |   video: true,
playwright-1  |   ignoreHTTPSErrors: true,
playwright-1  |   emulate: {
playwright-1  |     userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/26.0 Mobile/15A372 Safari/604.1',
playwright-1  |     viewport: { width: 375, height: 812 },
playwright-1  |     deviceScaleFactor: 3,
playwright-1  |     isMobile: true,
playwright-1  |     hasTouch: true,
playwright-1  |     defaultBrowserType: 'webkit'
playwright-1  |   },
playwright-1  |   keepVideoForPassedTests: true
playwright-1  | }
playwright-1  | Error saving screenshot:  TypeError: Cannot read properties of undefined (reading 'screenshot')
playwright-1  |     at Playwright.saveScreenshot (/usr/lib/node_modules/codeception-module-playwright/node_modules/codeceptjs/lib/helper/Playwright.js:2509:21)
playwright-1  |     at /usr/lib/node_modules/codeception-module-playwright/server.js:69:28
playwright-1  |     at Layer.handle [as handle_request] (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/layer.js:95:5)
playwright-1  |     at next (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/route.js:149:13)
playwright-1  |     at Route.dispatch (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/route.js:119:3)
playwright-1  |     at Layer.handle [as handle_request] (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/layer.js:95:5)
playwright-1  |     at /usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:284:15
playwright-1  |     at router.process_params (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:346:12)
playwright-1  |     at next (/usr/lib/node_modules/codeception-module-playwright/node_modules/express/lib/router/index.js:280:10)
playwright-1  |     at /usr/lib/node_modules/codeception-module-playwright/node_modules/body-parser/lib/read.js:137:5
Dominant language
JavaScript
Stars
4.2k
Forks
756
Avg merge
2d 9h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codeceptjs/CodeceptJS

All issues in codeceptjs/CodeceptJS

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.