Android Studio Failed to complete tunnel connection

Hello everyone,

I have an issue on the expo packager when I open detached project in Android Studio:

It’s appear after the Gradle build is finished.

Before run Android Studio the packager works well:
image

It’s the same url !

So I can’t run the Android Studio project I get the error when the app starting.

Do you have an idea about this issue ?

Regards,

Nahani

Hi! Have you followed all of the Developing with ExpoKit steps, including starting your project in exp or XDE?

Hi dikaiosune,

Yes of course the project works well when I run only with XDE and I’m able to run the app on my phone. But when I open Android Studio in the same time than the project run in XDE, I get this error as soon as the Gradle (get by exp detach) is built. And I’m no longer able to re run the app on my phone. I need to close Android studio and restart XDE.

Regards,

Nahani

OK. What operating system are you using? Do you have a firewall enabled? When XDE is started, what happens if you open these URLs in your browser?

http://localhost:19000
http://localhost:19001

Windows 7
Firewall disable:

  • When only XDE is started:

http://localhost:19000

http://localhost:19001
image

  • When XDE is started and Android Studio Gradle built:

http://localhost:19000


http://localhost:19001
image

Android Studio console:

Thank you for your help

Could you upload the files in ~/.expo/logs?

Hi,

Finally I found a workaround. After my app built and run with Android I restart my XDE project and I reload the app on the phone.

But it’s really strange that Android Studio interferes with XDE and localhost:19001…

Thank you for your help.

Nahani

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.