playwright-slack-report: EISDIR: illegal operation on a directory, read
I get this error:
node:fs:744
handleErrorFromBinding(ctx);
^
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:744:3)
at tryReadSync (node:fs:444:20)
at Object.readFileSync (node:fs:490:19)
at ResultsParser.parseFromJsonFile (/home/runner/.npm/_npx/912153[8](https://github.com/.../actions/runs/7176906992/job/19542812131?pr=7957#step:8:9)dc03c[9](https://github.com/.../actions/runs/7176906992/job/19542812131?pr=7957#step:8:10)62b/node_modules/playwright-slack-report/dist/src/ResultsParser.js:39:25)
at Command.<anonymous> (/home/runner/.npm/_npx/9[12](https://github.com/.../actions/runs/7176906992/job/19542812131?pr=7957#step:8:13)[15](https://github.com/.../actions/runs/7176906992/job/19542812131?pr=7957#step:8:16)38dc03c962b/node_modules/playwright-slack-report/dist/cli.js:32:47) {
errno: -21,
syscall: 'read',
code: 'EISDIR'
}
by running the following command:
SLACK_BOT_USER_OAUTH_TOKEN=xxx npx playwright-slack-report -c playwright/cli_config.json -j blob-report/
The artifact is created based on this in my playwright.yml file:
- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v3
with:
name: all-blob-reports
path: blob-report
- name: Merge into JSON Report
run: npx playwright merge-reports --reporter json blob-report/
- name: Upload JSON Report
uses: actions/upload-artifact@v3
with:
name: json-report--attempt-${{ github.run_attempt }}
path: blob-report
retention-days: 3
When I tried including the actual json file, it says the artifact can’t be found:
SLACK_BOT_USER_OAUTH_TOKEN=xxx npx playwright-slack-report -c playwright/cli_config.json -j blob-report/json-report--attempt-${{ github.run_attempt }}.json
Exact error: ❌ JSON results file does not exist: blob-report/json-report–attempt-1/: Use --json-results <path> e.g. --json-results=“./results.json”
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (10 by maintainers)
@poponuts try updating to the latest.
Couple things:
TypeError: Cannot destructure property 'retries' of 'parsedData.config.projects[0]' as it is undefined.was legit issue, the app wasn’t handling situations where retry is not configured in the Playwright config❌ This won’t work:
npx playwright merge-reports --reporter json ./all-blob-reports✅ This should work:
npx playwright merge-reports --reporter json ./all-blob-reports > merged_tests_results.jsonhere is a full sample of my working GH action
thanks for raising, let me try and repro