Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION] recordVideo not working anymore after update #27086

Closed
1 task done
vogler opened this issue Sep 14, 2023 · 1 comment · Fixed by #27099
Closed
1 task done

[REGRESSION] recordVideo not working anymore after update #27086

vogler opened this issue Sep 14, 2023 · 1 comment · Fixed by #27099
Assignees
Labels

Comments

@vogler
Copy link

vogler commented Sep 14, 2023

System info

  • Playwright Version: [v1.38.0]
  • Operating System: macOS 13.5.1
  • Browser: Firefox
  • Other info:

Source code

  • I provided exact source code that allows reproducing the issue locally.

Minimal example following https://playwright.dev/docs/videos:

import { firefox } from 'playwright-firefox';
import { datetime } from './util.js';
import { cfg } from './config.js';

const options = {
  headless: cfg.headless,
  viewport: { width: cfg.width, height: cfg.height },
  recordVideo: cfg.record ? { dir: 'data/record/', size: { width: cfg.width, height: cfg.height } } : undefined, // will record a .webm video for each page navigated; without size, video would be scaled down to fit 800x800
  recordHar: cfg.record ? { path: `data/record/eg-${datetime()}.har` } : undefined, // will record a HAR file with network requests and responses; can be imported in Chrome devtools
};
console.log(options);
const context = await firefox.launchPersistentContext(cfg.dir.browser, options);

const page = context.pages().length ? context.pages()[0] : await context.newPage(); // should always exist
await page.goto('https://playwright.dev');
await page.waitForTimeout(3000);
await context.close();

Steps

SHOW=1 node recordVideo.js
{
  headless: false,
  viewport: { width: 1920, height: 1080 },
  recordVideo: { dir: 'data/record/', size: { width: 1920, height: 1080 } },
  recordHar: { path: 'data/record/eg-2023-09-14 17:23:32.955.har' }
}

Expected

Generate both a .har and .webm file in data/record.

Actual

Only a .har file is saved:
image

As you can see, this still worked on Aug 23rd.
I didn't change any of my code.

Playwright update ^1.31.0 → ^1.37.1 seems to have broken it: vogler/free-games-claimer@6a7cca3

@dgozman
Copy link
Contributor

dgozman commented Sep 14, 2023

I can repro. This regressed between v1.35 and v1.36. Works in Chromium and WebKit, but not Firefox.

@dgozman dgozman changed the title [BUG] recordVideo not working anymore after update [REGRESSION] recordVideo not working anymore after update Sep 14, 2023
@dgozman dgozman added the v1.39 label Sep 14, 2023
aslushnikov added a commit to aslushnikov/playwright that referenced this issue Sep 14, 2023
Firefox protocol requires absolute paths for video recording.

Fixes microsoft#27086
aslushnikov added a commit to aslushnikov/playwright that referenced this issue Sep 15, 2023
Firefox protocol requires absolute paths for video recording.

Fixes microsoft#27086
aslushnikov added a commit that referenced this issue Sep 15, 2023
Firefox protocol requires absolute paths for video recording.

Fixes #27086
vogler added a commit to vogler/free-games-claimer that referenced this issue Sep 18, 2023
Recording videos with relative path as in docs was broken for Firefox.
Issue: microsoft/playwright#27086
Can be reverted after PR is available in release: microsoft/playwright#27099
Germandrummer92 pushed a commit to OctoMind-dev/playwright that referenced this issue Oct 27, 2023
…t#27099)

Firefox protocol requires absolute paths for video recording.

Fixes microsoft#27086
vogler added a commit to vogler/free-games-claimer that referenced this issue Nov 2, 2023
This reverts commit 13b2917.

Fine to do after upgrade to 1.39 in 75f7d77.
which included microsoft/playwright#27086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants