expo / eas-cli

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

Error/warning on failing build: "Can't merge pod_target_xcconfig for pod targets" #2434

Open Nantris opened 5 months ago

Nantris commented 5 months ago

Build/Submit details page URL

No response

Summary

EAS build that has no issues with npx expo-doctor prints this (non-fatal?) error/warning during builds. Although it doesn't seem fatal, the build is failing later in the process and I can't be sure this is unrelated to the failure.

Managed or bare?

Managed

Environment

expo-env-info 1.2.0 environment info: System: OS: macOS 14.5 Shell: 5.9 - /bin/zsh Binaries: Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.0/bin/yarn npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm Managers: CocoaPods: 1.15.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5 IDEs: Xcode: 15.4/15F31d - /usr/bin/xcodebuild npmGlobalPackages: eas-cli: 10.0.0 expo-cli: 6.3.10 Expo Workflow: managed

✔ Check Expo config for common issues ✔ Check package.json for common issues ✔ Check dependencies for packages that should not be installed directly ✔ Check for common project setup issues ✔ Check for issues with metro config ✔ Check npm/ yarn versions ✔ Check Expo config (app.json/ app.config.js) schema ✔ Check native tooling versions ✔ Check that packages match versions required by installed Expo SDK ✔ Check for legacy global CLI installed locally ✔ Check that native modules do not use incompatible support packages ✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

Error output

