Closed aayanqazi closed 7 years ago
I'm developing on a Centos 7 VirtualBox machine. CyrisXD's advice was the final piece I needed. Other than that, if you're developing on VirtualBox, I suggest disabling the host ethernet connection and setting up the USB filter on your guest (VM) to "add the USB filter with all fields set to the values of the selected USB device..." for the phone/tablet and maybe also for the Wifi card on your host machine. My network is a bridged adapter to the Wifi Adapter on the host.
Looks like any type of Connection affects to Packager server, so just disable un-used connections and everything works.
(without custom ip REACT_NATIVE_PACKAGER_HOSTNAME)
changing the network to private in windows 10 works for me. thanks @sumethy @AurelGit
Uninstalling any virtual machine program solved the problem for me. Seems like it was using the IPV4 from the virtual machine and not from the Lan adapter.
I only got it following @mkmpvtltd1 stackoverflow link steps. But before, I did all people said in this issue too Lol. So if you're facing this problem, do all them :)
If you have used create-react-native-app to setup your project, I solved this issue by setting the hostname in the package.json file with in the project.
"android": "set REACT_NATIVE_PACKAGER_HOSTNAME={your wifi ip address} && react-native-scripts android",
I'm running the app in windows 10.
@AurelGit Thanks man. Windows 10 users, just go straight towards this guy's solution. Works perfectly!
I have the same problem today on Win 10 and fix using @CyrisXD instructions.. Thanks!
Thanks @AurelGit ! It works for Windows 10!
I faced same issue, and found that is was due to firewall. My network was public and in firewall setting Node.js is only allowed to private network. Allowing it for public solve my problem.
For me, none of the above worked, but the following worked perfectly: access your router settings and disable the "AP Isolation" property. Connect your devices again to the wireless and then the router will let connected devices communicate with each other.
For me, it was a firewall problem. I was developing in WSL and the ports were being blocked by windows firewall. I simply added a new rule to my firewall that allowed all ports from within WSL and everything worked fine afterwards.
I think this happened because react native use wrong ip... so when expo try to connect... it failed
this happened to me because I have virtual ethernet (Because VBox)...I solved the problem by following Muhammad Hannan's solution from https://stackoverflow.com/questions/47966887/expo-lan-configuration-doesnt-work-for-new-reactnative-project
I did all the above steps still the error i am getting.
System : windows 10 Home Phone : one plus 6
Any other checks i need to do ?
Only problem is that you are not using "same local internet connection on your mobile and PC" I have been facing the same problem but after a lot effort i figure it out
I did all the above steps still the error i am getting.
System : windows 10 Home Phone : one plus 6
Any other checks i need to do ?
https://github.com/react-community/create-react-native-app/issues/144#issuecomment-424768154
@yash2code first check your ip address of your pc .... write
ipconfig
on cmd ... and then writeset REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname'
then start your project again ...
Still not working for me
I just can't fathom how ridiculous it is to pick a non-standard web port, and then expect people to manually open their firewall ports. Why not use ports in the normal range 3000 or 8000?
I can't change the firewall rules on my laptop due to Admin restrictions...
After some reading through the source seems it is possible with a .exprc file containing:
{
"manifestPort": 8000
}
None of the above suggestions and solutions worked for me.
Don't forget to use Wifi on your smartphone as well!!! glad to help whoever you are ^_^ btw thanks for all the guys above! :)
And where to write it? cmd/terminal? I am using ubuntu, I am not sure if its doing anything, is there way to check if the command worked (other than testing the expo which is not working for me as well).
L have the same problem. To resolve it, l add a new rule in my firewall for the port with the following commands:
sudo ufw allow 19000/tcp
sudo ufw disable
sudo ufw enable
Now run npm start
and it must work with no problem.https://stackoverflow.com/a/68881495/15562150
maybe my post will help you it's pretty obvious but i find many people who forget about that
4 days for me... It was weird because the web version of my react-native build on localhost was working, but expo could not connect. Allow an app through windows firewall -> make sure both Node.js items have access.
It's obvious whoever designed this obviously has coding skills, but not how to fix issues as they occur. With so many people having this same issue, you would think they would figure out that maybe they need to fix the connection issues. Expo is a great concept, but unfortunately the developers are in over their head. Back to regular ReactNative CLI for me!
Uncaught Error: Java.net,sockettimeoutException: failed to connect to after 10000ms in android after scan QR code