EAS build fails all the time, expo build:ios works

I’m getting the following errors in the CLI when I do ‘eas build --platform iOS’. Any help/tips would be greatly appreciated.

Build failed: Compatible version of some pods could not be resolved.
You are seeing this error because either:

  • Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add “cache.key” field (it can be set to any value) in eas.json to invalidate the cache.
  • Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

Here is my expo diagnostics.

Expo CLI 4.12.0 environment info:
System:
OS: macOS 11.6
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.9.1 - /opt/homebrew/bin/node
Yarn: 1.22.11 - /opt/homebrew/bin/yarn
npm: 7.21.1 - /opt/homebrew/bin/npm
Watchman: 2021.09.06.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.10.2 - /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.0/13A233 - /usr/bin/xcodebuild
npmPackages:
expo: ~42.0.1 => 42.0.3
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
npmGlobalPackages:
expo-cli: 4.10.0
Expo Workflow: managed

I’m getting a consistent build error when I use EAS build. In the “Install Pods” section, here are the error messages from the build dashboard.

Installing pods
Installing unimodules:
 expo-analytics-segment@10.2.1 from ../node_modules/expo-analytics-segment/ios
 expo-app-auth@10.2.2 from ../node_modules/expo-app-auth/ios
 expo-apple-authentication@3.2.1 from ../node_modules/expo-apple-authentication/ios
 expo-application@3.2.0 from ../node_modules/expo-application/ios
 expo-barcode-scanner@10.2.2 from ../node_modules/expo-barcode-scanner/ios
 expo-blur@9.0.3 from ../node_modules/expo-blur/ios
 expo-camera@11.2.2 from ../node_modules/expo-camera/ios
 expo-constants@11.0.2 from ../node_modules/react-native-unimodules/node_modules/expo-constants/ios
 expo-crypto@9.2.0 from ../node_modules/expo-crypto/ios
 expo-error-recovery@2.2.0 from ../node_modules/expo-error-recovery/ios
 expo-facebook@11.3.1 from ../node_modules/expo-facebook/ios
 expo-file-system@11.1.3 from ../node_modules/expo-file-system/ios
 expo-firebase-core@3.1.0 from ../node_modules/expo-firebase-core/ios
 expo-font@9.2.1 from ../node_modules/expo-font/ios
 expo-haptics@10.1.0 from ../node_modules/expo-haptics/ios
 expo-image-loader@2.2.0 from ../node_modules/expo-image-loader/ios
 expo-image-picker@10.2.2 from ../node_modules/expo-image-picker/ios
 expo-keep-awake@9.2.0 from ../node_modules/expo-keep-awake/ios
 expo-modules-core@0.2.0 from ../node_modules/expo-modules-core/ios
 expo-permissions@12.1.1 from ../node_modules/expo-permissions/ios
 expo-screen-orientation@3.2.1 from ../node_modules/expo-screen-orientation/ios
 expo-splash-screen@0.11.4 from ../node_modules/expo-splash-screen/ios
 expo-structured-headers@1.1.1 from ../node_modules/expo-structured-headers/ios
 expo-updates@0.8.5 from ../node_modules/expo-updates/ios
 expo-updates-interface@0.2.2 from ../node_modules/expo-updates-interface/ios
 unimodules-app-loader@2.2.0 from ../node_modules/unimodules-app-loader/ios
 unimodules-core@7.1.2 from ../node_modules/react-native-unimodules/node_modules/@unimodules/core/ios
 unimodules-react-native-adapter@6.3.8 from ../node_modules/react-native-unimodules/node_modules/@unimodules/react-native-adapter/ios
 unimodules-task-manager-interface@6.2.0 from ../node_modules/unimodules-task-manager-interface/ios

Found some duplicated unimodule packages. Installed the ones with the highest version number.
Make sure following dependencies of your project are resolving to one specific version:
 expo-constants, unimodules-react-native-adapter, unimodules-core
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `MYNTD`: RNCAsyncStorage, RNCMaskedView, RNFBApp, RNFBAuth, RNFBFirestore, RNGestureHandler, RNReanimated, RNSVG, RNScreens, RNVectorIcons, react-native-fetch-blob, react-native-file-access, react-native-safe-area-context, and react-native-webview
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/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.2 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.2

[!] CocoaPods could not find compatible versions for pod "React/Core":
  In Podfile:
    react-native-fetch-blob (from `../node_modules/react-native-fetch-blob`) was resolved to 0.10.6, which depends on
      React/Core

None of your spec sources contain a spec satisfying the dependency: `React/Core`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

[stderr]

[!] NPM package '@react-native-firebase/firestore' depends on '@react-native-firebase/app' v12.8.0 but found v12.7.2, this might cause build issues or runtime crashes.

[stderr]


[stderr]

[!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `8F25849E341E4DFBABE36272` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.

[stderr]


[stderr]

[!] NPM package '@react-native-firebase/firestore' depends on '@react-native-firebase/app' v12.8.0 but found v12.7.2, this might cause build issues or runtime crashes.
Error: Compatible version of some pods could not be resolved.
You are seeing this error because either:
  - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add "cache.key" field (it can be set to any value) in eas.json to invalidate the cache.
  - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

the error message tells you what to do:

Error: Compatible version of some pods could not be resolved.
You are seeing this error because either:
  - Versions in the Podfile.lock cached by EAS do not match required values for some of the libraries, it can be triggered when upgrading Expo SDK or any other library with native code. To fix that add "cache.key" field (it can be set to any value) in eas.json to invalidate the cache.
  - Some of your npm packages have native code that depend on different versions of the same pod. Please see logs for more info.

I suppose one could also do the following?

eas build --platform=ios --clear-cache

I don’t have a Podfile.lock nor an iOS directory because I’m in fully managed mode. I’ve tried to update the cache.key field, but it’s still showing the same problem. Someone else have suggested wiping out the project and restarting, and I’ve tried that and still seeing the same results.

I guess my main question is why would ‘expo build’ work, but not ‘eas build’? Just trying to understand/reconcile the difference. Thanks!

eas build will cache your Podfile.lock to help you get consistent results across builds. it is generated and used on EAS Build. we cache it because you would typically commit this to your source control but because Podfile.lock never exists on your machine you don’t get a chance to do that.

I guess my main question is why would ‘expo build’ work, but not ‘eas build’? Just trying to understand/reconcile the difference. Thanks!

they are completely different build systems. the migrating from “expo build” docs gives some context on that, and there is more info in these blog posts:

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