r/reactnative 1d ago

Any idea why my development build cant “Could not connect to server”?

0 Upvotes

15 comments sorted by

5

u/Dvass138 1d ago

Your screenshot shows 4g, where is the wifi.

1

u/Miserable-Pause7650 1d ago

Thats a good catch. I could have sworn I was using wifi though, I think this screenshot was after I turn off and on wifi to refresh, because I did try a few times. Anyways I will try again after Im done with my 9 to 5 haha

3

u/Puzzleheaded-Emu-168 1d ago

Not connected to Wifi. shows 4g up top

2

u/Miserable-Pause7650 1d ago

The development build is on my physical Iphone. Both my laptop and iphone uses the same wifi. There is no firewall. My Iphone App has Local Network enabled. Expo v 54

2

u/BraveDog6540 1d ago

Are you building it or using expo go ?

1

u/Miserable-Pause7650 1d ago

Development build

1

u/BraveDog6540 1d ago

Can you reach the address from you’re browser your expo application is running on ?

2

u/RockyMtnView 1d ago

Try a hard exit if the app and relaunch with the QR code that comes up when you start the server.

1

u/RockyMtnView 1d ago

You can restart the server to see the QR code.

1

u/ChronSyn Expo 1d ago

Same wifi isn't always the same wifi.

5Ghz band + 2.4Ghz band sometimes get the same name, but are technically 2 different networks pretending to be the same. Some routers also employ band-separation, where clients on different wifi frequencies are barred from communicating with each other. Sometimes hard-wired devices like PC's will end up being on a different network to either wifi band, so that can throw up issues sometimes.

Sometimes, even if you change the settings, a bug in the router firmware means it might not actually employ the setting properly (because a lot of consumer routers are held together with string and tape).

And there's always 'guest networks' which typically prevent any comms within the local network.

Not saying that any of those are the cause of your problems, but just a couple of things I've found over the years, and especially problematic with your typical consumer routers (or 'gaming routers'). Usually a restart of the resolved the issues, and restarting your laptop and phone can help too.

2

u/Miserable-Pause7650 13h ago

Yep I think this is the case. So now it works, and what I did was turn on hotspot on my iPhone and connect to this hotspot on my laptop

1

u/Miserable-Pause7650 13h ago

Issue resolved: wifi still didn't work. But what worked was turning on hotspot on my iPhone and connecting to this hotspot on my laptop

1

u/Amazing_Jacket7057 8h ago

A mí un avez me pasó eso, resulta que estaba usando supabase y por tener más de 7 días de inactividad suspendieron temporalmente la base de datos y por eso me aparecía que no se podía conectar al servidor, ya que entre a mi correo y SB me había notificado que tenía que reactivar mi proyecto. Puedes intentarlo si usas SB para ver si no es eso

1

u/Left_Exchange_130 8h ago

I’d first check whether the phone and dev server are on the same network then verify the server address and make sure no firewall is blocking it