metro
metro copied to clipboard
fix: handle http scenario for pathToSource in _processDebuggerGetScri…
fix #832
Summary
Test plan
@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Hey @wood1986, thanks for the PR! Unfortunately I don't think this is the right solution - the client should perform this fetch, not the inspector proxy (which is part of the server). This only works based on assumptions on external conditions, e.g. that http://localhost:8081
on the client device happens to be forwarded to port 8081 on the server.
I deleted my previous comment because it was wrong.
Hey @motiz88
I have just realized Debugger.getScriptSource
is a standard Chrome DevTool protocol.
Flipper < - > Chrome DevTool < - > metro
Chrome DevTool is just an iframe inside Flipper. Flipper initializes Chrome DevTool. After that, Flipper does not have a role. Chrome DevTool will directly deal with Metro via ws and it does not hit metro middleware
How to tell flipper to hit http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.rn0682&modulesOnly=false&runModule=true&cachePrevention=1
directly?
Just ping again in case you forget after the weekend
Any update??
Hey @motiz88, could you please follow up this PR and my latest reply? Thanks
This seems to be fixed from v0.73.0.
https://github.com/facebook/metro/commit/db19b06bdd6d2fbbe109e4f3be4b3af3489c1f1c