Skip to content

[Bug]: playwright-cli attach --endpoint parameter doesn't work #41154

@zachary-wang12

Description

@zachary-wang12

Hi staff,

I'm currently using playwright-cli with playwright web server. With following the step of #40814 , it cannot setup the connection between playwright-cli and playwright server.

Version

Playwright CLI version: 0.1.13
Playwright version: 1.60.0

Steps to reproduce

Follow the steps in #40814 . If you need more detail, please let me know.

Expected behavior

  1. The command playwright-cli attach --endpoint=ws://localhost:9222 could work.
  2. Connection could be set up as normal.

Actual behavior

PS C:\Users\user1> playwright-cli attach --endpoint=ws://localhost:9222/cli
Error: no target specified for attach command; use one of [name], --cdp, --endpoint, or --extension to specify the target to attach to.
  1. If follow playwright-cli remoteEndpoint does not forward browserName to run-server #40814 , using playwright-cli attach ws://localhost:9222/cli (without declaration of --endpoint=), there is an error shown:
PS C:\Users\user1> playwright-cli attach ws://localhost:9222/cli
node:fs:561
  return binding.open(
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\user1\AppData\Local\ms-playwright\daemon\b404d6e01d1d5633\ws:\localhost:9222\cli.err'
    at Object.openSync (node:fs:561:18)
    at Session.startDaemon (C:\Users\user1\AppData\Local\mise\installs\npm-playwright-cli\0.1.13\node_modules\@playwright\cli\node_modules\playwright-core\lib\tools\cli-client\session.js:126:35)
    at async startSession (C:\Users\user1\AppData\Local\mise\installs\npm-playwright-cli\0.1.13\node_modules\@playwright\cli\node_modules\playwright-core\lib\tools\cli-client\program.js:231:10)
    at async program (C:\Users\user1\AppData\Local\mise\installs\npm-playwright-cli\0.1.13\node_modules\@playwright\cli\node_modules\playwright-core\lib\tools\cli-client\program.js:149:23) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'C:\\Users\\user1\\AppData\\Local\\ms-playwright\\daemon\\b404d6e01d1d5633\\ws:\\localhost:9222\\cli.err'
}

Node.js v24.16.0

Environment

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-1360P
    Memory: 8.59 GB / 15.68 GB
  Binaries:
    Node: 24.16.0 - C:\Users\user1\AppData\Local\mise\installs\node\24.16.0\node.EXE
    npm: 11.13.0 - C:\Users\user1\AppData\Local\mise\installs\node\24.16.0\npm.CMD
  IDEs:
    opencode: 1.15.13 - C:\Users\user1\AppData\Local\mise\installs\opencode\1.15.13\opencode.EXE
  Languages:
    Bash: 5.2.37 - C:\WINDOWS\system32\bash.EXE

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