expo: CommandError: ngrok tunnel took too long to connect.

Summary

I want to run vscode expo project on my android device, when I run npx expo start --tunnel it shows above error.

What platform(s) does this occur on?

Web

SDK Version

No response

Environment

expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.22621 Binaries: Node: 18.12.1 - C:\Program Files\nodejs\node.EXE npm: 9.2.0 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: AI-221.6008.13.2211.9477386 npmPackages: expo: ~47.0.12 => 47.0.13 react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 Expo Workflow: managed

Minimal reproducible example

  1. on windows run command npx create-expo-app AwesomeProject
  2. then run cd AwesomeProject
  3. then npx expo start --tunnel

then error will apear as shown below.

image

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 17

Commits related to this issue

Most upvoted comments

It worked for me. 1 - Download ngrok - https://ngrok.com/download 2 - Leave the .exe running 3 - Run the tunnel command again

In my case the solution was to disable the antivirus just before running “npx expo start --tunnel”.

It appears to be a common issue that has recently affected many users. I tried two solutions, and both worked for me. However, the issue now seems to have been resolved, and I no longer require those solutions to make it work as expected.

The two solutions are:

  1. Trying multiple times may work.
  2. Installing the ngrok app from their official website, and leaving it running, may also work.

You can also use emulators such as Bluestacks.

I downgraded my node version from the latest ( it must be 18.x.x) to 14.16.1 and my expo sdk from 47 to 46.0.0, now its working for me.

Can confirm it failed twice before working

I tried many times but it seems like it doesn’t work for me, instead now I’m using it without --tunnel and it starts, because without --tunnel you don’t need ngirok . But tunneling still not working.