eas-cli: iOS-EAS build fail when .xcode.env.local is included in upload

Build/Submit details page URL

https://expo.dev/accounts/ericvicenti/projects/zerve/builds/65d3206b-3194-420f-9f7e-f9643245d93b

Summary

After upgrading from Expo 44 to 46, iOS build error, only in EAS. I can run in ‘Release’ and/or create an archive locally with Xcode without problems

Let me know how I can troubleshoot or help 😁

Managed or bare?

bare

Environment

eas-cli@0.58.0 expo@46.0.2

$ npx expo-env-info 

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
      Watchman: 2022.05.16.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
      Android SDK:
        API Levels: 29, 30, 31, 32
        Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0, 33.0.0
        System Images: android-29 | ARM 64 v8a, android-29 | Google APIs ARM 64 v8a, android-29 | Google Play ARM 64 v8a, android-32 | Google APIs ARM 64 v8a
    IDEs:
      Android Studio: 2020.3 AI-203.7717.56.2031.7935034
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    Expo Workflow: bare

$ expo doctor
Expected package expo-modules-autolinking@~0.10.1
Found invalid:
  expo-modules-autolinking@0.5.5
  (for more info, run: npm why expo-modules-autolinking)
Expected package @expo/config-plugins@^5.0.0
Found invalid:
  @expo/config-plugins@4.1.4
  @expo/config-plugins@4.1.5
  @expo/config-plugins@4.0.18
  (for more info, run: npm why @expo/config-plugins)
Expected package @expo/prebuild-config@^5.0.1
Found invalid:
  @expo/prebuild-config@3.1.6
  (for more info, run: npm why @expo/prebuild-config)
Some dependencies are incompatible with the installed expo package version:
 - react - expected version: 18.0.0 - actual version installed: 18.2.0
 - react-dom - expected version: 18.0.0 - actual version installed: 18.2.0
 - react-native-web - expected version: ~0.18.7 - actual version installed: 0.18.6
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo doctor --fix-dependencies,
or install individual packages by running expo install [package-name ...]

Error output

▸ The following build commands failed:
▸ 	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'ExpoModulesCore' from project 'Pods')
▸ 	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/expo/Library/Developer/Xcode/DerivedData/Zerve-ffuibjkvfalqlegujbupigxegccr/Build/Intermediates.noindex/ArchiveIntermediates/Zerve/IntermediateBuildFilesPath/Pods.build/Release-iphoneos/FBReactNativeSpec.build/Script-46EB2E000138B0.sh (in target 'FBReactNativeSpec' from project 'Pods')
▸ (2 failures)
2022-08-10 03:13:10.439 xcodebuild[3733:13224] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-08-10 03:13:10.439 xcodebuild[3733:13224] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-08-10 03:13:10.511 xcodebuild[3733:13224] XType: failed to connect - Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.fonts was invalidated: failed at lookup with error 3 - No such process.}
2022-08-10 03:13:10.511 xcodebuild[3733:13224] Font server protocol version mismatch (expected:5 got:0), falling back to local fonts
2022-08-10 03:13:10.511 xcodebuild[3733:13224] XType: unable to make a connection to the font daemon!
2022-08-10 03:13:10.511 xcodebuild[3733:13224] XType: XTFontStaticRegistry is enabled as fontd is not available.
** ARCHIVE FAILED **

Reproducible demo or steps to reproduce from a blank project

Sorry, I experienced this in a real-world project with a bunch of dependencies and I don’t have time to isolate it. I know I shouldn’t “simply link to my entire project” but here it is 😅

This should be reproducible with yarn && yarn build:ios:internal, (specifically cd apps/zoo-web && yarn eas build --platform=ios --profile=internal)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I ran into a similar issue even in locally, only when I build for production. what can I do?

EAS Cloud

Using Expo modules
Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.13.2/bin/node
[stderr] error Failed to load configuration of your project.
[!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.
'.
 #  from /Users/expo/workingdir/build/ios/Podfile:14
 #  -------------------------------------------
 #    use_expo_modules!
 >    config = use_native_modules!
 #  
 #  -------------------------------------------
pod exited with non-zero code: 1

eas locally

[INSTALL_PODS] Installing pods
[INSTALL_PODS] Using Expo modules
[INSTALL_PODS] Auto-generating `.xcode.env.local` with $NODE_BINARY=/Users/giacomoalonzi/.nvm/versions/node/v16.13.1/bin/node
[INSTALL_PODS] error Failed to load configuration of your project.
[INSTALL_PODS] [!] Invalid `Podfile` file: 783: unexpected token at 'info Run CLI with --verbose flag for more details.
[INSTALL_PODS] '.
[INSTALL_PODS] 
[INSTALL_PODS]  #  from /private/var/folders/86/hpx16y154yvd6kndrx_nxrqc0000gn/T/eas-build-local-nodejs/4bd6849f-e930-4ff9-81d9-1c1246785d94/build/ios/Podfile:14
[INSTALL_PODS]  #  -------------------------------------------
[INSTALL_PODS]  #    use_expo_modules!
[INSTALL_PODS]  >    config = use_native_modules!
[INSTALL_PODS]  #  
[INSTALL_PODS]  #  -------------------------------------------
[INSTALL_PODS] 
Error: pod exited with non-zero code: 1

expo env info

 expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.6
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
      Yarn: 1.22.19 - ~/.yarn/bin/yarn
      npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
      Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - /Users/x/.rvm/gems/ruby-2.7.2/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    IDEs:
      Android Studio: 2021.1 AI-211.7628.21.2111.8092744
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~46.0.9 => 46.0.10 
      react: 18.0.0 => 18.0.0 
      react-dom: 18.0.0 => 18.0.0 
      react-native: 0.69.5 => 0.69.5 
      react-native-web: ~0.18.7 => 0.18.9 
    npmGlobalPackages:
      eas-cli: 2.1.0
      expo-cli: 6.0.0
    Expo Workflow: bare```

thanks for help

I can confirm that expo prebuild creates the .xcode.env.local file for me, probably because it runs pod install, as you said

Makes sense that you wouldn’t repro it, because it is .gitignore’d

I added .xcode.env.local to the .easignore and am re-running the build here: https://expo.dev/accounts/ericvicenti/projects/zerve/builds/58be3fbf-5f54-44ee-b232-4d03e1d1d6a4

Having the same problem as giacomoalonzi, always breaks on line 783 of “Podfile” with use_expo_modiles! and config = use_native_modules!

for me was a NODE_ENV=production that broke the build. I removed that from my env and then all worked. Kim on discord told me that:

NODE_ENV=production causes devDependencies to be not installed
The side effect is that you're missing everything that's needed to bundle/build your app

Locally I reverted to xcode 13.4, on 14 I got others strange errors

The solution that we’re going to implement to avoid issues like this is to delete the .xcode.env.local just after cloning the project on EAS Build. The file will be auto-generated in the pod install phase. We’ll add a separate build phase (marked with a warning sign) explaining that this file shouldn’t have been uploaded to EAS.