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

ProtocolError: Protocol error (Browser.getVersion): Internal server error, session closed. #15

Open
vhscom opened this issue Dec 14, 2024 · 0 comments

Comments

@vhscom
Copy link

vhscom commented Dec 14, 2024

Thanks for preparing this template. I noticed an error in CI with the included GH Actions and am including it here for discussion.

Run npm run test

> test
> playwright test --ui

ProtocolError: Protocol error (Browser.getVersion): Internal server error, session closed.
    at /home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/chromium/crConnection.js:135:1[6](https://github.com/vhscom/remix-cloudflare-template/actions/runs/12227449822/job/34104184055#step:7:7)
    at new Promise (<anonymous>)
    at CRSession.send (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/chromium/crConnection.js:131:12)
    at CRBrowser.connect (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/chromium/crBrowser.js:51:35)
    at Chromium.connectToTransport (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/chromium/chromium.js:122:33)
    at Chromium._innerLaunch (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/browserType.js:161:32)
    at async Chromium._innerLaunchWithRetries (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/browserType.js:120:14)
    at async /home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/browserType.js:110:23
    at async ProgressController.run (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/progress.js:[7](https://github.com/vhscom/remix-cloudflare-template/actions/runs/12227449822/job/34104184055#step:7:8)9:22)
    at async Chromium.launchPersistentContext (/home/runner/work/remix-cloudflare-template/remix-cloudflare-template/node_modules/playwright-core/lib/server/browserType.js:[9](https://github.com/vhscom/remix-cloudflare-template/actions/runs/12227449822/job/34104184055#step:7:10)3:21) {
  type: 'closed',
  method: 'Browser.getVersion',
  logs: '\n' +
    '╔════════════════════════════════════════════════════════════════════════════════════════════════╗\n' +
    '║ Looks like you launched a headed browser without having a XServer running.                     ║\n' +
    "║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║\n" +
    '║                                                                                                ║\n' +
    '║ <3 Playwright Team                                                                             ║\n' +
    '╚════════════════════════════════════════════════════════════════════════════════════════════════╝'
}
Error: Process completed with exit code 1.

To reproduce clone or generate from template, follow README set-up instructions, push commit to mainline.

The failing action is configured using template defaults:

on:
  - push
jobs:
  test:
    name: 🔍 Testing
    runs-on: ubuntu-latest
    steps:
      - name: ⬇️ Checkout repo
        uses: actions/checkout@v3
      - name: ⎔ Setup node
        uses: actions/setup-node@v3
        with:
          node-version: 20
      - name: 📥 Download deps
        uses: bahmutov/npm-install@v1
        with:
          useLockFile: false
      - name: 🎭 Install Playwright
        run: npx playwright install --with-deps
      - name: 📦 Prepare the environment
        run: cp .dev.vars.example .dev.vars
      - name: 💣 Run some tests
        run: npm run test

And the test script from the package manifest (also using template default):

"test": "playwright test --ui",

Anyone have a workaround for this while we wait for a proper fix? I didn't see anything relevant on StackOverflow.

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

1 participant