vitest-dev / vitest-dev/vitest
Playwright trace report ENAMETOOLONG copyfile
Open
Nobody has claimed this yet.
feat: browser
p3-minor-bug
- Dominant language
- TypeScript
- Stars
- 17.1k
- Forks
- 2k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 92
Description
Describe the bug
Redacted error:
Error: ENAMETOOLONG: name too long, copyfile '/path/to/file/and/test/file/.vitest-attachments/src-components-<SuiteName>-traces-<FileName>-spec-tsx-browser--chromium--<SuiteName>-<LongTestName>-0-0-trace-zip-c4a24a9dd74d061060a01ddeb8c322357cbaeb01.zip'
Likely culprit, the annotation message in the file name
combined with this code in trace.ts
Reproduction
Have a test with a long-ish name, enable traces on playwright and html reporter
System Info
System:
OS: macOS 26.1
CPU: (10) arm64 Apple M1 Max
Memory: 116.95 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.21.0 - /Users/george.griffiths/.nvm/versions/node/v22.21.0/bin/node
npm: 10.9.4 - /Users/george.griffiths/.nvm/versions/node/v22.21.0/bin/npm
bun: 1.0.12 - /Users/george.griffiths/.bun/bin/bun
Deno: 1.34.3 - /opt/homebrew/bin/deno
Browsers:
Chrome: 142.0.7444.135
Edge: 142.0.3595.65
Safari: 26.1
Used Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in trace.ts, focusing on how annotation messages contribute to trace attachment filenames. Reproduce the failure with a long test name, traces enabled, and the HTML reporter, then verify that the report can copy and load the trace without an ENAMETOOLONG error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100