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

Lighthouse audit always return warning 'Missing source maps for large first-party JavaScript' #14967

Open
2 tasks done
danurahadi opened this issue Apr 14, 2023 · 9 comments
Open
2 tasks done
Assignees
Labels

Comments

@danurahadi
Copy link

FAQ

URL

https://sportz.picassorewards.com:8443/login

What happened?

I face an issue of Chrome Lighthouse Audit.

I build a web app that loads Sock JS minified file.

The file is -> https://unpkg.com/sockjs-client@1.5.0/dist/sockjs.min.js

As you can see, there is //# sourceMappingURL at the end of the file.

Also, there is the source map file -> https://unpkg.com/sockjs-client@1.5.0/dist/sockjs.min.js.map

What did you expect?

I think that warning should not appear.

What have you tried?

I have tried to load the SockJS minified file from the CDN and do the Lighthouse Audit several times, but it's still produce the same warning :

Missing source maps for large first-party JavaScript

Environment :

  • Ubuntu 22.04
  • Brave Browser v1.50.114

Am I missing something here or there is a bug in the Lighthouse?

Thank you.

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

10.0.1

Chrome Version

112.0.5615.49

Node Version

No response

OS

Linux Ubuntu 22.04

Relevant log output

No response

@adamraine

This comment was marked as off-topic.

@danurahadi
Copy link
Author

@adamraine I'm not sure about the script you mention because it's generated by Nuxt.js.
And also that error message (screenshot) didn't show up on my local machine.

Maybe you Chrome guys can see the audit results from my local machine below :

lighthouse-audit

Thanks so much for your response.

@adamraine
Copy link
Member

Yeah, looks like the audit is failing because entry.c1164377.js doesn't have a source map, and not because of sockjs.min.js. This file had a different name on my.

@alexnj

This comment was marked as off-topic.

@alexnj
Copy link
Member

alexnj commented Apr 19, 2023

Re: the original issue — it seems like the inclusion of passing source-map entries with a partially failing valid-sourcemaps audit result is the cause for confusion. We could either drop the passed entries, or rearrange them under a sub-headings as Passed / scripts with valid source maps and Failed / scripts without source maps to resolve the ambiguity in the UI. Wdyt @adamraine ?

@adamraine
Copy link
Member

Not sure about using Passed / Failed as headings since we need the sub-headings to display the failed messages. There are definitely a few ways to approach this though:

  • Passed / Failed indicators in a table column
  • Put the passed / failed scripts in entirely separate tables
  • Add a diagnostic message as a sub-item to passed scripts

@danurahadi
Copy link
Author

@adamraine @alexnj thank you all guys, for the response.
btw, what's the meaning of P2 label?

@adamraine
Copy link
Member

It's the issue priority on a 1-3 scale

@danurahadi
Copy link
Author

ah i see. thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants