Could not get status from Metro bundler. Request failed with status code 404

$ expo diagnostics

  Expo CLI 3.2.3 environment info:
    System:
      OS: macOS 10.14.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 12.10.0 - /usr/local/bin/node
      Yarn: 1.16.0 - /usr/local/bin/yarn
      npm: 6.12.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5791312
      Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
    npmPackages:
      expo: 35.0.0 => 35.0.0
      react: 16.8.3 => 16.8.3
      react-native: https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz => 0.59.8
      react-navigation: 4.0.7 => 4.0.7
    npmGlobalPackages:
      expo-cli: 3.2.3

Since upgrading to expo-cli@3.1, we’ve been seeing errors running expo start -c. When we first ran expo start -c, it worked fine. After that first time, we’ve been seeing the same behavior:

  1. We run expo start -c
  2. The Metro Bundler page opens, and shows:
Starting Metro Bundler on port 19002.
Your JavaScript transform cache is empty, rebuilding (this may take a minute).
  1. After 10 seconds or so, the Metro Bundler page turns completely black, and in our terminal we see:
Could not get status from Metro bundler. Request failed with status code 404
Connecting to Metro bundler failed.
  1. We try running expo start -c again, and it works fine.

At first, while this was a little annoying, we weren’t too worried about it. But then our first TestFlight user told us that their app is getting stuck on the splash screen. We’re not 100% sure that the two are related. But since our app is working fine on our TestFlight, we’re wondering whether they might be related.

We saw in other threads that the 404 error can happen when your bundle is too large (> 30mb). Our bundle is 10.75mb, so we don’t think that’s the issue.

Any idea what’s causing this?

1 Like

Hey @mkolodny,

The upload size error has been corrected to return a 413 now so you’re definitely ok on that front. Could you try upgrading to the latest version of the cli (3.3.0) and see if the issue persists?

Cheers,
Adam

@adamjnav we just upgraded the cli to 3.3.0, and the issue is still there unfortunately.

Try running rm -rf .expo in your project’s directory.

We’re still seeing the same issue after running rm -rf .expo.

@adamjnav any other ideas?

It seems like this is the issue we’ve been having: https://github.com/expo/expo-cli/issues/52

Restarting my computer ended up fixing the issue. I think I may have had some Metro Bundler zombie processes running from my old expo-cli install. It might be helpful to add a note at the end of the expo-cli install process to let people know that if you’re upgrading the expo-cli, you may need to restart your computer.