Tunnel validation error.

When I am trying to connect with tunnel it shows,

This error: validation error :" urlType must be one of [exp,http, redirect,no-protocal]

1 Like

Hey @naveengit, can you please share your environment information via expo diagnostics? It’s hard to help when we don’t have the necessary information.

Cheers,
Adam

.expo file does not create any ngrok url it shows null in run time. Can you please give me url .

If I get expo url ,it will run

iam also facing the same issue getting erro rValidationError: “urlType” must be one of [exp, http, redirect, no-protocol]. please advise me if you get answer of it.

I don’t get any answer yet ,still I am don’t know why the error was happening.

delete the .expo directory in your project and then run expo start again

I was deleted .expo and start by expo start but still error is coming.

Ya nothing happened the same error was happening

try deleting it and running expo start --lan

I tried now itz showing package.json doesn’t exist. Better to migrate on react cli rather than expo. Expo is very unreliable, can’t predict when it will work when it won’t.

Package.json would not just disappear. If it’s gone, then react-native cli is not going to help you…
Were you inside the project directory when you ran expo start --lan?

2 Likes

I was just created one directory reactnative_workspace and then I put the project using the npm init (project name ).so whenever I tried with npm start/expo start it started showing error to me.

You need to create the project with expo init projectname, not npm init

Did you do something like this?

cd reactnative_workspace
expo init projectname
cd projectname
expo start --lan
1 Like

Expo CLI 4.0.17 environment info:
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 26, 27, 28, 29, 30
Build Tools: 28.0.3, 30.0.2
System Images: android-30 | Google APIs Intel x86 Atom
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6858069
npmPackages:
expo: ~40.0.0 => 40.0.0
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: managed

I also had this issue after upgrading to the latest CLI.

Editing the .expo folder is pointless, because the json files get created/updated everytime you start expo.

It seems like it is a bug with DevTools itself and how it shows the error on the UI. In stead of logging out the failed tunnel connection, it refreshes the screen.

Here is what is happening.

  1. Run this: expo start --tunnel
  2. DevTools opens a new browser and starts Metro Bundler.
  3. DevTools tries to initiate a tunnel before the Bundler is complete, so it fails
  4. After it failed, the screen is redirected to the failure screen you all are seeing.
  5. But tunnel connection is then actually established.

So you can refresh the browser and it should work.

See my screenshot below:

Correct i saw same situation on my side too. But some time it doesn’t work or took time.