EAS Build Failing (iOS during 'install pods' stage)

Hello,

I am trying to build by application for the first time using EAS Build and it is failing on me. I am using managed Workflow with Expo SDK 42. It fails for both Android and iOS but for now I am trying to fix the iOS issue. In the ‘install pods’ stage I get this error:

I’ve tried doing what it suggests at the bottom: " - 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 update value of “cache.key” field in the eas.json to invalidate the cache."

I did not see any difference. Not sure if I am formatting this correctly but this is my eas.json file:

  "build": {
    "release": {
      "cache": {
        "key": "invalidate"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    }
  },
  "submit": {
    "release": {}
  }
}

My package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@google-cloud/tasks": "^2.3.6",
    "@react-native-async-storage/async-storage": "~1.15.0",
    "@react-native-community/checkbox": "^0.5.5",
    "@react-native-community/datetimepicker": "3.5.2",
    "@react-native-community/masked-view": "0.1.10",
    "@react-native-picker/picker": "1.16.1",
    "@react-navigation/bottom-tabs": "^5.11.7",
    "@react-navigation/material-top-tabs": "^5.3.14",
    "@react-navigation/native": "^5.8.2",
    "@react-navigation/stack": "^5.11.1",
    "@stripe/stripe-react-native": "0.1.4",
    "base-64": "^1.0.0",
    "expo": "^42.0.0",
    "expo-constants": "~11.0.1",
    "expo-image-picker": "~10.2.2",
    "expo-notifications": "~0.12.3",
    "expo-permissions": "~12.1.1",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "firebase": "8.2.3",
    "firebase-admin": "^9.4.2",
    "lodash.filter": "^4.6.0",
    "native-base": "^2.15.2",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
    "react-native-chart-kit": "^6.11.0",
    "react-native-elements": "^3.4.2",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.3",
    "react-native-payments": "^0.8.4",
    "react-native-reanimated": "~2.2.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-svg": "12.1.1",
    "react-native-switch-selector": "^2.1.4",
    "react-native-tab-view": "^2.16.0",
    "react-native-web": "~0.13.12",
    "styled-components": "^5.3.1",
    "styled-system": "^5.1.5"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}

Why are you using both react-native-payments and @stripe/stripe-react-native? they rely on different versions of the iOS Stripe library, so you can’t have them both installed (at least those versions)

1 Like

Hmm. I’m not sure. I must’ve installed it long before I started using stripe. I wasn’t actually using react-native-payments in my source code so I didn’t think it was an issue but uninstalling it allowed the iOS and Android build to work successfully!

1 Like

Hi, I have nearly the exact same issue and didn’t want to raise a new topic for it. Here is my error response and my package.json. I haven’t used react-native-payments before in the project so the solution here doesn’t apply to me.

Installing pods
Installing unimodules:
 expo-application@3.2.0 from ../node_modules/expo-application/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-device@3.3.0 from ../node_modules/expo-device/ios
 expo-error-recovery@2.2.0 from ../node_modules/expo-error-recovery/ios
 expo-file-system@11.1.3 from ../node_modules/expo-file-system/ios
 expo-firebase-analytics@4.1.0 from ../node_modules/expo-firebase-analytics/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-image-loader@2.2.0 from ../node_modules/expo-image-loader/ios
 expo-keep-awake@9.2.0 from ../node_modules/expo-keep-awake/ios
 expo-linear-gradient@9.2.0 from ../node_modules/expo-linear-gradient/ios
 expo-modules-core@0.2.0 from ../node_modules/expo-modules-core/ios
 expo-notifications@0.12.3 from ../node_modules/expo-notifications/ios
 expo-secure-store@10.2.0 from ../node_modules/expo-secure-store/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
 expo-web-browser@9.2.0 from ../node_modules/expo-web-browser/ios
 unimodules-app-loader@2.2.0 from ../node_modules/unimodules-app-loader/ios
 unimodules-core@7.1.2 from ../node_modules/@unimodules/core/ios
 unimodules-react-native-adapter@6.3.9 from ../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
Auto-linking React Native modules for target `Roundups`: BVLinearGradient, RNCMaskedView, RNGestureHandler, RNReanimated, RNSVG, RNScreens, react-native-safe-area-context, react-native-webview, and stripe-react-native
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 "Stripe":
  In snapshot (Podfile.lock):
    Stripe (= 21.8.1, ~> 21.8.1)
  In Podfile:
    stripe-react-native (from `../node_modules/@stripe/stripe-react-native`) was resolved to 0.1.4, which depends on
      Stripe (~> 21.6.0)
You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Stripe` inside your development pod `stripe-react-native`.
   You should run `pod update Stripe` to apply changes you've made.
[stderr] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `56FB6A06496A42EFAEA85963` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
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.

Package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@bugsnag/expo": "^7.12.0",
    "@expo-google-fonts/work-sans": "^0.1.0",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/bottom-tabs": "^5.11.7",
    "@react-navigation/native": "^5.7.5",
    "@react-navigation/stack": "^5.9.2",
    "@stripe/stripe-react-native": "0.1.4",
    "date-fns": "^2.16.1",
    "expo": "^42.0.0",
    "expo-app-loading": "^1.0.1",
    "expo-application": "~3.2.0",
    "expo-device": "~3.3.0",
    "expo-firebase-analytics": "~4.1.0",
    "expo-linear-gradient": "~9.2.0",
    "expo-linking": "~2.3.1",
    "expo-notifications": "~0.12.3",
    "expo-secure-store": "~10.2.0",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.2",
    "expo-web-browser": "~9.2.0",
    "radio-buttons-react-native": "^1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
    "react-native-animatable": "^1.3.3",
    "react-native-circular-progress": "^1.3.6",
    "react-native-collapsible": "^1.6.0",
    "react-native-dropdown-picker": "^5.1.28",
    "react-native-elements": "^2.3.2",
    "react-native-expo-viewport-units": "0.0.8",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-paper": "^4.2.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-svg": "12.1.1",
    "react-native-web": "~0.13.12",
    "react-native-webview": "11.6.2",
    "react-native-youtube-iframe": "^2.0.1",
    "sentry-expo": "^4.0.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0"
  },
  "private": true
}

I removed expo-constants but it didn’t help.

Any advice is appreciated.

try the above suggestion from the error message you shared