-
Notifications
You must be signed in to change notification settings - Fork 283
Open
Description
Version
@playwright/cli: 0.1.1- bundled
playwright: 1.59.0-alpha-1771104257000 - Node: v20.12.2
- OS: macOS 26.3.1 (Darwin arm64)
Repro
playwright-cli open
playwright-cli goto https://news.ycombinator.com
playwright-cli video-start
playwright-cli goto https://news.ycombinator.com/newest
playwright-cli snapshot
playwright-cli goto https://news.ycombinator.com/ask
playwright-cli snapshot
playwright-cli goto https://news.ycombinator.com/show
playwright-cli snapshot
playwright-cli goto https://news.ycombinator.com
playwright-cli snapshot
playwright-cli video-stop --filename=output.webm
ls -lh output.webm
# => output.webm is 0 bytesExpected
output.webm contains a valid video recording of the browser session.
Actual
output.webm is 0 bytes (empty file).
Reproduction Rate
5/5 — tested with 5 independent parallel sessions (-s=repro1 through -s=repro5), all produced 0-byte files.
Additional Observations
- Works with a single navigation:
video-start→ onegoto→video-stopproduces a valid video - Not site-specific: reproduces with any website (tested with Hacker News, Coursera, example.com)
- Adding sleep before
video-stopdoes NOT help: evensleep 10before stop still produces 0 bytes after multiple navigations - Headless and headed both affected
- Chrome (system) and Chromium (bundled) both affected
- Closing and reopening the browser resets the issue: after
close+open, the first video cycle works again - Progressive degradation on static pages: with repeated
video-start/video-stopcycles on a static page (no navigations between), video file sizes degrade progressively (25K → 14K → 1.9K) before stabilizing at 1.9K (white fallback frame only)
Secondary Issue: --filename flag
Separately, video-stop defines filename as an --option but documentation and intuitive usage suggest it should be a positional arg:
# Fails: "error: too many arguments: expected 0, received 1"
playwright-cli video-stop output.webm
# Works
playwright-cli video-stop --filename=output.webmPossible Root Cause (AI-assisted — may not be accurate)
The following analysis was performed by Claude (AI) by reading the source code. It has not been verified by the maintainers and may be incorrect:
video-startcallsPage.startScreencastvia CDP, and sets up aScreencastFrameevent listener that feeds frames to an ffmpeg process via stdin- Multiple rapid navigations appear to cause Chrome to stop emitting
Page.screencastFrameCDP events entirely — the screencast becomes permanently dead for that browser instance - When
video-stopis called with 0 frames received,VideoRecorder.stop()creates a white fallback frame and writes it to ffmpeg. However, the output file ends up 0 bytes — possibly becausesaveAs()copies the file before ffmpeg has fully flushed/closed the output - The
startScreencastmethod inscreencast.jsonly sends the CDPPage.startScreencastcommand once (when the first client registers) and does not re-issue it after navigations, which may be why Chrome stops delivering frames
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels