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.

Improve generalized/sourcemap fetcher

See original GitHub issue

https://github.com/GoogleChrome/lighthouse/pull/9459 landed our generalized fetcher (with an iframe).

We may have some areas where it can be improved.

CSP sensitivity… I didn’t test, but I believe a frame-src directive would introduce problems for this technique.

content-type sensitivity. In #12064 we see that if a map is served with application/octet-stream it’ll trigger a user-visible download while Lighthouse is fetching it. DevTools, meanwhile, doesn’t have that behavior when it fetches.

devtools generalized loading…

There’s been some updates…

Sigurd added the Network.loadNetworkResource protocol method for sourcemaps. He recently added metrics to record how various load attempts succeed/fail.

AFAICT, there are currently four different types of fetch attempts… you can see them in PageResourceLoader.js’s _dispatchLoad() in the devtools source.

Here’s the umbrella crbug.

You can also see some of this in the new “Developer Resources” drawer panel in devtools:

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
connorjclarkcommented, Jan 11, 2022

We’re using the new protocol method to fetch resources now, but we need to keep the old one around for LR: #13006

Let’s track in #13394 – next month we should be able to drop the iframe fetcher completely.

0reactions
paulirishcommented, Mar 31, 2021

content-type sensitivity. In #12064 we see that if a map is served with application/octet-stream

https://proxx.app/ also reproduces this behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SourceMap - HTTP - MDN Web Docs
The SourceMap HTTP response header links generated code to a source map, enabling the browser to reconstruct the original source and present ...
Read more >
RUM source map API | Kibana Guide [8.5] - Elastic
A source map allows minified files to be mapped back to original source code — allowing you to maintain the speed advantage of...
Read more >
DevTools failed to load SourceMap for webpack ...
The source map you are trying to load is in node_modules and not part of webpack bundle. "If not extracted and processed into...
Read more >
Produce a sourcemap for aggregated JS [#3227125] - Drupal
Problem/Motivation When JS files are bundled it's very hard to debug and see where things are, set breakpoints, etc.
Read more >
Enable source-map on production? - Medium
Have you encountered a situation where you wanted your client-side JS code readable and debuggable without removing the bundling, ...
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