Skip to content

Forward getScriptSource with no fetchable URL (#58625) - #58625

Open
vzaidman wants to merge 1 commit into
mainfrom
export-D121001393
Open

vzaidman wants to merge 1 commit into
mainfrom
export-D121001393

Conversation

@vzaidman

@vzaidman vzaidman commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Summary:

The proxy intercepted every Debugger.getScriptSource request and tried to fetch the URL it had recorded for the script, failing closed on an empty or non-HTTP one. Scripts compiled from debug client expressions (e.g. code typed into the DevTools console) report an empty url, so requesting their source failed even once the target can serve it.

The proxy now forwards the request to the target when it has no HTTP(S) URL of its own to fetch, and relays the target's response back. Proxy-side serving is unchanged: with a fetchable URL the proxy still answers itself, and it still never reads local files.

Changelog:
[GENERAL] [FIXED] - Fix "Unable to fetch script source" when debugging code evaluated in the DevTools console

Differential Revision: D121001393

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 21, 2026
@meta-codesync

meta-codesync Bot commented Sep 21, 2026

Copy link
Copy Markdown

@vzaidman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D121001393.

@meta-codesync meta-codesync Bot changed the title Forward getScriptSource with no fetchable URL Forward getScriptSource with no fetchable URL (#58625) Sep 22, 2026
meta-codesync Bot pushed a commit that referenced this pull request Sep 22, 2026
Summary:

The proxy intercepted every `Debugger.getScriptSource` request and tried to fetch the URL it had recorded for the script, failing closed on an empty or non-HTTP one. Scripts compiled from debug client expressions (e.g. code typed into the DevTools console) report an empty `url`, so requesting their source failed even once the target can serve it.

The proxy now forwards the request to the target when it has no HTTP(S) URL of its own to fetch, and relays the target's response back. Proxy-side serving is unchanged: with a fetchable URL the proxy still answers itself, and it still never reads local files.

Changelog:
[GENERAL] [FIXED] - Fix "Unable to fetch script source" when debugging code evaluated in the DevTools console

Differential Revision: D121001393
Summary:
Pull Request resolved: #58625

The proxy intercepted every `Debugger.getScriptSource` request and tried to fetch the URL it had recorded for the script, failing closed on an empty or non-HTTP one. Scripts compiled from debug client expressions (e.g. code typed into the DevTools console) report an empty `url`, so requesting their source failed even once the target can serve it.

The proxy now forwards the request to the target when it has no HTTP(S) URL of its own to fetch, and relays the target's response back. Proxy-side serving is unchanged: with a fetchable URL the proxy still answers itself, and it still never reads local files.

Changelog:
[GENERAL] [FIXED] - Fix "Unable to fetch script source" when debugging code evaluated in the DevTools console

Differential Revision: D121001393

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant