Cannot open existing project and create new projects

when I trying to open an existing app with XDE I get the following messages in the XDE:

11:42:13 AM
Starting React Native packager…
11:42:26 AM
Scanning folders for symlinks in C:\reactnative\Myproject\node_modules (31ms)
11:42:27 AM
Loading dependency graph.
11:42:27 AM
Running packager on port 19001.
11:42:28 AM
11:42:28 AM
Project opened! You can now use the “Share” or “Device” buttons to view your project.
11:43:56 AM
Dependency graph loaded.

so it seems to be ok but in the app I get:

SOMTHING WENT WRONG!

and in the logs I see this error:

uncaught error java.net.connectexception failed to connect to localhost/127.0.0.1:19000

Why is it trying to connect to the localhost?

I have another problem when I try to open a new project that got stuck on
Extracting project files…

What is the URL in the URL bar in XDE when you try to scan the QR code and load the project?
or are you trying to open it in the android emulator?

The URL is localhost/127.0.0.1:19000
I’m scanning a QR code and open it on my device

For whatever reason, the tunnel is probably not starting.

I would try switching to LAN (from the gear menu by the URL under host) if your phone and your computer are on the same wifi. Otherwise try restarting your computer and booting up XDE again.

Charlie

1 Like

I’v tried switchig to LAN and restarting my computer but still the same problem

I am almost certain that it should’nt lead me to this address

hey @shlomo156, this is most likely the result of a bad internet connection and your ngrok tunnel failing to start. There is currently work being done to make this process less painful, sorry for all the inconvenience you’ve experienced. In the meantime, you can try developing on snack.expo.io.

hey @quinlanj,
What do you mean bad internet connection ?
It seems like my internet connection is working properly and I can surf without a problem.
And this message I write from the same network
The problem did not exist a few days ago and after upgrading the XDE spoofing appeared

The snack.expo is a great tool but I cant npm install there

Hey @shlomo156, I’m going to try to ask you some redundant questions, sorry if they sound stupid!

  • Do you have VirtualBox installed on your machine? Or any VM Software?
  • Are you runing this software as administrator?
  • Where are you located in the world?

There are a couple of solutions I’ve found that have helped some users in advanced cases, here they are:

Process #1 (Community sourced answer)

The tunnel software we use is ngrok (https://ngrok.com) 
so I'd try testing ngrok out to make sure it works on your
 computer before spending more time. (XDE and exp have a
 LAN option where your project URLs contain LAN IP
 addresses instead of the exp.direct tunnel URLs.)

If ngrok works I'd recommend a few things while debugging:

Close your project in XDE and open it again.
Try to load the URL in your browser on your computer 
(switch out exp:// for http://). If that works, the development 
server is up and running.

Try to load the URL from your phone's browser to make sure your 
phone can reach your development server.
Lastly, open the URL in the Expo client.

Process #2 (if that yields no results) (Community sourced answer)

Solution for windows 10.
Go to cmd and write ipconfig.
Look what is the first Ethernet adapter.
It should be Ethernet adapter Ethernet.
If it is not and it is something like Ethernet adapter Virtualbox...
Then this is the problem voalaa. Expo is taking the ip adress of the virtualbox.
So go to "Network connections" right click on the adapter you want disable and change the status to disable.
Connect you computer to ethernet and you phone to the same wifi network.
Restart Expo, then the default url should be changed.
Select host->lan, start the app and then -> run on android.
That's it.

Let me know if any of this helps, or doesn’t help, and I’ll stick with you through the rest of this process.

hey @jimmylee,

Apparently I had a VirtualBox, but I canceled it according to what was written in process#2 you sent.
still, the problem exists.

I ran the software both as an administrator and in a normal way and both didnt work

I am located in Israel

That’s what the ngrok returned:
image

Still, I tried the steps and it did not seem to work

And Process#2 didnt work as I mentioned above

Hey @shlomo156

I think this has something to do with your network configuration, are you behind a firewall? Is that IP address open publicly?

If that doesn’t work, here is another thing you can look at:

Changing adapter priority setting worked for some people: Here is the GitHub issue: https://github.com/react-community/create-react-native-app/issues/60

https://answers.microsoft.com/en-us/windows/forum/windows_10-networking/adapter-priority-setting-unavailable-in-windows-10/d2b63caa-e77c-4b46-88b5-eeeaee00c306?auth=1

Suddenly it works
Perhaps the combination of canceling the VirtualBox and shutting down the computer
Thank you all for answering me @jimmylee @ccheever @quinlanj

2 Likes

Thank you so much this, solved my problem

2 Likes

I’m glad it worked! Yeah sometimes its the side effects of other software people have installed on their machines. Its always tough to pin down :frowning: