Managed EAS iOS build fails on Glob (pod install)

Hi, trying to create a test build (first time with EAS). I got this far when encountering this pod install problem I’m stumped on. Using SDK 44 in a managed project.

  expo-env-info 1.0.5 environment info:
    System:
      OS: Linux 5.10 Ubuntu 20.04.5 LTS (Focal Fossa)
      Shell: 5.0.17 - /bin/bash
    Binaries:
      Node: 16.18.0 - /usr/bin/node
      Yarn: 1.22.19 - /usr/bin/yarn
      npm: 8.19.2 - /usr/bin/npm
    npmPackages:
      expo: ^44.0.0 => 44.0.6 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      eas-cli: 2.6.0
      expo-cli: 6.0.8
    Expo Workflow: managed

With commando: eas build --profile development --platform ios I eventually get an error in the pod install part of the build. I changed the name in de logs to OurAppName.

Running "expo doctor"
- Finding all copies of @unimodules/core
- Finding all copies of @unimodules/react-native-adapter
- Finding all copies of react-native-unimodules
[12:25:01] 🎉 Didn't find any issues with the project!

POD INSTALL STEP

[stderr] (node:1596) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/expo/workingdir/build/mobile/node_modules/tslib/package.json.
[stderr] Update this package.json to use a subpath pattern like "./*".
[stderr] (Use `node --trace-deprecation ...` to show where the warning was created)
Using Expo modules
Auto-linking React Native modules for target `OurAppName`: BVLinearGradient, EXRandom, RNCAsyncStorage, RNCMaskedView, RNCPicker, RNDateTimePicker, RNFS, RNFastImage, RNGestureHandler, RNInAppBrowser, RNReanimated, RNScreens, RNSentry, RNVectorIcons, react-native-appearance, react-native-netinfo, react-native-safe-area-context, react-native-webview, and rn-fetch-blob
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
CocoaPods 1.11.3 is available.
To update use: `sudo gem install cocoapods`
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.3
Downloading dependencies
Installing AppAuth (1.6.0)
Installing BVLinearGradient (2.6.2)
Installing DoubleConversion (1.1.6)
Installing EXAV (10.2.1)
Installing EXAppAuth (11.1.1)
Installing EXAppleAuthentication (4.1.0)
Installing EXApplication (4.0.2)
Installing EXConstants (13.0.2)
Installing EXCrypto (10.1.2)
Installing EXDevice (4.1.1)
Installing EXFileSystem (13.1.4)
Installing EXFirebaseCore (4.1.1)
Installing EXFont (10.0.5)
Installing EXImagePicker (12.0.2)
Installing EXJSONUtils (0.2.1)
Installing EXKeepAwake (10.0.2)
Installing EXManifests (0.2.4)
Installing EXNotifications (0.14.1)
Installing EXRandom (12.1.2)
Installing EXSplashScreen (0.14.2)
Installing EXStoreReview (5.1.1)
Installing EXStructuredHeaders (2.1.1)
Installing EXUpdates (0.11.7)
Installing EXUpdatesInterface (0.5.2)
Installing EXWebBrowser (10.1.1)
Installing Expo (44.0.6)
Installing ExpoLinearGradient (11.0.3)
Installing ExpoModulesCore (0.6.5)
Installing FBLazyVector (0.64.3)
Installing FBReactNativeSpec (0.64.3)
Installing Firebase (7.7.0)
Installing FirebaseAnalytics (7.7.0)
Installing FirebaseCore (7.7.0)
Installing FirebaseCoreDiagnostics (7.9.0)
Installing FirebaseInstallations (7.11.0)
Installing GoogleAppMeasurement (7.7.0)
Installing GoogleDataTransport (8.3.1)
Installing GoogleUtilities (7.8.0)
Installing PromisesObjC (1.2.12)
Installing RCT-Folly (2020.01.13.00)
Installing RCTRequired (0.64.3)
Installing RCTTypeSafety (0.64.3)
Installing RNCAsyncStorage (1.15.17)
Installing RNCMaskedView (0.1.10)
Installing RNCPicker (2.2.1)
Installing RNDateTimePicker (4.0.0)
Installing RNFS (2.20.0)
Installing RNFastImage (8.5.11)
Installing RNGestureHandler (2.1.3)
Installing RNInAppBrowser (3.7.0)
Installing RNReanimated (2.3.3)
Installing RNScreens (3.10.2)
Installing RNSentry (3.4.3)
Installing RNVectorIcons (7.1.0)
Installing React (0.64.3)
Installing React-Core (0.64.3)
Installing React-CoreModules (0.64.3)
Installing React-RCTActionSheet (0.64.3)
Installing React-RCTAnimation (0.64.3)
Installing React-RCTBlob (0.64.3)
Installing React-RCTImage (0.64.3)
Installing React-RCTLinking (0.64.3)
Installing React-RCTNetwork (0.64.3)
Installing React-RCTSettings (0.64.3)
Installing React-RCTText (0.64.3)
Installing React-RCTVibration (0.64.3)
Installing React-callinvoker (0.64.3)
Installing React-cxxreact (0.64.3)
Installing React-jsi (0.64.3)
Installing React-jsiexecutor (0.64.3)
Installing React-jsinspector (0.64.3)
Installing React-perflogger (0.64.3)
Installing React-runtimeexecutor (0.64.3)
Installing ReactCommon (0.64.3)
Installing SDWebImage (5.11.1)
Installing SDWebImageWebPCoder (0.8.5)
Installing Sentry (7.11.0)
Installing UMTaskManagerInterface (7.1.1)
Installing Yoga (1.14.0)
Installing boost-for-react-native (1.63.0)
Installing expo-dev-client (0.8.6)
Installing expo-dev-launcher (0.10.6)
Installing expo-dev-menu (0.9.4)
Installing expo-dev-menu-interface (0.5.3)
Installing glog (0.3.5)
[!] /bin/bash -c 
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
    # Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
    # it's better to rely on platform name as fallback because architecture differs between simulator and device
    if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
        CURRENT_ARCH="x86_64"
    else
        CURRENT_ARCH="armv7"
    fi
fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
    rm test-driver
fi
./configure --host arm-apple-darwin
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF
# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc...  -arch armv7 -isysroot 
checking whether the C compiler works... no
xcodebuild: error: SDK "OurAppName" cannot be located.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk OurAppName -find cc 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "cc", not a developer tool or in PATH
xcodebuild: error: SDK "OurAppName" cannot be located.
xcodebuild: error: SDK "OurAppName" cannot be located.
xcrun: error: unable to lookup item 'Path' in SDK 'OurAppName'
/Users/expo/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-73c24/missing: Unknown `--is-lightweight' option
Try `/Users/expo/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-73c24/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/expo/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-73c24':
configure: error: C compiler cannot create executables
See `config.log' for more details
[stderr] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `CA7BE06DCCD5484C93968A0E` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
pod exited with non-zero code: 1

Anyone an idea?
One answer includes that Xcode Command line tools would not be correctly set. However in my Xcode → Preferences → Locations → Command Line Tools → I see the version and path. Not sure this is relevant since I’m building in the cloud

Anyone help is appreciated

Hi @striveclouddev

How were you building previously?

This part looks weird to me:

xcodebuild: error: SDK "OurAppName" cannot be located.
xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk OurAppName -find cc 2> /dev/null' failed with exit code 16384: (null) (errno=No such file or directory)
xcrun: error: unable to find utility "cc", not a developer tool or in PATH
xcodebuild: error: SDK "OurAppName" cannot be located.
xcodebuild: error: SDK "OurAppName" cannot be located.
xcrun: error: unable to lookup item 'Path' in SDK 'OurAppName'

I wouldn’t have expected to see your app name there. But if I build an Expo SDK 44 app then I do not get all of that glog output. Instead I get:

[...]
Installing expo-dev-menu-interface (0.5.3)
Installing glog (0.3.5)
Generating Pods project
Integrating client project
[...]

Could you elaborate on this part? The expo-env-info output indicates you’re running on Ubuntu, but the above seems to imply you’re on a Mac?

Previously we would use create a testbuild by using fe: expo publish --release-channel staging, but we want to move to eas builds.

Googling this message gave me the impression it had something to do with Xcode Command Line Tools
xcrun: error: unable to find utility "cc", not a developer tool or in PATH
It says Ubuntu because we run our code inside a docker container I initiated the command from inside the container.

I just now retried running eas build --profile development --platform ios outside of the docker container and I get the same issue. This is the expo-env-info outside of the docker container.

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 11.6.8
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn
      npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
    Managers:
      CocoaPods: 1.10.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^44.0.0 => 44.0.6 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    Expo Workflow: managed

expo publish is for publishing a classic OTA update, not for building a standalone app. But I suppose you used expo build:ios previously.

Could you post a link to one of the failed builds? I won’t be able to see the page, but if one of the Expo team members sees this thread then they will probably want the build link so that they can see all of the logs.

OK

Can you confirm that you do not have an ios directory in your app? I know the expo-env-info says it’s “managed”, so there should be no ios directory, but thought I’d ask, just in case.

Also, do you have any config plugins in app.json or any build hooks? Any private dependencies?

If you create a new app with the same SDK version as follows:

yarn create expo-app -t blank@sdk-44

(or npx create-expo-app -t blank@sdk-44)

and then install all of the dependencies that you have in your real app, does it build?

Before trying anything else I upgraded my macOS from v11 to latest and updated Xcode accordingly. This did not change anything and the same error occurred.

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.0
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn
      npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
    Managers:
      CocoaPods: 1.10.1 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    IDEs:
      Xcode: 14.1/14B47b - /usr/bin/xcodebuild
    npmPackages:
      expo: ^44.0.0 => 44.0.6 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.3 => 0.64.3 
      react-native-web: 0.17.1 => 0.17.1 
    npmGlobalPackages:
      expo-cli: 6.0.8
    Expo Workflow: managed

I don’t have an ios folder. I tried once to do the prebuild locally but have removed/reverted all files and folders it created. With or without local prebuild the error remained present.

I only have one plugin plugins: ['sentry-expo'] and commented out the build hook related to sentry while I get the build up and running.

Like you suggested I recreated a new sdk-44 project and added the same dependencies. I get no issues in this new build. An example of that successful build can be found here:

I hoped recreating the project from scratch would give a clue to what the issue could be, but sadly it did not.

OK, can you compare the lock files between the two projects? Or replace the one in your real app with the one from the working app and reinstall your dependencies? I suspect there might be a difference in the versions of one or more dependencies.

I found it had to do with an environment variable inside eas.json. Looks like we both (our app + eas) use PLATFORM_NAME internally.

  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "env": {
        ....
        "PLATFORM_NAME": "OurAppName",
        ...
      }
    },

Renaming PLATFORM_NAME did the trick.

2 Likes

OK, that makes more sense then :slight_smile:

Glad you got it figured out.

EDIT:
I see it’s from here:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.