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

could not load exp://ipaddres+port

Open antonis80 opened this issue 9 years ago • 121 comments

I am trying to "npm run android" but on the genymotion emulator i get the above error. Any suggestions please

antonis80 avatar Mar 17 '17 08:03 antonis80

Have same problem. It seams that react-native-scripts are running the local server using the first network adapter, in my case ethernet, and i'm running on WiFi.

Any ideas how to change the default network adapter or change the server address?

lukaszszymanski avatar Mar 17 '17 13:03 lukaszszymanski

same here also, i am running on wifi

antonis80 avatar Mar 17 '17 17:03 antonis80

Also please check the image for the issue i am facing:

error

antonis80 avatar Mar 17 '17 17:03 antonis80

@antonis80 are you able to reach http://192.168.0.12:19000 in a web browser on your computer when CRNA is started?

anp avatar Mar 17 '17 18:03 anp

@dikaiosune thank you for the response. i have tried it as you said and i get the following in the browser:

{"sdkVersion":"14.0.0","name":"logeo","slug":"logeo","version":"0.1.0","xde":true,"developer":{"tool":"crna"},"packagerOpts":{"hostType":"tunnel","lanType":"ip","dev":true,"strict":false,"minify":false,"urlType":"exp","urlRandomness":null},"bundleUrl":"http://192.168.0.12:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles","debuggerHost":"192.168.0.12:19001","mainModuleName":"./node_modules/react-native-scripts/build/bin/crna-entry","logUrl":"http://192.168.0.12:19000/logs","id":"@anonymous/logeo-1329440f-f35b-490d-b685-91733bb68359"}

antonis80 avatar Mar 18 '17 07:03 antonis80

almost same for me. the genymotion android emulator connects but I cannot connect from my android phone (wrong network). from: http://192.168.56.1:19000

{"sdkVersion":"14.0.0","name":"testcrna","slug":"testcrna","version":"0.1.0","xde":true,"developer":{"tool":"crna"},"packagerOpts":{"hostType":"tunnel","lanType":"ip","dev":true,"strict":false,"minify":false,"urlType":"exp","urlRandomness":null},"bundleUrl":"http://192.168.56.1:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles","debuggerHost":"192.168.56.1:19001","mainModuleName":"./node_modules/react-native-scripts/build/bin/crna-entry","logUrl":"http://192.168.56.1:19000/logs","id":"@anonymous/testcrna-87e2ef63-2232-4d0b-889f-9355e587086e"}

dansha avatar Mar 18 '17 17:03 dansha

@antonis80 @dansha are you both able to get the same result when using your phone's browser?

anp avatar Mar 18 '17 20:03 anp

cant access that ip from phone. both ny PC and the phone are connected to my WIFI but crna is answering a diffrent IP address and not the IP address from the WIFI netwrok. is there a way to conrtol in what IP the CRNA answers? here is the result of ipconfig on my machine:

Windows IP Configuration


Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::ad02:43d2:a9bb:b8ad%7
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network #2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::686b:dba8:1317:ca1e%8
   IPv4 Address. . . . . . . . . . . : 192.168.126.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : Home
   Link-local IPv6 Address . . . . . : fe80::850e:77f:81fb:57be%9
   IPv4 Address. . . . . . . . . . . : 10.0.0.7
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.0.138

Tunnel adapter isatap.Home:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : Home

Tunnel adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{4B394AD1-1A83-4657-B6A3-F2066B2CF54F}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Tunnel adapter isatap.{41F61778-411B-476B-82B4-6627C9DAD761}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

dansha avatar Mar 18 '17 21:03 dansha

@dansha I think you should look at https://github.com/react-community/create-react-native-app/issues/60#issuecomment-287081523 for information about how to change the order in which IP addresses appear in ipconfig.

@antonis80 I'll mark this as awaiting-reply until I hear about your network connectivity.

anp avatar Mar 18 '17 21:03 anp

