-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Hermes debugging websocket URL generates as IPv6, causes confusion/incompatibility in some environments #17843
Comments
I believe we could fix this by passing through the host at expo/packages/@expo/cli/src/start/server/metro/instantiateMetro.ts Lines 65 to 69 in 8a782c0
See related and |
Related-ish on Webstorm: https://youtrack.jetbrains.com/issue/WEB-56246 |
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem. |
Summary
Using the Hermes debugger with Flipper is... tough. A number of issues in the Expo, React Native and Flipper projects demonstrate users have difficulty connecting to the Hermes debugger through Metro. (E.g. #15436 (comment), facebook/flipper#2615)
After a bit of sleuthing, it appears to me this could be, in part, due to Expo CLI calling
Metro.runServer()
without explicitly setting thehost
option. This results in theHttpServer
starting in IPv6-capable environments listening on::
, which is then used by the inspector proxy to generate a Websocket URL onws://[::1]
. If you're running Expo/Metro inside of a Dockerized environment, for instance, and don't forward ports on IPv6, this can lead to a very WTF condition when trying to connect the Hermes debugger.What platform(s) does this occur on?
Android, iOS
SDK Version
45
Environment
Reproducible demo
Start a Hermes Expo project. Navigate to
http://localhost:8081
and observewebSocketDebuggerUrl
is IPv6:This requires Metro be accessible over IPv6.
if the IP is set explicitly to IPv4 when constructing the metro server, the URL is then
ws://localhost:8081/...
.The text was updated successfully, but these errors were encountered: