[Bug]: Playwright Test does not report the error correctly when FFMPEG does not exist
Playwright version
1.12.3
Operating system
Windows
What browsers are you seeing the problem on?
Chromium
Other information
Desktop\Work\PlaywrightTest-Example> node -v v14.17.3 Desktop\Work\PlaywrightTest-Example> npm -v 6.14.13
What happened? / Describe the bug
During the playwright installation I am skipping the binaries download (using PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD). This is required as binaries download is giving few errors due to network restrictions. Later on I am trying to run the scenario with chrome using my launchOptions:executablePath pointing to chrome.exe on my laptop. Now if I keep "video" property under playwright.config.js then I am facing an error (see the logs for details). However if I remove the same then scenario got execute with issues.
CC: @mxschmitt
Please find below the snippet of my playwright.config.js file.
`module.exports = { use: { // Browser options browserName: "chromium", launchOptions: { headless: false, channel: "chrome", executablePath: "c:\Program Files (x86)\Google\Chrome\Application\chrome.exe", slowMo: 1000 }, // Artifacts screenshot: "only-on-failure", video: "retain-on-failure"
}, };`
Code snippet to reproduce your bug
const { test, expect } = require('@playwright/test');
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
const name = await page.innerText('.navbar__title');
expect(name).toBe('Playwright');
});
Relevant log output
PS C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example> npm run test
> [email protected] test C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example
> npx playwright test
Using config at C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example\playwright.config.js
Running 1 test using 1 worker
tests\test.js:3:1 › [chromium] basic test:
pw:api => browserType.launch started +0ms
pw:browser <launching> c:\Program Files (x86)\Google\Chrome\Application\chrome.exe --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disabl x 1) tests\test.js:3:1 › [chromium] basic test (0ms)
-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain
--no-service-autorun --user-data-dir=C:\Users\meet_\AppData\Local\Temp\playwright_chromiumdev_profile-aO4RJJ --remote-debugging-pipe --no-sandbox --no-startup-window +0ms
pw:browser <launched> pid=832 +13ms
pw:api <= browserType.launch succeeded +281ms
pw:api => browser.newContext started +2ms
pw:api <= browser.newContext succeeded +82ms
pw:api => browserContext.newPage started +1ms
pw:api <= browserContext.newPage failed +170ms
pw:api => page.screenshot started +4ms
pw:api <= page.screenshot succeeded +310ms
pw:api => browserContext.close started +0ms
pw:api => browser.close started +40ms
pw:browser [pid=832] <gracefully close start> +872ms
pw:api <= browserContext.close succeeded +40ms
pw:browser [pid=832] <process did exit: exitCode=0, signal=null> +256ms
pw:browser [pid=832] starting temporary directories cleanup +0ms
pw:browser [pid=832] finished temporary directories cleanup +352ms
pw:browser [pid=832] <gracefully close end> +0ms
pw:api <= browser.close succeeded +573ms
1) tests\test.js:3:1 › [chromium] basic test =====================================================
Error: Page closed
1 | const { test, expect } = require('@playwright/test');
2 |
3 | test('basic test', async ({ page }) => {
at CRSession.<anonymous> (C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example\node_modules\@playwright\test\lib\server\chromium\crPage.js:341:60)
at Object.onceWrapper (events.js:481:28)
at CRSession.emit (events.js:387:35)
at C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example\node_modules\@playwright\test\lib\server\chromium\crConnection.js:177:43
1 failed
tests\test.js:3:1 › [chromium] basic test ======================================================
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `npx playwright test`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\meet_\AppData\Roaming\npm-cache\_logs\2021-07-08T05_26_45_153Z-debug.log
PS C:\Users\meet_\OneDrive\Desktop\Work\PlaywrightTest-Example>