expo: Expo CLI crashes when internet is unavailable or Expo servers are down
Summary
I love Expo, thank you so much for all the hard work you put into making this tool so powerful and easy to use.
One issue does seem to continually get in the way—I often find that my dev server will crash unexpectedly because Expo’s servers are unavailable. I was also surprised to find that the CLI doesn’t work without internet (without an extra flag). E.g. just now, in the middle of a development session:
/Users/sam/Developer/my-sound-stories/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(CommandError: Unexpected response when updating the development session on Expo servers: Service Unavailable.). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/sam/Developer/my-sound-stories/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)
at process.emit (node:events:538:35)
at emit (node:internal/process/promises:140:20)
at processPromiseRejections (node:internal/process/promises:274:27)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
After some digging, I’m still not sure why the CLI needs to contact the internet at all—there is no apparent value to me as a user? This makes it extremely frustrating when this useless functionality often gets in the way.
I don’t think there’s anything wrong with functionality that has platform value, but it would be great if it was made clear why this was happening, and more importantly if this functionality fails it should fail silently, particularly as you’re very unlikely to be able to provide the uptime on your servers needed not to interrupt the dev experience (the expo server produced Service Unavailable as above, even though the Status site shows all green)
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 12.3 Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - ~/.asdf/installs/nodejs/16.14.2/bin/node Yarn: 1.22.18 - ~/.asdf/installs/nodejs/16.14.2/.npm/bin/yarn npm: 8.5.0 - ~/.asdf/plugins/nodejs/shims/npm Managers: CocoaPods: 1.11.3 - /Users/sam/.asdf/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 30, 32 Build Tools: 29.0.2, 32.0.0, 32.1.0, 33.0.0 System Images: android-32 | Google APIs ARM 64 v8a, android-Tiramisu | Google Play ARM 64 v8a IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8193401 Xcode: 13.4/13F17a - /usr/bin/xcodebuild npmPackages: expo: ^45.0.0-beta.9 => 45.0.0-beta.9 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.7 Expo Workflow: managed
Please specify your device/emulator/simulator platform, model and version
iOS 15.5 on iPhone 13 simulator
Error output
/Users/sam/Developer/my-sound-stories/node_modules/metro-hermes-compiler/src/emhermesc.js:77
throw ex;
^
RuntimeError: abort(CommandError: Unexpected response when updating the development session on Expo servers: Service Unavailable.). Build with -s ASSERTIONS=1 for more info.
at process.abort (/Users/sam/Developer/my-sound-stories/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15)
at process.emit (node:events:538:35)
at emit (node:internal/process/promises:140:20)
at processPromiseRejections (node:internal/process/promises:274:27)
at processTicksAndRejections (node:internal/process/task_queues:97:32)
Reproducible demo or steps to reproduce from a blank project
Run the code without internet, or just wait and Expo servers will eventually be unreachable for some reason.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 21 (4 by maintainers)
@duggster - try
npx expo start --offlineto work around that errorFixed after upgrade to expo 46.0.16
what is this error Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package “expo” installed in your project. CommandError: Unexpected response when fetching version info from Expo servers: Service Unavailable.
The same here. However, my error is slightly different.
Environment info
`package.json`
Same issue here, has gotten really bad in the past couple of days. My server crashes all the time and hot reload is painfully slow.