-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where can I find a standalone trace-viewer (web app) #10455
Comments
To give the wider context, I have a TeamCity server which will collect and serve the trace zip files, I'd like to generate a url like From a HTTP perspective these files are served requiring basic auth, but I also have a proxy that doesn't require auth (internal and only accessible within our network). Unfortunately the browser denies the fetch request due to CORS, so adding a |
The more I think this over, the more I think my request here is for you to add Otherwise the |
I've taken a look at this again, it looks like this header is being set in the cli hosted version and on `https://trace.platwright.dev/', however I'm getting the request blocked when the service worker is making the request. I've done a bit of reading about services workers with CORS, however I still don't really understand why this isn't working. The context endpoint returns a 500 with:
The request made by the service worker looks like this in devtools: |
CORS works the other way around, Access-Control-Allow-Origin is a response header that specifies origins that can access your zip files. So your server should return
That way when trace viewer reaches for the trace files, it can get them. |
Here is another workaround for you: every time we make an html report, we bundle the trace viewer with it. So:
in the playwright-report, you'll get a trace folder with the deployed version of the trace viewer. We can consider exposing |
Thanks! Ah 🤦 my bad, I thought it was the other way around. At the moment I have I'm using playwright-dotnet, so I presume that rules out the reporter option for now. I'd love to have a way to have a static file dumped into our CI artifacts, I was using the version linked to in the OP but it wasn't working as it was outdated. |
For anyone finding this issue, I finally figured out what I was doing wrong. If you are serving your own trace files and want to view them via https://trace.playwright.dev, you will need:
The last 2 points took me a while to figure out. |
@pavelfeldman Hi there, so is there any way to host trace viewer on my own infrastructure? Can I just serve trace folder with nginx, for example? I know about |
@pavelfeldman Hi. I have a similar issue that a self-hosted trace viewer would solve - I have a trace file accessible over HTTP - it's in on a VPN, so there is encryption still. I can only load trace.playwright.dev over https, but then I have a mixed-content error since I can't download the http trace file from a https page. |
Wow this works with Github Pages files no config changes needed :) https://trace.playwright.dev/?trace=https://alisterscott.github.io/media/trace.zip |
Dont mean to resurrect an old thread, but I needed this for an internal project as well. I was able to get something working by:
Note You will need to serve up as https if you are not using looalhost due to the use of webworkers |
Minor update, in the latest version, you should run
since the build for this component is no longer with Webpack. The webpack dir is still there tho which creates some confusion |
@pavelfeldman @JoelEinbinder I'm super impressed with playwright and the trace viewer.
I'm looking to bundle up the viewer with my build artifacts to make viewing the traces seamless (CORS & Auth on my artifacts make the public app tricky). I cannot seem to find an up-to-date version.
The trace folder on this repo seems to be an outdated version.
Thanks! Stu
The text was updated successfully, but these errors were encountered: