I am developing a CRNA with Expo on my Windows laptop, and I am running into several major issues.
When I started 2 days ago, I already couldn’t load my app with my Android phone (Honor 8 with Android 7.0), because trying to scan the QR code was always giving me the same error message on my phone (although both my PC and my phone are on the same WiFi network) :
“Something went wrong.
Could not load exp://192.168.55.1:19000. Network response timed out.”
I decided to load it using USB instead, so I activated the USB debugging function on my phone, downloaded ADB version 1.0.31 from this link (https://adb.clockworkmod.com/), and used the
expo start --localhost --android command, as seen in this topic (Run Expo on Android device via USB?), and guess what… It was running perfectly fine !
The app was loading on my phone, it was reloading automatically when I saved some changes in the code, great.
But today (2 days later), I go back on my laptop to continue developing, I plug in my phone, activate USB debugging, etc. and run the exact same command… And now I have this “couldn’t adb reverse” error message in the terminal :
adb devices command still shows that my phone is connected though. On top of that, I have this error message displayed on my phone in the Expo app :
“Something went wrong.
Could not load exp://localhost:19000.”
I have absolutely no idea why the USB mode suddenly stopped working : I don’t remember touching anything within the settings of Expo or on my computer that could have caused the issue in only 2 days.
I tried reinstalling Expo on both my PC and cellphone, reinstalling the ADB driver on my computer, creating a new project to see if it would work… Nothing does the trick, I’m kinda desesperate : I can’t load my app by any means now.
Could you guys please help me find a solution (if not for both the LAN and the USB problem, at least for one of them ) ?
EDIT : The main issue (USB problem) is still there, but I managed to solve the WiFi issue in a few steps.
First, the IP adress that Expo was using to host the app’s server was wrong : it was selecting the first one it found when doing
ipconfig whereas it actually wasn’t the one of my WiFi network. More info about this issue here (github.c om/react-community/create-react-native-app/issues/144).
Then, I changed the visibility of my laptop on the WiFi network from “public” to “private”.
Finally, I opened the 19000, 19001, 19002 ports within the firewall’s rules. More info about this here (stackoverflow.c om/a/44600431/1443984).
Now I can open my app in my phone using Expo via QR code.