Skip to content

The same socket file path is used for different users #287

@ticoneva

Description

@ticoneva

When multiple users share the same playwright-cli installation, the socket file path defaults to the same /tmp/playwright-cli/[hash]/. This would cause a EACCES: permission denied error for the second user onwards.

This happens because

  1. when PLAYWRIGHT_DAEMON_SOCKETS_DIR is not set, program.js defaults to creating a directory called playwright-cli in the default temporary directory;
  2. when .playwright is not present in the workspace, registry.js defaults to using the global installation path of the module to generate the hash.

As far as I can tell, PLAYWRIGHT_DAEMON_SOCKETS_DIR is not documented anywhere, and .playwright is not created by default. This makes the error very likely to appear in a centrally-managed, shared environment.

It seems that a simple solution would be to use a different path per user, but I am wondering if the current implementation is intentional or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions