Skip to content

[Bug]: .setRecordVideoDir doesn't work with docker image #39279

@oabukmail

Description

@oabukmail

Version

1.58.0

Steps to reproduce

run Playwright docker image as a server using this command
udo docker run -d \ --name playwright-server \ -p 3000:3000 \ --ipc=host \ --user root \ -v /tmp/docker_videos:/videos \ mcr.microsoft.com/playwright:v1.58.0-noble \ /bin/sh -c "npx -y playwright@1.58.0 run-server --port 3000 --host 0.0.0.0"

run the java test context. .setRecordVideoDir(Paths.get("/videos/"))

Expected behavior

video saved on the folder videos in the docker and should be mapped into tmp/docker_videos folder on the host server

Actual behavior

the video never being saved
it only works when i run the test locally without .connect
never worked when i connect to playwright remote server
i can use SaveAs but that saves the video on the local device, but i want the video to be saved on the server beside the docker image

i have tried many things such as folder and volume permissions , but the video never saved , even on the folder inside the docker image itself, no luck

Additional context

No response

Environment

server is Linux Ubuntu Server 25.10
playwright version 1.58 in docker image

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