question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Playwright fails to load traces in CircleCI

See original GitHub issue

Context:

  • Playwright Version: mcr.microsoft.com/playwright:v1.26.0-focal
  • Operating System: Linux (on CircleCI)
  • Node.js version: v16.17.0
  • Browser: Chromium
  • Extra: CircleCI

System:

  • OS: Linux 5.4 Ubuntu 20.04.5 LTS (Focal Fossa)
  • Memory: 14.47 GB / 16.01 GB
  • Container: Yes

Binaries:

  • Node: 16.17.0 - /usr/bin/node
  • Yarn: 1.22.19 - /usr/bin/yarn
  • npm: 8.15.0 - /usr/bin/npm

Languages:

  • Bash: 5.0.17 - /usr/bin/bash

Code Snippet

I have a CircleCI config that runs Playwright and stores the playwright-report folder as an artifact in CircleCI:

  e2e:
    docker:
      - image: mcr.microsoft.com/playwright:v1.26.0-focal
    environment:
      NODE_ENV: development
    steps:
      - checkout
      - attach_workspace:
          at: ./
      - run:
          name: Install dependencies
          command: npm install
      - run:
          name: Run playwright tests
          command: npx playwright test
      - store_artifacts:
          path: playwright-report
      - store_artifacts:
          path: e2e-results

Describe the bug

I can view some parts of the Playwright test report, but when I click on a particular trace, the JS engine fails with this error:

Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope ('https://output.circle-artifacts.com/output/job/9cd422e0-2ce5-4635-b4ea-0fb2c13ecfd8/artifacts/0/playwright-report/trace/') with script ('https://output.circle-artifacts.com/output/job/9cd422e0-2ce5-4635-b4ea-0fb2c13ecfd8/artifacts/0/playwright-report/trace/sw.bundle.js'): The script resource is behind a redirect, which is disallowed.

If I run python3 -m http.server in the playwright-report folder on my local machine, I can view and navigate the test results fine. There seems to be something about serving it over TLS or on CircleCI specifically that causes the report to fail to load.

Example CircleCI job: https://app.circleci.com/pipelines/github/mtlynch/picoshare/1038/workflows/4c86580c-1abc-4124-b228-6bfc36a51dca/jobs/4993

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
rosieyohannancommented, Nov 10, 2022

👋 I’ll ask around 😄

2reactions
mtlynchcommented, Nov 2, 2022

Thanks @ValorHeart! It looks like that option is unfortunately not available in the hosted version of CircleCI.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Playwright & Circle CI Integration - YouTube
Hello :), in this video we'll learn how to integrate the Playwright tests in the Circle CI pipeline.
Read more >
Error: Cannot find module - Running Tests - CircleCI Discuss
Hi, While running test in cirlce CI I am facing this issue. Error: Cannot find module '@pages/CreateCertificatePage' Require stack: ...
Read more >
Continuous Integration | Playwright - CukeTest
Playwright tests can be executed in CI environments. We have created sample configurations for common CI providers.
Read more >
playwright Changelog - pyup.io
Start tracing before creating / navigating a page. ... Stop tracing and export it into a zip archive. ... Read more in [trace...
Read more >
How to start with Playwright Debugging | BrowserStack
Validate the code for a successful fix of the error. How to Debug Playwright Tests? One of the key features of Playwright is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found