question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS Build Failed: Unable to generate IPA. unable to build and sign IPA

See original GitHub issue

Environment

Environment: OS: macOS Sierra 10.12.6 Node: 6.11.4 Yarn: Not Found npm: 4.6.1 Watchman: Not Found Xcode: Xcode 9.2 Build version 9C40b Android Studio: Not Found

Steps to Reproduce

I am trying to create a build for MDM InHouse Distribution. I am following following steps before I start the build:

  1. Create App ID in Apple Developer Account. Ensured same BundleID is used in app.json
  2. Create production distribution certificate (selected in house distribution option) and then export to .p12 file. Performed this action manually and using “exp fetch:ios:certs” command. No difference identified.
  3. Created production mobile provision profile and exported same.
  4. Ensured correct team id is selected.

Below is the command used to create build and complete action trail:

exp build:ios --clear-credentials -c [exp] Checking if current build exists…

[exp] No currently active or previous builds for this project. [exp] Removed existing credentials ? How would you like to upload your credentials? I will provide all the credentials and files needed, Expo does limited validati on

We need your Apple ID/password to ensure the correct teamID and appID

Note: Expo does not keep your Apple ID or your Apple password.

? What’s your Apple ID? XXXXXXX@icloud.com ? Password? ********** [exp] Validating Credentials… [exp] You have 3 teams

  1. AAAAAAA “xxxxxx” (In-House)
  2. YYYYYYY “xxxxxxx” (Company/Organization)
  3. XXXXXXX “xxxxxxx” (In-House) ? Which Team ID to use? 3) XXXXXX “xxxxxx” (In-House) [exp] WARNING! In this mode, we won’t be able to make sure your certificates, or provisioning profile are valid. Please double check that you’re uploading valid files for your app otherwise you may encounter strange errors!

Make sure you’ve created your app ID on the developer portal, that your app ID is in app.json as bundleIdentifier, and that the provisioning profile you upload matches that team ID and app ID.

[exp] Please provide your distribution certificate P12: ? Path to P12 file: /Users/dhavaar/Documents/Projects/Release/XXXXXX/Ce rtificates.p12 ? P12 password: *********** [exp] Please provide the path to your push notification cert P12 ? Path to P12 file: /Users/dhavaar/Documents/Projects/Release/XXXXXXX/Ce rtificates.p12 ? P12 password: *********** [exp] Please provide the path to your .mobile provisioning profile ? Path to your .mobile provisioning Profile /Users/dhavaar/Documents/Projects/Re lease/XXXXXXXX/XXXXXXX.mobileprovision [exp] Encrypted certP12,certPassword,pushP12,pushPassword,provisioningProfile,teamId and saved to expo servers [exp] Publishing… [exp] Building iOS bundle [exp] Building Android bundle [exp] Analyzing assets [exp] Uploading assets [exp] No assets changed, skipped. [exp] Uploading JavaScript bundles [exp] Published [exp] Your URL is [exp] Building… [exp] Build started, it may take a few minutes to complete. [exp] You can monitor the build at

[exp] Alternatively, run exp build:status to monitor it from the command line.

While checking the build information on the URL I receive following:

running shell app builder extracting build configuration from app.json [04:36:22] Using gulpfile /usr/local/turtle-agent/tools-public/gulpfile.js [04:36:22] Starting ‘ios-shell-app’… IosIcons: setting image functions to alternative sharp implementations 2018-01-30 04:36:24.472 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.489 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.540 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.541 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.541 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.541 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.542 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.543 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.546 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.546 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.546 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.547 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.547 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) 2018-01-30 04:36:24.547 ibtoold[33902:975760] WARNING: Unhandled destination metrics: (null) Compiling resources… Using manifest: Cleaning up iOS… [04:36:30] Finished ‘ios-shell-app’ after 7.98 s done running shell app builder Assuming that client will run creating app on dev center ruby code done creating app on dev center building and signing IPA Executing command: security cms -D -i /tmp/turtle/7afaabb9-1c2f-4335-a935-a825c1034c89/provisioning-7afaabb9-1c2f-4335-a935-a825c1034c89/7afaabb9-1c2f-4335-a935-a825c1034c89.mobileprovision done retrieving provisioning profile Checking if teamID is present in keychain and that certificate is valid… decoding p12 certificate verifying certificate is installed Executing command: security find-identity -v -s (XXXXXXXXXX) confirmed team ID is present in keychain Chose export method: enterprise writing export-options.plist file… building IPA Executing command: fastlane gym -n 7afaabb9-1c2f-4335-a935-a825c1034c89-unsigned.ipa --workspace /usr/local/turtle-agent/shellAppWorkspaces/ios/default/ExpoKitApp.xcworkspace --scheme ExpoKitApp --archive_path /tmp/turtle/7afaabb9-1c2f-4335-a935-a825c1034c89/7afaabb9-1c2f-4335-a935-a825c1034c89.xcarchive --skip_build_archive true -i 61CF284AD9D87E00139A8F42AAD59B37C69A689C --export_options /tmp/turtle/7afaabb9-1c2f-4335-a935-a825c1034c89/provisioning-7afaabb9-1c2f-4335-a935-a825c1034c89/export-options.plist --export_method enterprise --export_xcargs OTHER_CODE_SIGN_FLAGS=“–keychain /tmp/turtle-agent/2075e5f0-05ba-11e8-80e3-0050568e4b9e.keychain” -o /tmp/turtle/7afaabb9-1c2f-4335-a935-a825c1034c89/7afaabb9-1c2f-4335-a935-a825c1034c89-build --verbose Unable to generate IPA. unable to build and sign IPA

