Repository navigation
Creating archive with Xcode 9.1 fails #13070
Copy link
Copy link
Closed
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
We are trying to create a IPA file with Xcode 9 commandline tools and are running into issues. If we do the same procedure with Xcode 8.3.3 it works fine so we blieve the problem is tied to Xcode 9.1.
Steps to Reproduce
flutter create -i swift --org com.example.xcode_error .- Open Xcode and set
SigningtoAutomatically manage signing - Set device to
Generic iOS Device - Choose
Product->Archive - After successfully archiving choose app in
Organizer Export...the app asEnterprisedeployment
After a couple seconds you will see this error:
ipatool failed with an exception: #<TypeError: no implicit conversion of nil into Array>
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2769:in `&'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2769:in `bestDeviceTraitsForBundle'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1210:in `block in makeDeviceTraitsToDeviceTypesMapForDeviceIdentifiers'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1195:in `each'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:1195:in `makeDeviceTraitsToDeviceTypesMapForDeviceIdentifiers'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2466:in `block in ProcessIPA'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2444:in `each'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2444:in `ProcessIPA'
/Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:2940:in `<main>'
Logs
Xcode ipatool logs:
IDEDistribution.verbose.log
Flutter Doctor
[✓] Flutter (on Mac OS X 10.12.6 16G29, locale en-DE, channel master)
• Flutter at /Users/oemeravci/Documents/Development/XcodeWorkspace/Grandcentrix/sample_flutter/flutter
• Framework revision d5d2cdfeef (12 hours ago), 2017-11-16 22:53:22 -0800
• Engine revision 25912b8482
• Tools Dart version 1.25.0-dev.11.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.1, Build version 9B55
• ios-deploy 1.9.2
• CocoaPods version 1.2.1
[✓] Android Studio (version 2.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b05)
[-] IntelliJ IDEA Community Edition (version 2017.2.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[✓] Connected devices
• None
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: crashStack traces logged to the consoleStack traces logged to the consoleplatform-iosiOS applications specificallyiOS applications specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyt: xcode"xcodebuild" on iOS and general Xcode project management"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
cbracken commentedon Jan 10, 2018
/cc @cbracken @xster
cbracken commentedon Jan 10, 2018
Interesting, this looks potentially like a bug in
ipatool, which is a Ruby script that's part of Xcode. Out of curiosity, does Xcode 9.2 resolve this issue for you?I'll give a go at reproducing this today.
passsy commentedon Jan 10, 2018
I'm not able to export an app as Enterprise deployment. Tested with Xcode 9.2 and flutter on
master77872cc andalpha8f65fec.New: Xcode tells me to first build the app in release mode.
After doing so I get the same error:
The "Development" and "Ad Hoc" distributions fail as well with the same error message
pedia commentedon Jan 12, 2018
Me too. XCode behavior
I changed:
...
5.
6. Validate...
7. Next
8. then Export
Succeeded.
oemera commentedon Jan 12, 2018
@pedia thank you for pointing out that it works with
Validate->Export. This works for me too (I used my personal Apple Developer Account to test this).Unfortunately this workaround doesn't work with our Enterprise Developer Account because
Validatedoes validate the app withiTunes Connectand Enterprise Developer Accounts don't have access to iTunes Connect.kamal333k commentedon Feb 15, 2018
Hi guys, I'm facing this similar issue while creating an ipa.
I tried to export after validating but on validating it asks me for app store provisioning profile.
I'm not trying to publish my application on app store. I want to create an ipa in adhoc environment.
Can anyone help me on this?
ben-wood commentedon Feb 24, 2018
This error must have something to do with App Thinning, If I click next quickly before the error comes up while it is checking for App Thinning then it goes right on with the export.
pedia commentedon Feb 27, 2018
I prefer fastlane to finish the work of XCode, like:
adhoc, enterprise, upload to testflight, publish to appstore...
xster commentedon Feb 27, 2018
Haven't tried to reproduce this yet but in the meantime, wrt fastlane, here's an example of our Gallery app being built, signed and pushed to iTunes Connect programmatically
https://github.com/flutter/flutter/blob/master/dev/bots/travis_script.sh#L21
Here's the actual Fastfile https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/ios/fastlane/Fastfile though the whole thing could be a lot simpler if building locally instead of an untrusted CI system.
sw-tt-jigneshkumarchitaliya commentedon Mar 7, 2018
Please change validate build product release Yes to No. For more detail please check the screenshot.

fralways commentedon Mar 28, 2018
Still happening with the export option in xcode organizer - tho I get this error for Ad-Hoc option (didn't try enterprise). Clicking fast on Next button is a workaround and I was able to successfully distribute generated ipa.
(Changing validate build product release from Yes to No doesn't help)
alescdb commentedon Mar 30, 2018
I was having this issue too with XCode 9.2.
I've update to 9.3 this morning and it's resolved !
3 remaining items
zoechi commentedon Dec 11, 2018
Related to #12774
Chetan8488 commentedon Mar 14, 2019
Not's working Xcode 9.2
Please update Xcode 10.1
Then working fine...
jmagman commentedon Aug 16, 2019
Looks like this ipatool bug was resolved with Xcode 9.3, which was released more than a year ago. Closing.
github-actions commentedon Aug 16, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.