question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Messaging for missing source maps

See original GitHub issue

Part of #10369

We want to encourage users to make source maps available by enticing them with what’s possible in the report. There are a few approaches to consider:

  1. top-level warning

Too prominent. Listing to rule it out.

  1. audit-level warnings

For audits that require maps to do anything useful (ex: bundle duplication), the audit should have a warning. This should expand the audit my default and list it right after the Failing audits but before the Passed audits. The audit can’t be marked N/A (otherwise it wouldn’t be in the warning clump). Should it be marked as passing?

For audits that don’t require maps but are improved by them, a warning is almost what we want but may come off as too loud. What if we added a “notice”, like warning but they don’t get added to their own clump like warnings do?

  1. there isn’t a third option, maybe suggest one?

i started listing things but ran out of things at 2 …

  1. missing-source-map audit

Oh, I remembered another.

@paulirish suggested an audit that fails if a first party JS file is >x KB (resource size) and doesn’t have a map. x = 500 KB? Over time we may reduce this threshold.

Alternatively this could be added to the still-WIP valid-source-maps audit. The plan was to just make it informative (ex: maps are found but mappings seem invalid, not a huge deal but would make code mappings inaccurate), but it could also fail based on the above criteria.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
brendankennycommented, Dec 23, 2020

I think it’s a separate audit but if LH is going to warn on missing source maps it should also have an audit for inline source maps as there’s some very large ones being shipped to production - 1.7MB is the largest I’ve found so far

that should be flagged by unminified-javascript and (I believe) unused-javascript, though they won’t tell you what’s causing it (just that the script has a ton of extra bytes it probably doesn’t need). Probably a good special case to include in the report that’s relatively easy to check and would help quite a bit when trying to fix those opportunities.

0reactions
patrickhulcecommented, Jul 27, 2021

We’re moving this down to P1.5 @connorjclark given the last progress update was more than 6 months ago. If you feel differently, please feel free to move it back 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Message mapping with missing source elements
Hello Having PI message mapping not as a daily task, it is often quite cumbersome for me to find a working solution in...
Read more >
1437937 - WebExtensions Doesn't Find Source Maps
Look at the Deugger source when I've locked the popup open. Actual results: The console shows a network error stating that the source...
Read more >
Sourcemaps not appearing in Browser UI
One of the source maps files you've uploaded, so we can review it and see if there may be something missing that's causing...
Read more >
Error message "DevTools failed to load SourceMap: Could not ...
That's because Chrome added support for source maps. Go to the developer tools (F12 in the browser), then select the three dots in...
Read more >
Source Map Troubleshooting - Rollbar Docs
Rollbar applies source maps to exceptions from minified Javascript so you can view the ... Sometimes source maps can be generated with no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found