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

feat: use the browser networks stack as fallback when direct load fails #1772

Merged
merged 3 commits into from
Aug 3, 2023

Conversation

connor4312
Copy link
Member

Chrome recently(ish) added a Network.loadNetworkResource request which
allows us to ask the browser to load a resource, and get the response.
Instead of our previous hacky method of asking and then applying cookies
manually, which only worked for some scenarios, use this method as a
fallback if manually requesting the resource fails.

Do some rearranging since previously the SourceMapFactory was global
which prevented it from using session-specific data.

Fixes #1766
Fixes #425 (3 years later!)

Chrome recently(ish) added a `Network.loadNetworkResource` request which
allows us to ask the browser to load a resource, and get the response.
Instead of our previous hacky method of asking and then applying cookies
manually, which only worked for some scenarios, use this method as a
fallback if manually requesting the resource fails.

Do some rearranging since previously the SourceMapFactory was global
which prevented it from using session-specific data.

Fixes #1766
Fixes #425 (3 years later!)
@connor4312
Copy link
Member Author

No new unit tests here since the cookie scenario, which this implements in a better way, already has tests.

@rzhao271 rzhao271 added this to the August 2023 milestone Aug 2, 2023
@connor4312 connor4312 merged commit cda0db7 into main Aug 3, 2023
10 checks passed
@connor4312 connor4312 deleted the connor412/browser-network-stack branch August 3, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debugger not stopping at breakpoints Source-maps should work on pages with authentication
2 participants