So today I made a new project using create-react-native-app. I am still a student so my network on school is completely sealed, so when I develop on school I always develop on my own hotspot. I never had issues whatsoever, until now.
Problem:
When creating a new project the project won’t load.
NOTE!: Old projects before SDK 28.0.0 load perfectly fine on the hotspot.
There is one strange occurrence tho. The new project loads perfectly fine on my own home network, but not on my hotspot. Since all old projects actually work on my hotspot, it seems to me that the issue is not within my hotspot.
I hope that someone may be able to help!
Side information (If you need more information, feel free to ask me for it):
Testing device: iPhone 7 / Oneplus two / Huawei P2 Lite
iOS version: 12 (Beta)
Lowest Android version: 5.0.0
Hotspot device: iPhone 7
SDK version that causes problems: 28.0.0
create-react-native-app (CRNA) uses LAN and it’s conceivable for a variety of reasons that your computer isn’t reachable from your phone over the network.
To install expo-cli run npm i -g expo-cli and then you can run expo start in the same project directory, or create a new project with expo init ProjectName. With this you can use tunnel connection. It’ll be slower but it will work. I recommend using a simulator if possible or using another network where your phone can reach your computer.
I did this and I find it better working for me than CRNA. But I have a small problem.
My hotspot works with my phone now, its quite fast. But when my friend runs expo start on his PC within the same network (my hotspot), the project won’t load on his phone. When he scan’s my QR code of the exact same project on my computer the project starts perfectly fine on his part.
Any idea why it is not working on his PC? @notbrent
He’s on windows but no, my network is saved in his machine as a Private network. We even disabled all windows firewalls. The result stays the same. Any other ideas? Thanks for your help so far! @jakubste
I looked at it and mine starts with 172… and his starts with 192… so I think that is really strange. It really looks like his Windows machine is doing something wrong. I use Ubuntu 18.04 so I’m unable to get his project in the exact same environment as me.
Do you know why we are both getting completely different addresses? Ports are different as well. @jakubste