Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ProtocolError when running the UI #33707

Open
pereriksson opened this issue Nov 21, 2024 · 1 comment
Open

[Bug]: ProtocolError when running the UI #33707

pereriksson opened this issue Nov 21, 2024 · 1 comment

Comments

@pereriksson
Copy link

pereriksson commented Nov 21, 2024

Version

1.48.0

Steps to reproduce

This is an intermittent issue. Usually it happens when switching to the Playwright UI in the Dock on macOS.

Expected behavior

That the UI does not crash when switching applications

Actual behavior

The UI crashes with a ProtocolError.

`% yarn test
yarn run v1.22.19
$ playwright test --ui
/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/chromium/crConnection.js:129
    if (this._crashed || this._closed || this._connection._closed || this._connection._browserDisconnectedLogs) throw new _protocolError.ProtocolError(this._crashed ? 'crashed' : 'closed', undefined, this._connection._browserDisconnectedLogs);
                                                                                                                      ^

ProtocolError: 
    at CRSession.send (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/chromium/crConnection.js:129:119)
    at CRPage.bringToFront (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/chromium/crPage.js:185:42)
    at Page.bringToFront (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/page.js:385:26)
    at CRBrowserContext.<anonymous> (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/launchApp.js:51:20)
    at CRBrowserContext.emit (node:events:515:28)
    at Page.emitOnContext (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/page.js:128:26)
    at Page.reportAsNew (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/page.js:111:10)
    at CRPage._reportAsNew (/Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/chromium/crPage.js:129:16)
    at /Users/per/git/playwright-demo/node_modules/playwright-core/lib/server/chromium/crPage.js:118:12 {
  type: 'crashed',
  method: undefined,
  logs: undefined
}

Node.js v21.1.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`

Additional context

No response

Environment

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 71.28 MB / 16.00 GB
  Binaries:
    Node: 21.1.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.3 - /usr/local/bin/npm
    pnpm: 8.6.6 - ~/Library/pnpm/pnpm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.47.2 => 1.48.0
@dgozman
Copy link
Contributor

dgozman commented Nov 21, 2024

@pereriksson I tried to reproduce but it works for me locally. Is there anything specific in your setup? Could you share a small repro that triggers this problem? Additionally, I'd recommend running as DEBUG=pw:browser npx playwright test --ui to collect browser logs and post them here - in case we can see the reason for the crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants