expo / eas-cli

Fastest way to build, submit, and update iOS and Android apps
https://docs.expo.dev/eas/
MIT License
770 stars 81 forks source link

EAS iOS build failed: Compatible version of some pods could not be resolved. Fully Managed Workflow #774

Closed durgesh2007 closed 2 years ago

durgesh2007 commented 2 years ago

Summary

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

Tried as per above error message said cache.key to invalid or any string in eas.json file No fix yet, need a more clear idea about this error.

eas.json file:

{ "build": { "preview": { "ios": { "node": "16.13.0", "simulator": true, "cache": { "key": "181121" } } }, "release": {}, "release-stage": { "ios": { "releaseChannel": "stage", "image": "latest", "cache": { "disabled": true, "key": "17112021" } } }, "cli": { "version": ">= 0.35.0", "requireCommit": true } }

Environment

C:_Projects\XXX>expo diagnostics

Expo CLI 4.12.10 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.18.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6626763 Expo Workflow: managed

C:_Projects\XXX>eas diagnostics

EAS CLI 0.36.1 environment info: System: OS: Windows 10 10.0.19042 Binaries: Node: 14.18.0 - C:\Program Files\nodejs\node.EXE npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD Utilities: Git: 2.27.0.

Error output

Installing pods Installing unimodules: expo-app-auth@10.2.2 from ../node_modules/expo-app-auth/ios expo-application@3.1.2 from ../node_modules/expo-application/ios expo-constants@10.1.3 from ../node_modules/expo-constants/ios expo-device@3.2.0 from ../node_modules/expo-device/ios expo-error-recovery@2.1.0 from ../node_modules/expo-error-recovery/ios expo-facebook@11.0.5 from ../node_modules/expo-facebook/ios expo-file-system@11.0.2 from ../node_modules/expo-file-system/ios expo-font@9.1.0 from ../node_modules/expo-font/ios expo-image-loader@2.1.1 from ../node_modules/expo-image-loader/ios expo-keep-awake@9.1.2 from ../node_modules/expo-keep-awake/ios expo-localization@10.1.0 from ../node_modules/expo-localization/ios expo-location@12.0.4 from ../node_modules/expo-location/ios expo-modules-core@0.4.8 from ../node_modules/expo-modules-core/ios expo-network@3.1.1 from ../node_modules/expo-network/ios expo-notifications@0.11.6 from ../node_modules/expo-notifications/ios expo-permissions@12.0.1 from ../node_modules/expo-permissions/ios expo-splash-screen@0.13.5 from ../node_modules/expo-app-loading/node_modules/expo-splash-screen/ios expo-structured-headers@1.0.1 from ../node_modules/expo-structured-headers/ios expo-updates@0.5.5 from ../node_modules/expo-updates/ios unimodules-app-loader@2.1.0 from ../node_modules/unimodules-app-loader/ios unimodules-barcode-scanner-interface@6.1.0 from ../node_modules/unimodules-barcode-scanner-interface/ios unimodules-camera-interface@6.1.0 from ../node_modules/unimodules-camera-interface/ios unimodules-constants-interface@6.1.0 from ../node_modules/unimodules-constants-interface/ios unimodules-core@7.1.2 from ../node_modules/@unimodules/core/ios unimodules-face-detector-interface@6.1.0 from ../node_modules/unimodules-face-detector-interface/ios unimodules-file-system-interface@6.1.0 from ../node_modules/unimodules-file-system-interface/ios unimodules-font-interface@6.1.0 from ../node_modules/unimodules-font-interface/ios unimodules-image-loader-interface@6.1.0 from ../node_modules/unimodules-image-loader-interface/ios unimodules-permissions-interface@6.1.0 from ../node_modules/unimodules-permissions-interface/ios unimodules-react-native-adapter@6.2.2 from ../node_modules/@unimodules/react-native-adapter/ios unimodules-sensors-interface@6.1.0 from ../node_modules/unimodules-sensors-interface/ios unimodules-task-manager-interface@6.1.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-modules-core, expo-splash-screen Auto-linking React Native modules for target XXXXXXXX: RNCAsyncStorage, RNCMaskedView, RNGestureHandler, RNReanimated, RNSVG, RNScreens, RNVectorIcons, lottie-react-native, react-native-geolocation-service, react-native-maps, react-native-safe-area-context, react-native-view-shot, react-native-viewpager, 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 "ExpoModulesCore": In Podfile: ExpoModulesCore (from ../node_modules/expo-modules-core/ios) Specs satisfying the ExpoModulesCore (from../node_modules/expo-modules-core/ios) dependency were found, but they required a higher minimum deployment target. [stderr] [!] <PBXResourcesBuildPhase UUID=XXXXXXXXXXXXXXX> attempted to initialize an object with an unknown UUID. XXXXXXXXXXXXXXXX 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:

Reproducible demo or steps to reproduce from a blank project

https://github.com/durgesh2007/sample-facebook-login-code

dsokal commented 2 years ago

Hi @durgesh2007, Thanks for reporting.

  1. You don't need to change the cache key if you disabled cache entirely:
    "cache": {
    "disabled": true,
    "key": "17112021" // <- this does not make sense with the line above
    }
  2. Could you please share the build details page URL?
  3. The repo you shared (https://github.com/durgesh2007/sample-facebook-login-code) is empty.
durgesh2007 commented 2 years ago

Hi @dsokal, Thanks for the response,

I have created a build successfully 2 months ago there is no issue, after a few fixes now I'm trying to make a build then gives me the above error.

in 2 months ago build did not set any cache flag, after getting this issue trying to set flags for clearing cache.

Build cmd: eas build --profile release-stage --platform ios --clear-cache

Previous eas.json file(2 months ago): { "builds": { "ios": { "release": { "buildType": "release" }, "release-stage": { "buildType": "release", "releaseChannel": "stage" }, "development": { "buildType": "development-client", "distribution": "internal", "enterpriseProvisioning": "adhoc", "autoIncrement": true, "image": "latest" } } } }

Now eas.json file: { "build": { "preview": { "ios": { "simulator": true, "cache": { "key": "181121" } } }, "release": {}, "release-stage": { "ios": { "releaseChannel": "stage", "cache": { "disabled": true } } }, "development": { "ios": { "enterpriseProvisioning": "adhoc", "autoIncrement": true, "image": "latest", "developmentClient": true, "distribution": "internal" } } }, "cli": { "version": ">= 0.35.0", "requireCommit": true } }

package.json file

{ "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "build:android": "expo build:android", "test": "jest --watch", "test:update": "jest -u", "test:coverage": "jest --coverage", "test:ci": "jest --ci --coverage --output=html --outputPath=./report.html", "web": "expo start --web", "eject": "expo eject" }, "jest": { "setupFilesAfterEnv": [ "/setupTests.js" ], "reporters": [ "default", [ "./node_modules/jest-html-reporter", { "pageTitle": "Test Report" } ] ], "verbose": true, "preset": "jest-expo", "collectCoverage": true, "coverageReporters": [ "json", "html" ], "moduleFileExtensions": [ "ts", "tsx", "js", "jsx" ] }, "dependencies": { "@apollo/client": "^3.3.11", "@expo-google-fonts/roboto": "^0.1.0", "@react-native-async-storage/async-storage": "^1.14.1", "@react-native-community/masked-view": "0.1.10", "@react-navigation/bottom-tabs": "^5.11.8", "@react-navigation/material-bottom-tabs": "^5.3.14", "@react-navigation/material-top-tabs": "^5.3.14", "@react-navigation/native": "^5.9.2", "@react-navigation/stack": "^5.14.2", "@stripe/stripe-react-native": "0.1.1", "@testing-library/react": "^11.2.6", "@testing-library/react-native": "^7.2.0", "@ungap/global-this": "^0.4.4", "array-flat-polyfill": "^1.0.1", "axios": "^0.23.0", "date-fns": "^2.25.0", "expo": "~41.0.1", "expo-app-loading": "^1.0.1", "expo-constants": "^10.0.1", "expo-device": "~3.2.0", "expo-facebook": "~11.0.5", "expo-google-app-auth": "^8.1.4", "expo-linking": "~2.2.3", "expo-localization": "~10.1.0", "expo-location": "~12.0.4", "expo-network": "~3.1.1", "expo-notifications": "^0.11.6", "expo-permissions": "~12.0.1", "expo-splash-screen": "~0.10.2", "expo-status-bar": "~1.0.3", "graphql": "^15.5.0", "i18n-js": "^3.8.0", "libphonenumber-js": "^1.9.19", "lottie-react-native": "3.5.0", "moment": "^2.29.1", "react": "16.13.1", "react-dom": "16.13.1", "react-hook-form": "^6.15.4", "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz", "react-native-app-intro-slider": "^4.0.4", "react-native-geocoding": "^0.5.0", "react-native-geolocation-service": "^5.3.0-beta.1", "react-native-gesture-handler": "^1.10.1", "react-native-google-places-autocomplete": "^2.4.1", "react-native-maps": "^0.27.1", "react-native-maps-directions": "^1.8.0", "react-native-markdown-display": "^7.0.0-alpha.2", "react-native-masked-text": "^1.13.0", "react-native-modal": "^11.9.0", "react-native-pager-view": "5.0.12", "react-native-paper": "^4.8.1", "react-native-range-slider-expo": "^1.3.7", "react-native-reanimated": "~2.1.0", "react-native-safe-area-context": "3.2.0", "react-native-screens": "~3.0.0", "react-native-slider": "^0.11.0", "react-native-step-indicator": "^1.0.3", "react-native-svg": "12.1.0", "react-native-tab-view": "^3.0.0", "react-native-vector-icons": "^8.1.0", "react-native-view-shot": "^3.1.2", "react-native-web": "^0.16.0" }, "devDependencies": { "@babel/core": "~7.9.0", "@types/jasmine": "^3.6.3", "@types/jest": "^26.0.24", "@types/node": "^14.14.28", "@types/react": "~16.9.35", "@types/react-dom": "~16.9.8", "@types/react-native": "~0.63.2", "@types/react-native-vector-icons": "^6.4.6", "@types/react-test-renderer": "^17.0.1", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", "jest-expo": "^40.0.2", "jest-html-reporter": "^3.3.0", "react-test-renderer": "^17.0.1", "typescript": "~4.0.0" }, "private": true }

pls, let me know if you need more details. I'm struggling with this issue since last week.

dsokal commented 2 years ago

Could you please share the build details page URL?

durgesh2007 commented 2 years ago

No, actually it's private repo.

dsokal commented 2 years ago

Sorry, we can't help you if you don't provide a reproducible demo or steps to reproduce from a blank project.

durgesh2007 commented 2 years ago

Hi @dsokal,

  1. Please use the following link to the Reproducible demo or steps to reproduce from a blank project: https://github.com/durgesh2007/sample-facebook-login-code

  2. command: eas build --profile release-stage --platform ios --clear-cache

  3. Please see my attached screenshots:

Screenshot (338) Screenshot (339) Screenshot (340) Screenshot (341) Screenshot (342) Screenshot (343)

brentvatne commented 2 years ago

you are using expo sdk 41 with versions of expo packages that are incompatible with it. run expo doctor to see information about that.

also, what you provided is not a "minimal" reproducible example. https://stackoverflow.com/help/minimal-reproducible-example

brentvatne commented 2 years ago

hi @durgesh2007 - it turns out this was on our end. we did not enforce a version of expo-google-app-auth and so your app uses an incompatible version for sdk 41. please change the expo-google-app-auth version to exactly 8.1.7 and run your build again. this is not an issue in sdk 42 and higher.

durgesh2007 commented 2 years ago

Dear @brentvatne, Thank you so much, after updating the SDK 42, now the build is generated successfully....!