create-react-native-app icon indicating copy to clipboard operation
create-react-native-app copied to clipboard

Network Response Time Out Error

Open aayanqazi opened this issue 9 years ago • 76 comments

Uncaught Error: Java.net,sockettimeoutException: failed to connect to after 10000ms in android after scan QR code

aayanqazi avatar Apr 01 '17 15:04 aayanqazi

Hi! Without the information from the new issue template it's very difficult to help you debug this. In general, you want to make sure that you can reach the development server from your phone. If you take the URL that CRNA prints at startup, and replace exp:// with http://, you should be able to reach that in your phone's browser and see some JSON. If you can see that JSON, but scanning the QR code doesn't work, please open a new issue and complete all of the required sections of the new issue template.

anp avatar Apr 03 '17 18:04 anp

same issue whatsapp image 2017-04-24 at 13 14 44

yash2code avatar Apr 24 '17 07:04 yash2code

@yash2code first check your ip address of your pc .... write ipconfig on cmd ... and then write set REACT_NATIVE_PACKAGER_HOSTNAME='my-custom-ip-address-or-hostname' then start your project again ...

aayanqazi avatar Apr 24 '17 10:04 aayanqazi

@aayanqazi

Ethernet adapter VirtualBox Host-Only Network #2: IPv4 Address. . . . . . . . . . . : 192.168.56.1

Now, what to write in place of 'my-custom-ip-address-or-hostname'

yash2code avatar Apr 24 '17 10:04 yash2code

@yash2code Your ipv4 address that found in your ipconfig

aayanqazi avatar Apr 24 '17 11:04 aayanqazi

@aayanqazi tried that but didnt worked :(

yash2code avatar Apr 24 '17 14:04 yash2code

@dikaiosune please re open this issue

yash2code avatar Apr 24 '17 16:04 yash2code

Review this https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#networking @yash2code

steadycoding avatar Apr 24 '17 19:04 steadycoding

@yash2code can u send screenshot of ipconfig command ?

aayanqazi avatar Apr 24 '17 20:04 aayanqazi

@steadycoding url timeout in phone's chrome browser but works in desktop chrome browser. Using hotspot as said.

yash2code avatar Apr 25 '17 03:04 yash2code

@aayanqazi my screenshots of ipconfig

capture capture1

yash2code avatar Apr 25 '17 03:04 yash2code

Use Wireless LAN Adapter WI-FI Ipv4 Address 192.168.43.244 @yash2code

aayanqazi avatar Apr 25 '17 09:04 aayanqazi

@aayanqazi when I goto exp://192.168.43.244 , it starts fetching js bindle but app doesnt opens and restarts my phone giving error this.stream.clearLine() is not a function , Also , on scanning qr code gives same error: Network response time out error

yash2code avatar Apr 25 '17 10:04 yash2code

@dikaiosune I think issue needs to re open .

yash2code avatar Apr 25 '17 16:04 yash2code

i am getting the same issue as @yash2code Have done all the steps which you mentioned but still the problem persists. My PC and phone are both connected to wifi. In browser , if i hit the ip address i am getting the json but in phone its giving timeout error. Here is the screenshot of the ipconfig ipconfig

Jitender-Rathore avatar May 28 '17 13:05 Jitender-Rathore

@Jitender-Rathore send the full screenshot of ipconfig

yash2code avatar May 29 '17 04:05 yash2code

the sccreenshot which i upload is a full one . I also tried with hotspot .This time i was getting the json when i enter the ip address in mobile browser and desktop but expo was showing the same error

Jitender-Rathore avatar May 29 '17 17:05 Jitender-Rathore

from my screenshot ........i used this 192.168.43.244 and it worked

yash2code avatar May 29 '17 17:05 yash2code

how to fix ? I got the same problem

phamios avatar Jun 10 '17 12:06 phamios

@phamios show the output of ipconfig

yash2code avatar Jun 10 '17 16:06 yash2code