Skip to content

Failed video-start leaves recording marked as started; video-stop then reports video files that were never written #513

Closed

Description

Context.startVideoRecording() sets this._video before starting the per-page screencasts. If starting one fails (for example when ffmpeg is not installed), the command reports the error, but _video stays set. After that:

  • video-start again fails with Video recording has already been started.
  • video-chapter reports success.
  • video-stop lists - [Video](./a.webm), but no such file exists.

Steps to reproduce

(Any machine without the Playwright ffmpeg build installed.)

playwright-cli open https://example.com
playwright-cli video-start a.webm     # Error: Executable doesn't exist at .../ffmpeg-1013/ffmpeg-linux
playwright-cli video-start b.webm     # Error: Video recording has already been started.
playwright-cli video-chapter Intro    # Chapter 'Intro' added.
playwright-cli video-stop             # - [Video](./a.webm)
ls a.webm                             # No such file or directory

With an extra tab open, video-stop reported both ./myrun.webm and ./myrun-1.webm, and neither existed.

Expected

A failed video-start resets the state, so the next video-start retries and video-stop says No videos were recorded. video-stop should also only list files that were actually written. Setting this._video after the screencasts start, or clearing it in a catch, would fix the first part.

Environment

  • @playwright/cli 0.1.23 (main @ f50f579), playwright-core 1.65.0-alpha-2026-10-30
  • Node 22.23.4, Linux x64, Chrome for Testing 153

Activity

  1. pavelfeldman commented on Nov 5, 2026

    @pavelfeldman
    Member

    Low impact, accepting the gap in the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions