Android build fails on createReleaseExpoManifest

🐛 Bug Report

A brand new expo bare-minimum app fails to build for release on Android. It fails during the :app:createReleaseExpoManifest task, because it cannot connect to

A workaround is to run react-native start in a separate terminal / process so that the Metro bundler is running. Build will succeed.


  Expo CLI 3.20.9 environment info:
      OS: macOS 10.15.4
      Shell: 3.2.57 - /bin/bash
      Node: 12.16.2 - ~/.nvm/versions/node/v12.16.2/bin/node
      Yarn: 1.22.4 - ~/.nvm/versions/node/v12.16.2/bin/yarn
      npm: 6.14.4 - ~/.nvm/versions/node/v12.16.2/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
      Android Studio: 3.6 AI-192.7142.36.36.6392135
      Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
      expo-cli: 3.20.9

App target: Android

Steps to Reproduce

First, switch to recent node LTS (12.16.2), and install expo CLI and react-native CLI:

nvm use 12.16.2
npm i -g expo-cli
npm i -g react-native-cli

Then run the following commands to create a fresh bare minimum app and attempt to create an android bundle release:

expo init --template bare-minimum ExpoRNDebug
cd ExpoRNDebug
cd android
./gradlew bundleRelease

Expected Behavior


Actual Behavior

> Task :app:createReleaseExpoManifest FAILED
      throw er; // Unhandled 'error' event

Error: connect ECONNREFUSED
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted 'error' event on ClientRequest instance at:
    at Socket.socketErrorListener (_http_client.js:426:9)
    at Socket.emit (events.js:310:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '',
  port: 8081
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:createReleaseExpoManifest'.
> Process 'command 'node'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.

BUILD FAILED in 2m 15s
430 actionable tasks: 430 executed


Run react-native start in a separate terminal / process so that the Metro bundler is running. Build will succeed.

5 thoughts on “Android build fails on createReleaseExpoManifest

  1. @brentvatne I am trying to have my builds automated with AppCenter. Currently AppCebter works fine with a regular react native app. But, with Expo bare it fails with the error above. how would we have metro running in this case or what would be a workaround in this case?

  2. Hey @dondragon2 – we will add a clearer error message here but unfortunately, builds with expo-updates installed do currently require that the metro bundler server is running in another process. The templates from expo init have expo-updates preinstalled because we anticipate most users will want this functionality, but you can remove it if needed.

    If you can customize how you start your build and/or have a separate process running in App Center, it shouldn’t be a problem, but if not, you may need to uninstall expo-updates to get the build to run.

    It’s on our roadmap to get builds with expo-updates running without the need for a packager server. But that’s unfortunately not the case right now 😞 Sorry for the trouble!