@dikaiosune when i access http://192.168.0.12:19000 from the genymotion emulator browser i get the following error: "the web page at http://192.168.0.12:19000 could not be loaded because: net:ERR_ADDRESS_UNREACHABLE"

My pc network connectivity can be seen below:

Windows IP Configuration


Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . : cablenet.com.cy
   Link-local IPv6 Address . . . . . : fe80::fd7f:e9b8:151c:6004%6
   IPv4 Address. . . . . . . . . . . : 192.168.0.12
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.0.1

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter Ethernet:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::f8df:7b12:2c45:dea0%13
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network #2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::cc22:2b62:950e:28cc%14
   IPv4 Address. . . . . . . . . . . : 192.168.151.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

antonis80 avatar Mar 19 '17 07:03 antonis80

@antonis80 can you try following step 1 in this guide? https://docs.expo.io/versions/v15.0.0/guides/genymotion.html

If that does fix things for you, I'll need to add genymotion docs to the user guide.

anp avatar Mar 20 '17 05:03 anp

@dikaiosune i have followed these two steps but still i get the same error. it is really frustrating.

antonis80 avatar Mar 20 '17 07:03 antonis80

@dansha did you manage to solve it?

antonis80 avatar Mar 20 '17 08:03 antonis80

Yes used #60 to change the order of IPs did the magic

dansha avatar Mar 20 '17 08:03 dansha

@dasha which one did you give highest priority, wireless or network adapters?

antonis80 avatar Mar 20 '17 08:03 antonis80

My phone was connected via mu WIFI so I gave the wireless the highest priority so it was first on ipconfig in this case CRNA broadcasted with the IP from the WIFI

On Mon, Mar 20, 2017 at 10:31 AM, antonis80 [email protected] wrote:

@dasha https://github.com/dasha which one did you give highest priority, wireless or network adapters?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-community/create-react-native-app/issues/81#issuecomment-287699558, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCS9SPgS_LL4PmKz0fJclDh8ZdW4pKqks5rnjlOgaJpZM4MgSVx .

dansha avatar Mar 20 '17 08:03 dansha

still nothing on genymotion emulator, i have also tried it with expo app but still i get the same error as with the emulator

antonis80 avatar Mar 20 '17 10:03 antonis80

I got the same error . On opening on the browser I got a permission error for state.json inside a .expo folder . I gave it a 777 permission and it started working on my android device.

Sidhanthsur avatar Mar 20 '17 15:03 Sidhanthsur

@Sidhanthsur I'm not sure how that's related -- if you still have the error message handy could you open a new issue with that?

@antonis80 what about loading http://localhost:19000 in your emulator's browser? I'm not sure why the emulator isn't able to reach the host network adapter, since we listen on all network interfaces.

anp avatar Mar 20 '17 17:03 anp

@dikaiosune i have tried the http://localhost:19000 and it is reachable, i get the following result in the mobile's (emulators) browser: {"sdkVersion":"14.0.0","name":"logeo","slug":"logeo","version":"0.1.0","xde":true,"developer":{"tool":"crna"},"packagerOpts":{"hostType":"tunnel","lanType":"ip","dev":true,"strict":false,"minify":false,"urlType":"exp","urlRandomness":"i8-q24"},"bundleUrl":"http://192.168.0.12:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?platform=ios&dev=true&strict=false&minify=false&hot=false&assetPlugin=expo/tools/hashAssetFiles","debuggerHost":"192.168.0.12:19001","mainModuleName":"./node_modules/react-native-scripts/build/bin/crna-entry","logUrl":"http://192.168.0.12:19000/logs","id":"@anonymous/logeo-1329440f-f35b-490d-b685-91733bb68359"}

However i still i get the blue screen when i "npm run android" with the message "could not load exp://ip and port" for both the emulator and the expo app.

antonis80 avatar Mar 20 '17 18:03 antonis80