vitest-dev / vitest-dev/vitest

Playwright trace report ENAMETOOLONG copyfile

Open
#9,006 1 comment 5 reactions 0 assignees View on GitHub

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

Image

combined with this code in trace.ts

Image
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.