Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandError: ngrok tunnel took too long to connect. #20894

Closed
Vahidpro opened this issue Jan 20, 2023 · 17 comments · Fixed by #24188
Closed

CommandError: ngrok tunnel took too long to connect. #20894

Vahidpro opened this issue Jan 20, 2023 · 17 comments · Fixed by #24188
Labels
CLI Versioned Expo CLI -- `npx expo start` outdated

Comments

@Vahidpro
Copy link

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

@Vahidpro Vahidpro added CLI Versioned Expo CLI -- `npx expo start` needs validation Issue needs to be validated labels Jan 20, 2023
@gajraj-m
Copy link

I too am facing this problem. But after one or two times the server starts successfully.

@Vahidpro
Copy link
Author

Vahidpro commented Jan 22, 2023

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.

@kaserne1994
Copy link

kaserne1994 commented Jan 24, 2023

is the metro bundler website showing up if you running expo ? Nothing happens if I use "npx expo start", all I can see is the qr code and "Metro waiting on exp://127.0.0.1:19000"
"Scan the QR code above with Expo Go (Android) or the Camera app (iOS)". If I scan the qr code i receive the message "Something went wrong" on my expo go app.

@Vahidpro
Copy link
Author

Vahidpro commented Jan 25, 2023

No, metro bundler website not showing up and no QR code, it won't proceed to produce QR code, before producing, this error happens

@kaserne1994
Copy link

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.

@Vahidpro

This comment was marked as duplicate.

@brentvatne brentvatne removed the needs validation Issue needs to be validated label Feb 22, 2023
@sebastienlabine
Copy link

Can confirm it failed twice before working

@marquezjorge

This comment was marked as duplicate.

@goltaraguilherme
Copy link

Im the same problem, but when i try more times it works

@crisariza

This comment was marked as duplicate.

@nine-9-nine

This comment was marked as duplicate.

@JunaidKhan444
Copy link

Getting this error again and again.
ng

@Arzan101

This comment was marked as duplicate.

@XEZ1

This comment was marked as duplicate.

@Vahidpro
Copy link
Author

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.

@AlexandreJareck
Copy link

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

@lucassaffi
Copy link

lucassaffi commented Jun 4, 2023

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

EvanBacon added a commit that referenced this issue Aug 30, 2023
…ges (#24188)

# Why

- fix #20894 by add better
first-class resources regarding outages.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
EvanBacon added a commit that referenced this issue Aug 30, 2023
…ges (#24188)

- fix #20894 by add better
first-class resources regarding outages.

---------

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLI Versioned Expo CLI -- `npx expo start` outdated
Projects
None yet
Development

Successfully merging a pull request may close this issue.