Expo Bare + App Center Build

Trying to build Expo Bare workflow project on Microsoft App Center and seeing this error, is Expo Bare workflow compatible? Not sure what the workaround for this error is?

** ARCHIVE FAILED **

The following build commands failed:

PhaseScriptExecution Bundle\ Expo\ Assets /Users/runner/Library/Developer/Xcode/DerivedData/telehealthapp-fnudzrabwupniyefbircvpwruysn/Build/Intermediates.noindex/ArchiveIntermediates/Dev/IntermediateBuildFilesPath/telehealthapp.build/Release-iphoneos/telehealthapp.build/Script-00DD1BFF1BD5951E006B06BC.sh

(1 failure)

##[error]Error: /usr/bin/xcodebuild failed with return code: 65
2020-04-21T13:25:01.8588870Z ../node_modules/expo-updates/bundle-expo-assets.sh: line 14: expo: command not found
2020-04-21T13:25:01.8598220Z Command PhaseScriptExecution failed with a nonzero exit code

hello! you will need to have expo-cli installed on the build server in order to build on app center with expo-updates in your project. i imagine app center probably lets you run scripts before your build so you should be able to install expo-cli first. alternatively, you can remove expo-updates from your app (follow the installation instructions in reverse).

Cheers, yeah there is a post-clone script I can run, trying that now.

Hi @notbrent We are facing the same problem, we are using expo bare workflow, it works file when building android apps but when building ios it fails with the same error we installed expo-cli before build process but still giving us the same issue.

Not pretty sure about what do you mean by remove expo-updates from app as its not a dependency.

you will need to share your build error log because you seem to be encountering a different problem. if the error is what is in the topic, then this means you removed expo-updates but did not remove the build script in the build phases tab

Hi notbrent,
Kindly find the below log.

Copying /Users/runner/runners/2.168.2/work/1/s/packages/apps/troyPortal/Mobile/ios/troyPortal/Supporting/app.manifest
â–¸ Copying /Users/runner/runners/2.168.2/work/1/s/packages/apps/troyPortal/Mobile/ios/troyPortal/Supporting/app.bundle
â–¸ Copying Expo.plist
â–¸ Compiling LaunchScreen.xib
â–¸ Processing Info.plist
â–¸ Running script 'Bundle Expo Assets'
â–¸ Generating 'troyPortal.app.dSYM'
** ARCHIVE FAILED **


The following build commands failed:
	PhaseScriptExecution Bundle\ Expo\ Assets /Users/runner/Library/Developer/Xcode/DerivedData/troyportal-aykntywvycqskignpjawolegjoew/Build/Intermediates.noindex/ArchiveIntermediates/troyportal/IntermediateBuildFilesPath/troyportal.build/Release-iphoneos/troyPortal.build/Script-00DD1BFF1BD5951E006B06BC.sh
(1 failure)
##[error]Error: /usr/bin/xcodebuild failed with return code: 65

while trying to build ios release on azure pipeline we did not remove anything from the created app bare-work flow we just added the bundle identifier.
I’m using expo-workspaces
as well here is the package.json and app.json

app.json

{
  "name": "troyPortal",
  "displayName": "troyPortal",
  "expo": {
    "name": "troyPortal",
    "slug": "troyPortal",
    "sdkVersion": "35.0.0",
    "version": "1.0.0",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "assetBundlePatterns": [
      "**/*"
    ],
    "android": {
      "package": "com.vodafone.troy"
    },
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.tss-vodafone.troyPortal"
    },
    "packagerOpts": {
      "config": "metro.config.js"
    }
  }
}

package.jsons

{
  "name": "troyapp",
  "version": "1.0.0",
  "main": "__generated__/AppEntry.js",
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "web": "expo start --web",
    "start": "react-native start",
    "test": "jest",
    "release": "cd android && ./gradlew clean && ./gradlew assembleRelease"
  },
  "dependencies": {
    "expo": "~37.0.3",
    "expo-updates": "~0.1.0",
    "react": "~16.9.0",
    "react-dom": "~16.9.0",
    "react-native": "~0.61.5",
    "react-native-gesture-handler": "~1.6.0",
    "react-native-reanimated": "~1.7.0",
    "react-native-screens": "~2.2.0",
    "react-native-unimodules": "~0.9.0",
    "react-native-web": "~0.11.7"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-jest": "~25.2.6",
    "expo-yarn-workspaces": "^1.2.1",
    "jest": "~25.2.6",
    "react-test-renderer": "~16.9.0"
  },
  "jest": {
    "preset": "react-native"
  },
  "private": true
}

hi there! thanks for the logs. so you will need to remove the “Bundle Expo Assets” step from your project build phases and replace it with a new build phase called “Bundle React Native code & images” with these contents:

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh

on android you will need to remove this line from android/app/build.gradle

apply from: "../../node_modules/expo-updates/expo-updates.gradle"
1 Like

also, please, add < /dev/null

by IOS build stack indefinitely on section "Bundle React Native code and images" - Stack Overflow

2 Likes