Skip to content

tab-new crashes in attach --extension sessions with TypeError reading _page #373

@jianzhangg

Description

@jianzhangg

Summary

tab-new fails in an attach --extension=msedge session with:

TypeError: Cannot read properties of undefined (reading '_page')

This does not reproduce in a normal open session on the same machine.

Version

  • @playwright/cli: 0.1.8
  • OS: macOS 15.7.4
  • Browser: Microsoft Edge (attached via extension)

Repro

  1. Attach to a running Edge session via extension:
playwright-cli -s=pf attach --extension=msedge
  1. Confirm the session is alive:
playwright-cli -s=pf tab-list

Example output:

### Result
- 0: (current) [森果云-批发易](http://pfzone.senguo.me:3009/easy/private/salesman)
  1. Try to create a new tab:
playwright-cli -s=pf tab-new

or:

playwright-cli -s=pf tab-new 'http://pfzone.senguo.me:3009/easy/private/salesman'

Actual result

Both commands fail immediately with:

### Error
TypeError: Cannot read properties of undefined (reading '_page')

Expected result

tab-new should create a new tab in the attached session, the same way it does in a normal open session.

Control case

The same command works in a non-attach session:

playwright-cli -s=cmp open --browser=msedge 'http://pfzone.senguo.me:3009/easy/private/salesman'
playwright-cli -s=cmp tab-new
playwright-cli -s=cmp tab-new 'http://pfzone.senguo.me:3009/easy/private/salesman'

In that case, new tabs are created successfully.

Notes

  • I also tried attach --cdp=msedge, but on this machine remote debugging was not enabled, so I could not compare CDP attach behavior yet.
  • This looks specific to attach --extension rather than a general tab-new failure.

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