Skip to content
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

[BUG] Trace viewer TypeError on Firefox #20259

Closed
davidnuzik opened this issue Jan 20, 2023 · 8 comments · Fixed by #21080
Closed

[BUG] Trace viewer TypeError on Firefox #20259

davidnuzik opened this issue Jan 20, 2023 · 8 comments · Fixed by #21080

Comments

@davidnuzik
Copy link

Context:

envinfo output

System:

  • OS: macOS 13.1
  • Memory: 29.52 MB / 16.00 GB

Binaries:

  • Node: 19.4.0 - /opt/homebrew/bin/node
  • npm: 9.2.0 - /opt/homebrew/bin/npm

Languages:

  • Bash: 3.2.57 - /bin/bash

Code Snippet
(Not applicable)

Describe the bug
I noticed recently after upgrading to 1.29.2 that when I attempt to view traces in Firefox on Mac there is an error in the browser dev console like as follows. If I use Chrome, then the trace viewer renders without any issues. Please forgive me, I do not recall the version I was updating from but it wasn't that old. Probably 1.28.x

image

And here is text of the above message:

Uncaught (in promise) TypeError: navigator.serviceWorker is undefined
    <anonymous> http://localhost:9323/trace/index.74859fca.js:66
    <anonymous> http://localhost:9323/trace/index.74859fca.js:66
index.74859fca.js:66:58445

Thank you for your time and consideration of this issue.

@mxschmitt
Copy link
Member

I can't repro with Firefox 109 on Windows.

Do you open the Trace with npx playwright show-report and then you click on a test's trace file?

@davidnuzik
Copy link
Author

Yes, I ran npx playwright show-report and then clicked on a test's trace file. Upon doing this the viewer for traces runs into this error and won't render the page as expected.

Interesting that you cannot reproduce on Windows; not impossible that the issue is environmental on my end. I unfortunately do not have another box to test with.

@mxschmitt
Copy link
Member

Is your machine managed with some enterprise policies or intune'd?

@davidnuzik
Copy link
Author

Yes, it is (with Rippling).
You are thinking it's plausible it could be the cause? If so I can reach out and see what they think. They probably have logs for anything that could be blocked, etc. I think it unlikely but not impossible.

@dgozman
Copy link
Contributor

dgozman commented Jan 24, 2023

I can repro with npx playwright show-trace --browser=firefox trace.zip.

@aslushnikov
Copy link
Collaborator

@dgozman I failed to repro on either Playwright 1.29.2, 1.30.0 or canary. How do you repro this?

@yury-s yury-s added v1.32 and removed v1.31 labels Feb 3, 2023
@m-aouainia
Copy link

For me is reproducible with playwight version 9.3.1 node v18.14.0

@mpspahr
Copy link

mpspahr commented Feb 21, 2023

I'm able to produce this error when defining a host other than 127.0.0.1/localhost to serve the report.

npx playwright show-report --host=<IP/Hostname>

Replace <IP/Hostname> with your alternative host.

I see the problem in Chrome, Firefox, and Safari back to v1.27 when the host and port options were first added to the html reporter.

aslushnikov pushed a commit that referenced this issue Feb 21, 2023
Not sure whats actually going on here, turns out this breaks the trace
viewer on firefox. -> all the iframes won't work.

Can't repro on stock firefox, so seems like something fishy on our end.

References #20259
aslushnikov added a commit that referenced this issue Feb 22, 2023
Fixes #20259

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants