expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
34.35k stars 5.49k forks source link

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project. #18701

Closed hatim85f closed 2 years ago

hatim85f commented 2 years ago

Summary

The app was working fine and suddenly without any reasons I am getting this message when ever I am trying to start the app with (npm start) or even I can not login my account from terminal

I am getting this message if I am trying to login

getaddrinfo ENOTFOUND exp.host
Error: getaddrinfo ENOTFOUND exp.host
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)

@expo-bot

If npm start worls the app is not loading

Managed or bare workflow?

managed

What platform(s) does this occur on?

Android, iOS

Package versions

No response

Environment

expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.22000 Binaries: Node: 14.16.1 - C:\Program Files\nodejs\node.EXE npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 26, 28, 29, 30 Build Tools: 29.0.2, 30.0.3 System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom npmPackages: expo: ~46.0.7 => 46.0.7 react: 18.0.0 => 18.0.0 react-native: 0.69.4 => 0.69.4 Expo Workflow: managed

Reproducible demo

in npm start

Stacktrace (if a crash is involved)

No response

brentvatne commented 2 years ago

can you share the full output? is the cli process closing for you?

hatim85f commented 2 years ago

can you share the full output? is the cli process closing for you?

I didn't get your question the title is the full command. recently expo-go app is not even go through

Could not reach Expo servers, please check if you can access exp.host.
Falling back to offline mode.
Error: timeout of 1ms exceeded
    at createError (C:\Users\hatim\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\core\createError.js:16:15)
    at RedirectableRequest.handleRequestTimeout (C:\Users\hatim\AppData\Roaming\npm\node_modules\expo-cli\node_modules\axios\lib\adapters\http.js:280:16)
    at RedirectableRequest.emit (events.js:315:20)
    at Timeout.<anonymous> (C:\Users\hatim\AppData\Roaming\npm\node_modules\expo-cli\node_modules\follow-redirects\index.js:164:12)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
hatim85f commented 2 years ago

@brentvatne in addition to issue #18628 still I was having the same problem

brentvatne commented 2 years ago

@hatim85f - are you still able to use the cli after this error or does it bring you back to the prompt?

additionally - it looks like you are using the global expo cli package. you are using sdk 46 so you should be using the local cli. run npx expo start in your project

more info in:

hatim85f commented 2 years ago

@brentvatne yes cli is working working after that I am getting the same error message with npx expo start and for two projects , this one with sdk 46 I just init to make sure there is no issues in the previous one which has the environment of

System:
OS: Windows 10 10.0.22000
Binaries:
Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
SDKs:
Android SDK:
API Levels: 26, 28, 29, 30
Build Tools: 29.0.2, 30.0.3
System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
npmPackages:
expo: ~44.0.0 => 44.0.6
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-native: 0.64.3 => 0.64.3
react-native-web: 0.17.1 => 0.17.1
Expo Workflow: managed

The weired issue is when I am trying to login to my account in expo-go app I am receiveing this message

We couldn't load your account
Network request failed
brentvatne commented 2 years ago

are you able to access https://expo.dev in your web browser? what about https://exp.host/--/versions?

brentvatne commented 2 years ago

also, where do you live? is it possible you're behind a national firewall that is blocking access?

hatim85f commented 2 years ago

@brentvatne I am living in UAE, regarding https://expo.dev/ yes I can access it normally while I can not access https://exp.host/--/versions

Everything was working fine and suddenly everything stopped

  1. I can not access project from Expo - go
  2. in ios Expo-go is not even opening
  3. android Expo-go is opening but not logging in my expo account
  4. if any of them load the project I am getting these error messages
  5. I did update expo version to check if there is any issues with it
  6. I did init a brand new project may be there is a bug in the previous one
  7. I did updated Expo - go , delete and reinstall
  8. after starting the project using expo start or npx expo start in case of 46SDK the browser is not accessing exp://192.168.1.210:19000
  9. actually everything started with this [issue (Error encountered while fetching Expo token, expected an OK response, received: 400 (body: "{"errors":[{"code":"VALIDATION_ERROR","message":"The Expo push notification service is supported only for Expo projects. Ensure you are logged in to your Expo developer account on the computer from which you are loading your project.","isTransient":false}]}").])](https://github.com/expo/expo/issues/18628) WhatsApp Image 2022-08-19 at 12 36 18 AM

Hope that may help investigating what is going on

taking in consedration I was working for this porject for the last 4 months without any issues and everything came suddenly out of nowhere WhatsApp Image 2022-08-19 at 11 17 07 AM WhatsApp Image 2022-08-19 at 11 17 06 AM

hatim85f commented 2 years ago

@brentvatne it seems there is an issue in expo server because even expo go app is not opening while also can not log in from the terminal

hatim85f commented 2 years ago

@expo-bot

NKANGIJAFARI commented 2 years ago

Hi @hatim85f It seems there is a problem in UAE, nslookup exp.host is not working yet other sites are working. This means whatever happening is in UAE.

I cant tell what it is but when i downloaded "Urban VPN Desktop", then exp.host works fine and can login well and run the app well in the terminal but then cant run it in expo GO app as the VPN makes the computer and the phone not being on the same network

can access https://expo.dev and https://exp.host/--/versions in my web browser if VPN is on but can access https://exp.host/--/versions when VPN is off.

Without vpn.

Screen Shot 2022-08-20 at 4 58 42 PM

With VPN

Screen Shot 2022-08-20 at 5 02 26 PM

This means exp.host servers can't be reached here in UAE, saying UAE because other people on my team arent facing the same issue.

hatim85f commented 2 years ago

@NKANGIJAFARI you are right when I did the same it's working . regarding expo go you can download a virtual device on your device and use it but this has some drawbacks

  1. you can test either ios or android (as per your operating system)
  2. it's not practical thing to do
  3. the fact of that may be your internet provider could block your service due to using vpn

I think something else need to be done or find another alternative

hatim85f commented 2 years ago

@brentvatne I did call Etisalat UAE and then they asked me to go through their wbsite www.etisalat.ae/proxy and write a request to unblock the website specially it's opened normally for Du users

Please fo the same and ask anyone you know to do the same

NKANGIJAFARI commented 2 years ago

@brentvatne Yes its only on etisalat, am now in starbucks and things are running okay. I have done that also, and asked a friend to do so, i will be calling them also just to add preesure on them about the issue.

aweld commented 2 years ago

I faced the same issue and I have done it also. Submitted the request to etisalat to unblock the site https://exp.host/--/versions

jhexdejesus1 commented 2 years ago

I am also facing this issue. But I am able to reach https://exp.host/--/versions and all of my published apps is getting stuck on splash screen for 5mins.

hatim85f commented 2 years ago

@jhexdejesus1 you need to submit the form to etisalat and let them know that is affecting your published apps

akaldhafer commented 2 years ago

@hatim85f you are right, I got the same issues with the app and terminal. We need to submit all forms to solve this issue

hatim85f commented 2 years ago

@akaldhafer not only submitting the form also we need to call and make a close follow up for that. I believe it's balck listed accidentally

netojose commented 2 years ago

I had the same problem, I fixed deleting the folder content at:

<ROOT_PROJECT_FOLDER>/.expo/web/cache/development/babel-loader

Ps.: I'm using babel loader plugin

Majd-eddine-BEN-TAHAR commented 2 years ago

I had the same problem, I fixed by clearing the bundler cache using : npx expo start -c

jdc0092 commented 2 years ago

Thanks friend, it worked for me with this command 'npx expo start -c' greetings

Joachimchisom1 commented 2 years ago

This is actually a network issue. I had this same error too.

wwwikies commented 2 years ago

network issue. npx expo start --offline works for me.

barcelosdev commented 1 year ago

network issue. npx expo start --offline works for me.

this works for me

Ngwangshalom commented 1 year ago

first of all power off/on your router to have refreshed data connection then open your folder using cmd and type the command npx expo start -c

it will work like margic

bizarrenebula commented 1 year ago

I've noticed that if I'm running a VPN, npx expo start throws the same error:

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project. FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: getaddrinfo ENOTFOUND api.expo.dev FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: getaddrinfo ENOTFOUND api.expo.dev at ClientRequest. (C:\Users\ANTONSO\d\the-code-of-life\node_modules\node-fetch\lib\index.js:1491:11) at ClientRequest.emit (node:events:513:28) at TLSSocket.socketErrorListener (node:_http_client:494:9) at TLSSocket.emit (node:events:513:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Check if you're using a VPN.

Cheers!

DanielProgrammer64 commented 1 year ago

It ALWAYS happens to me, i do not know why, even when i do the most perfect sequence on the terminal, do someone have a solution for "Expo web" Issues?????

frederico-rocha commented 1 year ago

I have the same error:

@terminal: npx expo install react-dom react-native-web @expo/webpack-config

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project. FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: unable to get local issuer certificate FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: unable to get local issuer certificate at ClientRequest. (/Users/frederico.rocha/Desktop/React Apps/StickerSmash/node_modules/node-fetch/lib/index.js:1505:11) at ClientRequest.emit (node:events:527:28) at TLSSocket.socketErrorListener (node:_http_client:454:9) at TLSSocket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21)

I do have a zscaler VPN which I can't turn off (disable by the company policy).

Is there any way to overcome this?

givik commented 1 year ago

npx expo start --offline

This works for a start but what if I want to install a library:

npx expo install react-dom react-native-web @expo/webpack-config

richardhealy commented 1 year ago

I found that my network randomly wouldn't connect via 1 computer but on another it would. I couldn't locate the reason for the block, but I did find a hack to by pass it. As mentioned above there are 2 networks that seem to deliver the same data

https://api.exp.host/v2/versions/latest
https://exp.host/--/api/v2/versions/latest

Horribly, (but necessary as Expo wasn't previously built on the iOS device) I swapped in the exp.host url in node_modules/@expo/cli/build/src/api/endpoint.js and then ran yarn expo:ios. It built, then I reverted my previous changes in the file and continued on my merry way.

richardhealy commented 1 year ago

Also, I found out why my dev domains where being blocked. https://superuser.com/a/1413487

Not sure how that record got in there, but I deleted it and everything was find.

natainditama commented 1 year ago

I had the same problem, I fixed by clearing the bundler cache using : npx expo start -c

Thanks a lot for your help. It works!

yourresult commented 1 year ago

When facing the problem of being unable to reach expo server, try to solve it using the following command: 'npx expo r -c'

melkishengue commented 1 year ago

Droping the the .expo folder fixed the issue for me

pechavarria62 commented 1 year ago

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project. FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: connect ECONNREFUSED 2606:4700::6812:568:443

I'm having this issue with my project, now it won't start I always do nom start but now it won't do nothing after upgrading to react-native 0.71.8