[BUG] Playwright fails to load traces in CircleCI
See original GitHub issueContext:
- 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:
- Created a year ago
- Comments:8 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

👋 I’ll ask around 😄
Thanks @ValorHeart! It looks like that option is unfortunately not available in the hosted version of CircleCI.