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

expo start --dev-client binds to ipv6 while internal distribution with dev-client connects only via ipv4 #29094

Open
flowpl opened this issue May 24, 2024 · 0 comments
Labels
CLI Versioned Expo CLI -- `npx expo start`

Comments

@flowpl
Copy link

flowpl commented May 24, 2024

Summary

This is on Ubuntu 22.04 with node versions 16, 18 or 20.
Apparently when you start a webserver and don't explicitly provide a host, node favors binding to ipv6. Sometimes it binds to both ipv4 and ipv6 but at least today it only bound to ipv6. I have no idea how to control that behavior.

Since an internal distribution with dev-client only connects via ipv4 and also the expo-development-client URLs only contain an ipv4, this is very difficult to work with.

So a simple solution could be to explicitly set the host config somewhere here, I believe:

watch: !isExporting && isWatchEnabled(),

I just added host: "0.0.0.0" after the watch: config and it consistently bound to ipv4.

What platform(s) does this occur on?

No response

SDK Version

51

Environment

expo-env-info 1.2.0 environment info:
System:
OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
Yarn: 3.6.1 - ~/.nvm/versions/node/v16.14.0/bin/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
IDEs:
Android Studio: AI-222.4459.24.2221.10121639
npmPackages:
@expo/webpack-config: ^19.0.1 => 19.0.1
expo: ~51.0.5 => 51.0.8
expo-router: ~3.5.12 => 3.5.14
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
react-native-web: ~0.19.6 => 0.19.11
npmGlobalPackages:
eas-cli: 9.0.5
Expo Workflow: managed

Minimal reproducible example

https://github.com/expo/examples

You can probably use any expo repo really.
This also happens with a fresh expo project with only running npx create-expo-app followed by npm install expo-dev-client.

@flowpl flowpl added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels May 24, 2024
@expo-bot expo-bot removed the needs validation Issue needs to be validated label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Versioned Expo CLI -- `npx expo start`
Projects
None yet
Development

No branches or pull requests

2 participants