Dear Maintainer,
The playwright test runner fails when cleanup on Debian 13 (trixie). A
reproducer:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({
headless: true,
executablePath: '/usr/bin/chromium',
});
const page = await browser.newPage();
await page.goto('https://example.com');
console.log(await page.title());
await page.locator('a').first().click();
await browser.close();
})();
The stack trace error reported:
node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
AssertionError [ERR_ASSERTION]: rimraf: callback function required
at rimraf2 (/usr/share/nodejs/playwright-core/lib/utilsBundleImpl/index.js:12698:14)
at /usr/share/nodejs/playwright-core/lib/utils/fileUtils.js:43:31
at new Promise (<anonymous>)
at /usr/share/nodejs/playwright-core/lib/utils/fileUtils.js:42:12
at Array.map (<anonymous>)
at removeFolders (/usr/share/nodejs/playwright-core/lib/utils/fileUtils.js:41:33)
at cleanup (/usr/share/nodejs/playwright-core/lib/utils/processLauncher.js:114:55)
at ChildProcess.<anonymous> (/usr/share/nodejs/playwright-core/lib/utils/processLauncher.js:154:5)
at Object.onceWrapper (node:events:639:26)
at ChildProcess.emit (node:events:524:28) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: 'undefined',
expected: 'function',
operator: '=='
}
It seems that playwright packaged does not match rimraf in trixie, while
rimraf wants callback function, playwright in trixie needs rimraf to
return a Promise.
I noticed that bug #1138720 reports a similar bug about rimraf and
playwright. However, it's about a build failure with newer rimraf, and
different from this runtime failure.
Playwright in sid works properly.