-
Notifications
You must be signed in to change notification settings - Fork 49
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
Console shows many "DevTools failed to load source map" warnings #78
Comments
Thanks so much Florens for filing this. I'll get this on our team's radar. |
+1 on this - it's quite noisy and gets a bit concerning when trying to debug other issues |
Totally understand the frustration. It seems like the "Group similar messages in console" should work on these messages too. |
I just tested https://stackblitz.com/edit/nextjs today, to see if I could find an existing console setting that would help, and realized that Edge and Chrome didn't behave the same: As you can see in Edge, no source map warnings appear at all. I checked that both browsers had the same default levels set, and the same console settings. But, I did find something that can help you in Chrome:
This should only show your messages and hide the 200+ source map warnings. |
Thanks for looking into this @captainbrosset. I’ll have to try the Chrome "user messages" filter and maybe find a way to add that to our own docs. |
@fvsch did you have a chance to try the user messages filter? Does it meet your needs? |
@captainbrosset I confirm that the "User messages" filter is a good workaround. We might recommend it in our user documentation. |
Thanks a lot for getting back to us on this. Closing now. |
Correction: it's not a good workaround. I just spent a bunch of time missing errors logged in the console because I had selected the "User messages" filter, which only shows I can't offer this solution to our users, as it will make them miss important message (coming from their own code or from tooling that compiles their code). Too much of a footgun. |
Hmm, no that's not exactly it. The “User messages” filter does show So in my case I had a document that didn’t render anything, and seemed to have no blocking error when using the “User messages” filter: But the blocking error was a JS TypeError, not appearing in “User messages”: And for context, I was trying to use the “User messages” filter to silence these 1180 warnings from DevTools about inaccessible sourcemaps: The next best option I found is using I guess ideally I would need DevTools to either categorize those source maps warnings as “Verbose”, or group them in a collapsible group, or both. |
Thanks for the added details Florens. I re-opened this issue. It's on the backlog of our DevTools team. |
It looks like Chrome 117 is moving those source map loading warnings outside of the Console and into a dedicated panel: |
This is an upstream Chrome DevTools issue (and Firefox DevTools has a similar one too), but opening it here at the invitation of Chris (https://twitter.com/codepo8/status/1542844440078860289).
Browsers may download JS or CSS code which have a source map URL, but that URL may not be reachable for a number of reasons:
.map
files filtered out in the deployment process, filtered out by servers, etc. And while technically it’s a flaw in the website, those often don’t get fixed because they don’t impact the vast majority of end users.On https://stackblitz.com (e.g. at https://stackblitz.com/edit/nextjs) it can be especially egregious because we run Node.js code and packages in the browser, including processes that create development web servers that may serve hundreds of scripts. For complex reasons serving source maps with those servers doesn't work on stackblitz.com currently. So we end up with hundreds of warnings generated by DevTools that make it impossible to see more relevant logs, warnings and errors. The following screenshot has 209 warnings about source maps:
What's more, it doesn't respect any of those two options:
Any intervention in DevTools that reduces this noise — especially in a HTTP/2+ world with potentially many resources and many source maps — would be appreciated.
AB#40274880
The text was updated successfully, but these errors were encountered: