expo: Android Release Build Fails on createReleaseExpoManifest

🐛 Bug Report

Environment

Expo CLI 3.20.9 environment info: System: OS: Windows 10 10.0.18362 Binaries: Node: 12.16.3 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.4 - C:\Users\cagri\AppData\Roaming\npm\yarn.CMD npm: 6.14.5 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.6010548 npmPackages: expo: 37.0.11 => 37.0.11 react: 16.9.0 => 16.9.0 react-dom: 16.9.0 => 16.9.0 react-native: 0.61.4 => 0.61.4 react-native-web: ^0.11.7 => 0.11.7

also pacakge.json is like

“dependencies”: { “expo”: “37.0.11”, “expo-notifications”: “~0.1.1”, “expo-splash-screen”: “^0.2.3”, “expo-task-manager”: “~8.1.0”, “expo-updates”: “0.2.3”, “react”: “16.9.0”, “react-dom”: “16.9.0”, “react-native”: “0.61.4”, “react-native-device-info”: “5.5.8”, “react-native-gesture-handler”: “~1.6.0”, “react-native-reanimated”: “~1.7.0”, “react-native-screens”: “~2.2.0”, “react-native-unimodules”: “0.9.1”, “react-native-web”: “^0.11.7” }, “devDependencies”: { “@babel/core”: “~7.9.0”, “babel-jest”: “~25.2.6”, “jest”: “~25.2.6”, “react-test-renderer”: “~16.9.0” }

Steps to Reproduce

expo init --template bare-minimum ExpoRNRelease
cd ExpoRNRelease
npm install
expo export --public-url https://xxx.fra1.digitaloceanspaces.com/expo
react-native run-android --variant=release

Expected Behavior

BUILD SUCCESSFUL

Actual Behavior

Task :app:createReleaseExpoManifest FAILED
446 actionable tasks: 3 executed, 443 up-to-date
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at validateString (internal/validators.js:117:11)
    at Object.join (path.js:375:7)
    at D:\expo\launcher\node_modules\expo-updates\scripts\createManifest.js:79:25
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Reproducible Demo

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 23 (2 by maintainers)

Most upvoted comments

Hey guys!

Thanks a lot @nebmesemaou and @esamelson.

At first the suggested methods were throwing the following error - * What went wrong: Execution failed for task ‘:app:bundleReleaseJsAndAssets’.

Process ‘command ‘npx.cmd’’ finished with non-zero exit value 1 Error: Command failed: gradlew.bat app:installRelease -PreactNativeDevServerPort=8081 error ENOENT: no such file or directory,

On running gradlew clean in the android folder and then running react-native run-android --variant Release in the root directory built the app-release successfully.

trying about 72 hours but no solutions

Is there a way to do a build using Gradle?

We have a Fastlane that runs a Gradle task on Travis CI server. Also, you can’t just open another terminal and I’d prefer not running a metro bundler as a background process in CI environment to build my Android project.

The way it worked before (in Expo SDK35) we were building the JS bundle with expo CLI and then run the Gradle task and iOS Xcode build tool to build native packages with the newly created JS bundle.

Now it is not clear on how to build the JS bundle, the one that can be used later for native app builds.

EAS build can see this issue https://github.com/expo/expo/issues/22749 just changed index.ts to index.js

@y471n

Why don’t you take a look at that?

https://github.com/facebook/react-native/issues/28510

so similar types of errors is maybe like this.

Hi there! Sorry you’re having trouble. As @nebmesemaou helpfully noted, you need to have a separate terminal window with the packager running. If you run react-native run-android --variant Release it will do this automatically for you, otherwise you can manually run react-native start in a separate terminal window.

If you’ve tried that and it’s giving you other errors, please read and post the output above the line FAILURE: Build failed with an exception (look for the line > Task :app:createReleaseExpoManifest FAILED) as this should give you more detailed information about the error. The gradle stacktrace is not helpful, unfortunately.

it seams packager not start try react-native run-android --variant=release or open seperate window with react-native start then run gradlew bundleRelease

I am having the same errors and the solutions mentioned above didn’t solve them.

‘react-native’: ‘~0.61.5’ ‘expo’: ‘~37.0.3’ ‘expo-updates’: ‘0.2.5’

Steps to reproduce -

  1. expo init test
  2. expo eject
  3. Configure for signed apk release by following docs here - https://reactnative.dev/docs/signed-apk-android
  4. cd android ./gradlew bundleRelease

Error: FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:createReleaseExpoManifest’.

Process ‘command ‘cmd’’ finished with non-zero exit value 1

Please help