[INSTALL_PODS] [!] [Codegen] warn: using experimental new codegen integration
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `D5A51ACEDD5444D6B50BA983` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS] [!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.
[INSTALL_PODS] [!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.
[INSTALL_PODS] [!] hermes-engine has added 1 script phase. Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.

Reproducible demo or steps to reproduce from a blank project

Unknown

jmarsh24 commented 5 months ago

+1

adamstl1997 commented 5 months ago

+1

Jules-Astier commented 4 months ago

I've also had this issue

aimeeaidanu commented 4 months ago

+1

Nantris commented 4 months ago

To everyone commenting +1 and the like, it would do you much more good to:

  1. Add a thumbs-up (maintainers can organize issues by their number of reaction emojis)
  2. Add a meaningful comment with your findings, or otherwise subscribe to notifications on the right-hand-side to avoid cluttering the thread
abhishek-pavesoft commented 4 months ago

Hey did you find a solution to this? I'm also facing this issue.

aimeeaidanu commented 4 months ago

Yeah I fixed it by updating expo-cli

abhishek-pavesoft commented 4 months ago

@aimeeaidanu I also resolved it a few minutes ago by changing iOS target version from 13.0 to 13.4.

Nantris commented 4 months ago

@aimeeaidanu to what version? I think expo-cli upgrades can change the iOS target version (though generally only for major releases?)

I was on the latest at the time when I filed this.

adamwett commented 4 months ago

Yeah I fixed it by updating expo-cli

Wasn't this replaced by npx expo?

nbonatsakis commented 4 months ago

I'm seeing this as well. Clean expo-doctor, expo 51, and am using iOS deployment target of 17.0 (because I have some native code that needs this as min version).

ChrisWiles commented 3 months ago

I see the exact msg, not sure if breaks anything tho. App seems to work fine.

  "dependencies": {
    "@amplitude/analytics-react-native": "1.4.9",
    "@apollo/client": "3.11.3",
    "@casl/ability": "6.7.1",
    "@datadog/mobile-react-native": "2.4.3",
    "@datadog/mobile-react-native-apollo-client": "2.4.3",
    "@datadog/mobile-react-navigation": "2.4.3",
    "@expo/fingerprint": "0.10.2",
    "@expo/vector-icons": "14.0.2",
    "@fortawesome/fontawesome-svg-core": "6.5.2",
    "@fortawesome/pro-regular-svg-icons": "6.5.2",
    "@fortawesome/pro-solid-svg-icons": "6.5.2",
    "@fortawesome/react-native-fontawesome": "0.3.0",
    "@fullstory/react-native": "1.7.1",
    "@gluestack-style/babel-plugin-styled-resolver": "1.0.7",
    "@gluestack-style/react": "1.0.57",
    "@gluestack-ui/config": "1.1.20",
    "@gluestack-ui/themed": "1.1.44",
    "@intercom/intercom-react-native": "7.2.0",
    "@react-native-async-storage/async-storage": "1.24.0",
    "@react-native-community/datetimepicker": "8.2.0",
    "@react-native-community/netinfo": "11.3.2",
    "@react-native-community/slider": "4.5.2",
    "@react-native-masked-view/masked-view": "0.3.1",
    "@react-native-picker/picker": "2.7.7",
    "@react-native-segmented-control/segmented-control": "2.5.2",
    "@react-navigation/bottom-tabs": "6.6.1",
    "@react-navigation/devtools": "6.0.27",
    "@react-navigation/drawer": "6.7.2",
    "@react-navigation/native": "6.1.18",
    "@react-navigation/stack": "6.4.1",
    "@reduxjs/toolkit": "2.2.7",
    "@sentry/react-native": "5.27.0",
    "@shopify/flash-list": "1.7.0",
    "@shopify/restyle": "1.8.0",
    "amazon-cognito-identity-js": "6.3.12",
    "apollo-link-debounce": "3.0.0",
    "apollo3-cache-persist": "0.15.0",
    "awesome-debounce-promise": "2.1.0",
    "aws-amplify": "5.3.11",
    "babel-plugin-transform-inline-environment-variables": "0.4.4",
    "big.js": "6.2.1",
    "color": "4.2.3",
    "cuid": "2.1.8",
    "dotenv": "16.4.5",
    "email-addresses": "5.0.0",
    "expo": "51.0.24",
    "expo-application": "5.9.1",
    "expo-asset": "10.0.10",
    "expo-barcode-scanner": "13.0.1",
    "expo-camera": "15.0.14",
    "expo-clipboard": "6.0.3",
    "expo-constants": "16.0.2",
    "expo-dev-client": "4.0.21",
    "expo-device": "6.0.2",
    "expo-font": "12.0.9",
    "expo-image-manipulator": "12.0.5",
    "expo-image-picker": "15.0.7",
    "expo-linking": "6.3.1",
    "expo-localization": "15.0.3",
    "expo-notifications": "0.28.15",
    "expo-screen-orientation": "7.0.5",
    "expo-splash-screen": "0.27.5",
    "expo-status-bar": "1.12.1",
    "expo-updates": "0.25.21",
    "expo-web-browser": "13.0.3",
    "formik": "2.4.6",
    "fuse.js": "6.6.2",
    "graphql": "16.9.0",
    "graphql-ws": "5.16.0",
    "highlight-words-core": "1.2.2",
    "i18next": "23.12.2",
    "jest-circus": "29.7.0",
    "jotai": "2.9.1",
    "jwt-decode": "3.1.2",
    "lodash": "4.17.21",
    "luxon": "3.5.0",
    "metro-react-native-babel-transformer": "0.77.0",
    "moment": "2.30.1",
    "native-base": "3.4.28",
    "query-string": "7.1.3",
    "react": "18.3.1",
    "react-i18next": "15.0.0",
    "react-native": "0.74.5",
    "react-native-animatable": "1.4.0",
    "react-native-app-intro-slider": "4.0.4",
    "react-native-config": "1.5.3",
    "react-native-confirmation-code-field": "7.4.0",
    "react-native-device-info": "11.1.0",
    "react-native-dialog": "9.3.0",
    "react-native-dotenv": "3.4.11",
    "react-native-gesture-handler": "2.18.1",
    "react-native-get-random-values": "1.11.0",
    "react-native-hide-with-keyboard": "1.2.1",
    "react-native-image-viewing": "0.1.8",
    "react-native-keyboard-aware-scroll-view": "0.9.5",
    "react-native-keychain": "8.2.0",
    "react-native-modalize": "2.1.1",
    "react-native-open-maps": "0.4.3",
    "react-native-pager-view": "6.3.3",
    "react-native-phone-number-input": "2.1.0",
    "react-native-reanimated": "3.14.0",
    "react-native-safe-area-context": "4.10.8",
    "react-native-screens": "3.34.0",
    "react-native-segmented-control-tab": "4.0.0",
    "react-native-svg": "15.4.0",
    "react-native-svg-transformer": "1.5.0",
    "react-native-swipeable-row": "0.8.1",
    "react-native-tab-view": "3.5.2",
    "react-native-typography": "1.4.1",
    "react-native-version": "4.0.0",
    "react-native-web": "0.19.12",
    "react-native-webview": "13.10.5",
    "react-redux": "9.1.2",
    "suppress-exit-code": "3.2.0",
    "validator": "13.12.0"
  }
Nantris commented 3 months ago

For what it's worth, this issue was not breaking our builds as far as I can tell. I got our builds working and I'm 99% sure this warning persisted despite the functional build being output.

JeanBaptisteBolh commented 2 months ago

I'm having this issue. Might just be a warning but further down my build fails. This is the issue (something to do with fastlane) https://github.com/expo/eas-cli/issues/2109

I'm thinking this might be related

Daniel-Cross commented 1 month ago

Did anyone find a solution to this? We just started getting it despite everything being fine 5 days ago.

aimeeaidanu commented 1 month ago

@Daniel-Cross and to any other people having this issue, try copying all files into a new directory and rebuilding. Seems to fix the issue as well.

junzhengca commented 1 month ago

This started to happen to me as well, fully managed project, same failure both on EAS and with --local flag.

Tried to copy the directory to a new location, doesn't work.

statico commented 1 month ago

We just started getting this on EAS. Builds were passing on Sep 30 but we get this error as of today. No dependencies have changed.

JuanEliasJabib02 commented 1 month ago

having this same problem, someone solve it?

aimeeaidanu commented 1 month ago

This issue seems to be come and go periodically. Keep me posted on any updates you guys have

DanielssonWilliam commented 1 month ago

I have the same issue. Did a build in late September and it worked fine. Tried building 2 days ago 8:th of October and now it doesnt want to go through. Nothing in the code except the version number on the app has gone up. And I have a clean install of expo-cli

Will it just correct itself in a few days? https://status.expo.dev/ - says that all systems are operational

https://expo.dev/eas-build-status - also confirms that builds are going through. So surely everyone does not have this problem

EDIT: We solved this problem today. As many have said the error is very missleading. And usually seem to be caused by some other underlying error. For us it was some packages that were outdated. We got warnings from expo-doctor and updating those dependencies fixed the build errors. It could have been caused by the new Xcode Versions that demands higher versions on some packages.

statico commented 1 month ago

I just ran into this, and I think this warning is misleading.

Our problem was actually certificates, and that error is hidden by Fastlane piping Xcode logs to disk. By running EAS_LOCAL_BUILD_SKIP_CLEANUP=1 EAS_LOCAL_BUILD_WORKINGDIR=/tmp/eas eas build --local, I got a logfile in /tmp/eas/logs that I could look through to identify the cause of the build failure.

In our case it was something like /tmp/eas/build/packages/mobile/ios/MyApp.xcodeproj: error: Provisioning profile "*[expo] com.myapp.mobile AppStore 2024-10-09T23:20:03.581Z" doesn't include signing certificate "Apple Distribution: MyApp Technologies, Inc. (ASDF123Y4C)". (in target 'MyApp' from project 'MyApp')

sakihayashi commented 1 month ago

Did anyone make this work? I am running into the same issue. It was fine a few days ago...; Suddenly build started to fail with exactly the same message no matter how I changed the Podfile.

junzhengca commented 1 month ago

Did anyone make this work? I am running into the same issue. It was fine a few days ago...; Suddenly build started to fail with exactly the same message no matter how I changed the Podfile.

For us one thing that helped was to upgrade Expo version to the latest minor update, and run Expo doctor to update all dependencies. This worked for a fully managed Expo project, with or without --local.

Of course, your milage may vary given many of the folks already tried this. For us the main thing that helped is to upgrade Expo SDK itself, not just upgrading other dependencies.

mariomurrent-softwaresolutions commented 1 month ago

Having the same issue. Tried everything here, but no solution did help

statico commented 1 month ago

Our builds are working again. For us, the error in this issue was unrelated. The real error (about provisioning/certificates) was hidden in the full log, which is only available when building with --local and not on EAS.

mariomurrent-softwaresolutions commented 1 month ago

@statico yeah I tried it locally, but no logs are written ...

hameed-ijadunola commented 1 month ago

@mariomurrent-softwaresolutions try upgrading my react-native to the latest patch version. This fixed it for me

sakihayashi commented 1 month ago

@statico I tried it, too. but no luck. I created a new certificate working fine but same error.

@mariomurrent-softwaresolutions

Having the same issue. Tried everything here, but no solution did help

Same here.

@junzhengca Thank you! but when I solved the expo doctor's all issues, I am still getting the same errors.

✔ Validating global prerequisites versions passed
✔ Checking for incompatible packages passed
✔ Checking for conflicting global packages in project passed
✔ Verifying prebuild support package versions are compatible passed
✔ Checking dependency versions for compatibility with the installed Expo SDK passed
✔ Validating Expo Config passed
✔ Checking package.json for common issues passed

Didn't find any issues with the project!

The errors are the same

Pod installation complete! There are 78 dependencies from the Podfile and 77 total pods installed.

[!] [Codegen] warn: using experimental new codegen integration

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.`

My Podfile definitely has YES only

installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['DEFINES_MODULE'] = 'YES'
      end
    end
  end
mariomurrent-softwaresolutions commented 1 month ago

@sakihayashi updated the deployment target to 15 and updated all dependencies. Did a clean and rebuild and now it seems to work

mariomurrent-softwaresolutions commented 1 month ago

@mariomurrent-softwaresolutions try upgrading my react-native to the latest patch version. This fixed it for me

Seems like this fixed it

JeanBaptisteBolh commented 1 month ago

I'm having this issue. Might just be a warning but further down my build fails. This is the issue (something to do with fastlane) #2109

I'm thinking this might be related

It was NOT related.

The key for me was kicking off a non-local build on eas, then getting the xcode logs through the dashboard which revealed the error (in the logs). I couldn't find those xcode logs on my local machine when building locally, but the expo ui makes it easy to download those.

sakihayashi commented 1 month ago

@mariomurrent-softwaresolutions Thank you! I've upgraded React native and react as they instructed but in my case, the target 15.0 was not enough and went to 16.0. Was your react native version 0.76.0? (and React 18.3.1?)

I cleaned everything and tried it but eventually I got the same error when I run pod install

Pod installation complete! There are 87 dependencies from the Podfile and 86 total pods installed.

[!] [Codegen] warn: using experimental new codegen integration

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] hermes-engine has added 1 script phase. Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.
Nantris commented 1 month ago

Can anyone actually confirm ill effects from this issue? I don't want to waste the maintainers time, and so far I haven't confirmed any problems caused by it.

mariomurrent-softwaresolutions commented 1 month ago

@mariomurrent-softwaresolutions Thank you! I've upgraded React native and react as they instructed but in my case, the target 15.0 was not enough and went to 16.0. Was your react native version 0.76.0? (and React 18.3.1?)

I cleaned everything and tried it but eventually I got the same error when I run pod install

Pod installation complete! There are 87 dependencies from the Podfile and 86 total pods installed.

[!] [Codegen] warn: using experimental new codegen integration

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] Can't merge pod_target_xcconfig for pod targets: ["expo-dev-menu", "Main", "ReactNativeCompatibles", "SafeAreaView", "Vendored"]. Singular build setting DEFINES_MODULE has different values.

[!] hermes-engine has added 1 script phase. Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.

"react-native": "0.74.5", "react": "18.2.0",

As the expo-doctor said. So I updated all dependencies that I have no warning in expo-doctor

mariomurrent-softwaresolutions commented 1 month ago

Can anyone actually confirm ill effects from this issue? I don't want to waste the maintainers time, and so far I haven't confirmed any problems caused by it.

Well it breaks local builds ...

Nantris commented 1 month ago

Well it breaks local builds ...

Unless I'm crazy, it didn't break mine.

mariomurrent-softwaresolutions commented 1 month ago

Well maybe not for you. Until I fixed the error yesterday, the build did not successfully complete locally.

aimeeaidanu commented 1 month ago

I may have already commented this but my biggest advice is to try to reinitalize in a fresh new project. A lot of these expo issues seem to have a completely random cause but creating a new project and then moving the code over seems to fix them.

Key Point: It's going to correct itself eventually 😁

Nantris commented 1 month ago

Until I fixed the error yesterday, the build did not successfully complete locally.

I don't see how this could be anything but an all or nothing, but your experience is duly noted.

sakihayashi commented 1 month ago

I don't see how this could be anything but an all or nothing, but your experience is duly noted.

Surely, when I upgraded React native, the warning gone in my case like @mariomurrent-softwaresolutions said although I am now getting other errors.

In the end, I decided to re-initialize the app as it had looping errors and warnings and does not read two files anymore.

jvgeee commented 2 weeks ago

I got this error when doing a local build for IOS.

My issue was that I'd just updated Xcode, and I hadn't yet downloaded and installed simulators for the newest IOS version.

Solution:

mariomurrent-softwaresolutions commented 1 week ago

Getting the same error after upgrading to Expo SDK 52 ... @jvgeee Did not help to me ...

Seems really like a random occurring error for older projects :(