eas-cli: eas build -p ios --profile development --local , error Distribution certificate with fingerprint xxxxxxxxxxx hasn't been imported successfully
Build/Submit details page URL
Summary
i want to install React Native Google Mobile Ads (https://github.com/invertase/react-native-google-mobile-ads) on my project, but when i finished setup and run eas build -p ios --profile development --local on my terminal, it shows error Error: Distribution certificate with fingerprint *************** hasn't been imported successfully.
Managed or bare?
managed
Environment
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.4
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.19.3 - ~/.nvm/versions/node/v14.19.3/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.4.0/bin/yarn
npm: 6.14.17 - ~/.nvm/versions/node/v14.19.3/bin/npm
Watchman: 2022.08.22.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
IDEs:
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
npmPackages:
expo: ~46.0.9 => 46.0.9
react: 18.0.0 => 18.0.0
react-native: 0.69.5 => 0.69.5
Expo Workflow: managed
expo doctor
✖ Dependency tree validation for expo-modules-autolinking failed. This validation is only available on Node 16+ / npm 8.
✖ Dependency tree validation for @expo/config-plugins failed. This validation is only available on Node 16+ / npm 8.
✖ Dependency tree validation for @expo/prebuild-config failed. This validation is only available on Node 16+ / npm 8.
✖ Dependency tree validation for @unimodules/core failed. This validation is only available on Node 16+ / npm 8.
✖ Dependency tree validation for @unimodules/react-native-adapter failed. This validation is only available on Node 16+ / npm 8.
✖ Dependency tree validation for react-native-unimodules failed. This validation is only available on Node 16+ / npm 8.
🎉 Didn't find any issues with the project!
Error output
[RUN_EXPO_DOCTOR] Running "expo doctor"
[RUN_EXPO_DOCTOR] - Finding all copies of expo-modules-autolinking
[RUN_EXPO_DOCTOR] ✖ Dependency tree validation for expo-modules-autolinking failed. This validation is only available on Node 16+ / npm 8.
[RUN_EXPO_DOCTOR] [10:36:18] No dependencies found for expo-modules-autolinking
[RUN_EXPO_DOCTOR] - Finding all copies of @expo/config-plugins
[RUN_EXPO_DOCTOR] ✖ Dependency tree validation for @expo/config-plugins failed. This validation is only available on Node 16+ / npm 8.
[RUN_EXPO_DOCTOR] [10:36:18] No dependencies found for @expo/config-plugins
[RUN_EXPO_DOCTOR] - Finding all copies of @expo/prebuild-config
[RUN_EXPO_DOCTOR] ✖ Dependency tree validation for @expo/prebuild-config failed. This validation is only available on Node 16+ / npm 8.
[RUN_EXPO_DOCTOR] [10:36:19] No dependencies found for @expo/prebuild-config
[RUN_EXPO_DOCTOR]
[RUN_EXPO_DOCTOR] [10:36:25] 🎉 Didn't find any issues with the project!
[PREPARE_CREDENTIALS] Preparing credentials
[PREPARE_CREDENTIALS] Creating keychain
[PREPARE_CREDENTIALS] Preparing credentials for target 'iidiproject'
[PREPARE_CREDENTIALS] Getting distribution certificate fingerprint
[PREPARE_CREDENTIALS] Writing distribution certificate to /var/folders/pp/5mmg-d4fn7m22bs86gd5z80000gq/T/b1c6bd60-21a7-4041-8d51-d715692d2b9c.p12
[PREPARE_CREDENTIALS] Importing distribution certificate into the keychain
[PREPARE_CREDENTIALS] Initializing provisioning profile
[PREPARE_CREDENTIALS] Validating whether distribution certificate has been imported successfully
[PREPARE_CREDENTIALS] Destroying keychain - /var/folders/pp/5mmg-d4fn7m22bs86gd5z80000gq/T/turtle-v2-53cb8ca3-f7d2-4186-a808-04fb6ef67a6e.keychain
[PREPARE_CREDENTIALS]
Error: Distribution certificate with fingerprint xxxxxxxxx hasn't been imported successfully
at Keychain.ensureCertificateImported (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/keychain.js:54:19)
at async IosCredentialsManager.prepareTargetCredentials (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/manager.js:100:13)
at async IosCredentialsManager.prepare (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/ios/credentials/manager.js:58:41)
at async /Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:54:20
at async BuildContext.runBuildPhase (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/context.js:50:28)
at async buildAsync (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:53:29)
at async Object.iosBuilder (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/node_modules/@expo/build-tools/dist/builders/ios.js:24:33)
at async buildIosAsync (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/dist/ios.js:54:12)
at async buildAsync (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/dist/build.js:42:32)
at async main (/Users/dira/.npm/_npx/26667/lib/node_modules/eas-cli-local-build-plugin/dist/main.js:16:9)
Build failed
Distribution certificate with fingerprint xxxxxxxxxxx hasn't been imported successfully
Error: npx exited with non-zero code: 1
- Compressing project files
Reproducible demo or steps to reproduce from a blank project
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 8
- Comments: 27 (4 by maintainers)
I was experiencing the same problem. While trying to debug I manually downloaded the Distribution Certificate from the Credentials section on the EAS dashboard. When adding it to my macOS keychain (password is provided in .md file in the download) it shows the Certificate is untrusted.
Following this thread I was missing this newer “Apple Worldwide Developer Relations Certification Authority” certificate. After adding this Apple certificate the distribution certificate is also trusted. Furthermore deleting the distribution certificate again and then running a
--localiOS build successfully downloads the distribution certificate and gets added to the keychain.I’m not sure, why this certificate is missing, as Apple states it should have been updated with XCode.
I was running in to this issue and fixed it by opening xcode and logging in to my apple developer account inside xcode. Hope that helps.
Steps:
(I found the command in StackOverflow.)
It seems stupid but can you try restarting your Mac and running local build again?
when i tried to running
eas build --local, it still gives the same error and there is no popup appear.@iamemiliano This issue is only about using
--localregarding an iOS build on macOS. Therefore your problem on windows is totally different.Same issue happened again with latest Xcode 14.2 and this certificate solved it