I tried performing exactly same steps to create certificates and provisioning profile but rather than using In House distribution, used another team account for deployment to App Store and that build works fine.

Need to deploy this to ASAP and need assistance. Can you please look at build id and provide further information on why it can’t generate ipa file?

Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Arjit-Dhavalecommented, Feb 5, 2018

Hello @terribleben and @fxfactorial We are now able to generate ipa file using enterprise store distribution certificate. Thank you a ton for all help and support. We can close this issue now!!!

0reactions
zhaozhimingcommented, Apr 10, 2018

Hi, I have the same problem.
I upload my p12 and mobileprovision files and use the exp build:ios -e command to build but failed. Please help. @fxfactorial @terribleben
And I have my private key in my keychain for a distribution cert that I was using. @nbatwara
Thanks.

? Which Team ID to use? 1) XXXXXXX "XXXXXXX" (In-House)
23:48:09 [exp]
WARNING! In this mode, we won't be able to make sure your certificates,
or provisioning profile are valid. Please double check that you're
uploading valid files for your app otherwise you may encounter strange errors!

Make sure you've created your app ID on the developer portal, that your app ID
is in app.json as `bundleIdentifier`, and that the provisioning profile you
upload matches that team ID and app ID.

23:48:09 [exp] Please provide your distribution certificate P12:
? Path to P12 file: /XXXXXXXX/Certificates.p12
? P12 password: [hidden]
23:49:10 [exp] Please provide the path to your push notification cert P12
? Path to P12 file: /XXXXXX/push_Certificates.p12
? P12 password: [hidden]
23:49:32 [exp] Please provide the path to your .mobile provisioning profile
? Path to your .mobile provisioning Profile /XXXXXX/xxxx2018.mobileprovision
......
building and signing IPA
Executing command: security cms -D -i /private/tmp/turtle/862ca21b-a0cc-40c0-a847-de9eb85d1d4b/provisioning/862ca21b-a0cc-40c0-a847-de9eb85d1d4b.mobileprovision
done retrieving provisioning profile
Checking if teamID is present in keychain and that certificate is valid...
decoding p12 certificate
verifying certificate is installed
Executing command: security find-identity -v -s (XXXXXXXXXX)
confirmed team ID is present in keychain
Chose export method: enterprise
writing export-options.plist file...
building IPA
Executing command: fastlane gym -n unsigned.ipa --workspace /usr/local/turtle-agent/shellAppWorkspaces/ios/default/ExpoKitApp.xcworkspace --scheme ExpoKitApp --archive_path /private/tmp/turtle/862ca21b-a0cc-40c0-a847-de9eb85d1d4b/archive.xcarchive --skip_build_archive true -i 9DCD06C4DAF37FAF7D62DBAD9F86EAB17B49CDCB --export_options /private/tmp/turtle/862ca21b-a0cc-40c0-a847-de9eb85d1d4b/provisioning/export-options.plist --export_method enterprise --export_xcargs OTHER_CODE_SIGN_FLAGS="--keychain /private/tmp/turtle-agent/37fecee6-3cd7-11e8-8a97-0050568eb402.keychain" -o /private/tmp/turtle/862ca21b-a0cc-40c0-a847-de9eb85d1d4b/build --verbose
Unable to generate IPA.
unable to build and sign IPA
Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to install enterprise build in iOS 15 beta version
After updating the os, not able to install the enterprise app through ipa, it throws error unable to install the app. Kindly update...
Read more >
Guide to Fix the "unable to install .ipa file" Issue on iOS Devices
This guide leads you through all the necessary steps to find out the source of the "unable to install .ipa file" error message....
Read more >
Failed to generate iOS ipa file - Stack Overflow
Failed when Step 4: Select Project > Deployment, and click the Deploy button to deploy your application. It is suppose to generate an...
Read more >
Oh dear! Build errors? - LoopDocs - GitHub Pages
Solution: This error message has recently started to appear for some new Loop builders. To resolve the issue, please log in to your...
Read more >
Resolved - Error pushing build to Apple App Store - Unity Forum
build /last/iOS/build.ipa'. *** Error: Unable to upload archive. The file '/opt/workspace/workspace/greg-bradburn.ninjaeggs-ios.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found