Cole Perry
Cole Perry

Reputation: 160

ExpoCLI- IOS Could Not Connect to Server

I have been working on a react native project in Windows 10 for a while now using Expo to scan the given QR code and test the app on my IOS device. The other day I ran $expo start and everything seemed to go fine until I tried to load the app on my IOS device. I received this message: Could not connect to server

I then "Run in Web Browser" which worked fine, so I tried accessing 127.0.0.1:19000 in my Iphone's browser (firefox) and it as well could not connect to server. My phone is connected via wifi which is 2.4 or 5g. I wasn't sure how this would effect this so I used a wifi adapter on PC to match which wifi connection phone and PC were on and that didn't help.

I am using react version 17.0.1, expo version 3.28.5, and "react-native": "https://github.com/expo/react-native/archive/sdk-38.0.0.tar.gz"

I have tried:

  1. Turning off windows firewall
  2. Using different Iphones to connect
  3. npm install --global expo-cli
  4. Changing Connection from "LAN" to "Local"
  5. Reinstalling Node
  6. Creating a System Variable called: "REACT_NATIVE_PACKAGER_HOSTNAME" with the value "192.168.2.108". This did change the LAN IP address as intended but it did not resolve the problem. I just got the same message with the new IP address.

This problem just started happening out of the blue and I'm not really sure what to do next. If you need any additional information I'd be happy to give it.

Upvotes: 2

Views: 2852

Answers (2)

enahpets enahpets
enahpets enahpets

Reputation: 1

When you get the message:

"Error loading DevTools ValidationError: "urlType" must be one of [exp, http, redirect, no-protocol]"

Just wait for a bit and the QR code for tunnel will appear. It does the same for me as well.

Upvotes: 0

krimo
krimo

Reputation: 684

try to use

expo start --tunnel

Upvotes: 3

Related Questions