You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Expo测试Android应用时遇SocketTimeOutException问题求助

Troubleshooting Expo SocketTimeoutException on Android

Hey there, let's work through this Expo connection issue together—socket timeouts can be tricky, but we've got a few more angles to check:

  • Double-check Wi-Fi alignment: Make sure your Android phone and computer are connected to the exact same Wi-Fi network (same SSID, same frequency band—2.4GHz vs 5GHz can block cross-communication even on the same router). It's an easy oversight but super common.

  • Manually specify your computer's IP for Expo: Sometimes Expo auto-detects the wrong local IP. First, find your computer's local LAN IP:

    • Windows: Run ipconfig in Command Prompt, look for "IPv4 Address" under your active Wi-Fi/Ethernet adapter.
    • Mac/Linux: Run ifconfig or ip addr in Terminal, find the inet address for your connected network.
      Then start Expo with this IP: expo start --host [your-local-ip] (replace the bracket part with your actual IP), then scan the new QR code.
  • Verify full firewall access for port 19000: You mentioned opening the firewall, but make sure both inbound and outbound rules allow traffic on port 19000. Also, some third-party antivirus tools (like McAfee, 360 Security) have their own firewalls that might override system settings—try temporarily disabling them to test.

  • Switch to Expo Tunnel Mode: If LAN connections keep failing, tunnel mode routes traffic through Expo's cloud servers, bypassing local network issues. Start your project with expo start --tunnel and scan the generated QR code—this should work even if there are LAN configuration problems.

  • Disable extra network adapters: Beyond VirtualBox, other virtual adapters (like VPN, Docker, or Hyper-V) can mess with Expo's IP detection. Go to your computer's network settings and disable all adapters except the one you're using for Wi-Fi/Ethernet, then restart Expo.

  • Reset your Expo session: Close the Expo server in your terminal, force-quit the Expo Go app on your Android phone, then restart both and try scanning again. Temporary glitches often clear up with a fresh start.

内容的提问来源于stack exchange,提问作者Jan D.M.

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 07:14:56