Skip to content

[Bug]: Trace viewer in WSL2 cannot find trace in filesystem / returns 404 #39049

@jonasclaes

Description

@jonasclaes

Version

v1.58.0

Steps to reproduce

  1. Initialize a new Playwright project using pnpm create playwright. Choose TypeScript, folder tests no GHA, install browsers, install dependencies.
  2. Open the project in VSCode, in WSL2. So, open VSCode on your Windows machine. Connect from VSCode to WSL using the button in the lower left-hand corner, or using the quick action in the menu. Once your VSCode WSL connection has been opened, open the project folder in the editor.
  3. Enable "Show trace viewer" in the Playwright plugin settings panel.
  4. Run one of the example tests that come with the default installation. For example the has title test.
  5. A new tab should open in the browser with the trace viewer
  6. Observe the trace viewer trying to load the trace, but failing on a 404.
  7. Open the logs (F12)
  8. See failing network calls to http://localhost:<randomly generated port>/home/<the rest of the path to the .zip>. In my case it was: http://localhost:46393/home/jonas/repos/repro/playwright-trace-viewer-issue/test-results/example-has-title-chromium/trace.zip
  9. If you copy and paste the path starting with /home until the .zip part, and paste it in your terminal like ls -la <path here>, you can see that the zip file does indeed exist and contains data.
Image Image

Expected behavior

I expect the trace to be loaded correctly.

Actual behavior

There are error messages in the logs and failing network requests.

Image
sw.bundle.js:3 Error: HTTP error Not Found
    at ht (sw.bundle.js:3:56831)
    at async Ts (sw.bundle.js:3:56409)
    at async Cn (sw.bundle.js:3:56327)
    at async Pn (sw.bundle.js:3:56554)
    at async ys (sw.bundle.js:3:55710)
    at async ua.init (sw.bundle.js:3:54655)
    at async Ss.init (sw.bundle.js:3:57710)
    at async Pe (sw.bundle.js:3:60414)
    at async qs.getEntriesGenerator (sw.bundle.js:3:62971)
    at async qs.getEntries (sw.bundle.js:3:65792)

:46393/trace/context…e613764d08f8.json:1 
 Failed to load resource: the server responded with a status of 500 ()
:46393/home/jonas/re…e613764d08f8.json:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
sw.bundle.js:3 Error: HTTP error Not Found
    at ht (sw.bundle.js:3:56831)
    at async Ts (sw.bundle.js:3:56409)
    at async Cn (sw.bundle.js:3:56327)
    at async Pn (sw.bundle.js:3:56554)
    at async ys (sw.bundle.js:3:55710)
    at async ua.init (sw.bundle.js:3:54655)
    at async Ss.init (sw.bundle.js:3:57710)
    at async Pe (sw.bundle.js:3:60414)
    at async qs.getEntriesGenerator (sw.bundle.js:3:62971)
    at async qs.getEntries (sw.bundle.js:3:65792)
:46393/trace/context…e613764d08f8.json:1 
 Failed to load resource: the server responded with a status of 500 ()
sw.bundle.js:3 Error: HTTP error Not Found
    at ht (sw.bundle.js:3:56831)
    at async Ts (sw.bundle.js:3:56409)
    at async Cn (sw.bundle.js:3:56327)
    at async Pn (sw.bundle.js:3:56554)
    at async ys (sw.bundle.js:3:55710)
    at async ua.init (sw.bundle.js:3:54655)
    at async Ss.init (sw.bundle.js:3:57710)
    at async Pe (sw.bundle.js:3:60414)
    at async qs.getEntriesGenerator (sw.bundle.js:3:62971)
    at async qs.getEntries (sw.bundle.js:3:65792)
:46393/trace/context…omium%2Ftrace.zip:1 
 Failed to load resource: the server responded with a status of 500 ()
:46393/home/jonas/re…hromium/trace.zip:1 
 Failed to load resource: the server responded with a status of 404 (Not Found)
sw.bundle.js:3 Error: HTTP error Not Found
    at ht (sw.bundle.js:3:56831)
    at async Ts (sw.bundle.js:3:56409)
    at async Cn (sw.bundle.js:3:56327)
    at async Pn (sw.bundle.js:3:56554)
    at async ys (sw.bundle.js:3:55710)
    at async ua.init (sw.bundle.js:3:54655)
    at async Ss.init (sw.bundle.js:3:57710)
    at async Pe (sw.bundle.js:3:60414)
    at async qs.getEntriesGenerator (sw.bundle.js:3:62971)
    at async qs.getEntries (sw.bundle.js:3:65792)
:46393/trace/context…omium%2Ftrace.zip:1 
 Failed to load resource: the server responded with a status of 500 ()

Additional context

No response

Environment

System:
    OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
    CPU: (12) x64 AMD Ryzen 5 PRO 5650U with Radeon Graphics
    Memory: 4.16 GB / 7.18 GB
    Container: Yes
  Binaries:
    Node: 24.13.0 - /home/jonas/.nvm/versions/node/v24.13.0/bin/node
    npm: 11.6.2 - /home/jonas/.nvm/versions/node/v24.13.0/bin/npm
    pnpm: 10.28.2 - /home/jonas/.nvm/versions/node/v24.13.0/bin/pnpm
  IDEs:
    VSCode: 1.108.2 - /home/jonas/.vscode-server/bin/c9d77990917f3102ada88be140d28b038d1dd7c7/bin/remote-cli/code
  Languages:
    Bash: 5.2.21 - /usr/bin/bash
  npmPackages:
    @playwright/test: ^1.58.0 => 1.58.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions