Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export Failed with Xcode 7 - No applicable devices found #3184

Closed
fastlanebot opened this issue Sep 23, 2015 · 43 comments
Closed

Export Failed with Xcode 7 - No applicable devices found #3184

fastlanebot opened this issue Sep 23, 2015 · 43 comments

Comments

@fastlanebot
Copy link

Original issue by @natanrolnik - Imported from fastlane/gym#104

Hey Felix! I'm trying to export a lane that in previous Fastlane worked. I'm running fastlane v. 1.29.1 and gym 0.8.1.

I receive the following error:

2015-09-24 00:31:00.811 xcodebuild[52660:811706] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7fda446c5d90>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7fda44b61b80 {NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo=0x7fda44b61b80 {NSLocalizedDescription=No applicable devices found.}

Archive succeeds, but the export fails. I took a look here fastlane-old/gym#89 and here fastlane-old/gym#90 and tried some suggestions there, with no success.

Before updating from 1.28 to 1.29.1, I was having provisioning profile errors, and now this one.

Any ideas of what is causing this?

Thanks!

@fastlanebot
Copy link
Author

@KrauseFx commented

I assume this is an Ad Hoc profile? If you can't get it to work, you could try using the use_legacy_build_api option in gym to fall back to the old way of building + signing.

@fastlanebot
Copy link
Author

@natanrolnik commented

Indeed Ad Hoc.
Could you please tell me how I send this option to gym? The lane looks like the following:

def fabricAndNotify(notifications)
    sigh(adhoc: true)
    ENV["PROFILE_UDID"] = lane_context[SharedValues::SIGH_UDID]
    gym(scheme: "MyProj AdHoc", sdk: "iphoneos9.0")
    crashlytics(notifications: notifications)
end

@fastlanebot
Copy link
Author

@KrauseFx commented
gym(scheme: "MyProj AdHoc", sdk: "iphoneos9.0", use_legacy_build_api: true)

@fastlanebot
Copy link
Author

@natanrolnik commented

Great, using the use_legacy_build_api: true made it.

Do you know what causes it to fail when not using the legacy? I'll pay attention in the new releases, to know when to remove it.

@fastlanebot
Copy link
Author

@KrauseFx commented

Sorry, I don't know why - somehow it seems to verify the devices in your Ad Hoc profile...

@fastlanebot
Copy link
Author

@jlpiedrahita commented

Try performing:

gem update

https://forums.developer.apple.com/message/75096#75096

@fastlanebot
Copy link
Author

@bassrock commented

I had the same issue occurring with a development profile just recently. I think this has to do with devices being connected to the machine. As it works fine on my laptop, but not on our CI server that has a bunch of iOS devices connected.

@fastlanebot
Copy link
Author

@mAu888 commented

gem update didn't work for me directly, but the hint to the dev forums helped. Running gem install CFPropertyList -v 2.3.2 did the trick.

@fastlanebot
Copy link
Author

@bassrock commented

Ok interesting enough I use Bundler with fast lane. I added CFPropertyList and sqlite3 to my gem file and it instantly started working. My guess is the way fast lane works with bundler may be the issue.

@fastlanebot
Copy link
Author

@mcfedr commented

I found that the problem was caused because of how xcrun uses ruby gems, somehow it is using the system ruby but with rvm gems.

Much as I tried, the only solution I have so far it to run rvm use system and install and run fastlane using the system ruby.

@fastlanebot
Copy link
Author

@dugalp commented

use_legacy_build_api: true

This worked for me, but wondering what side effects this will have if any.

@fastlanebot
Copy link
Author

@howie-misfit commented

I am using gym 1.1.6(also gym 1.0.0)
Tried:

  1. use_legacy_build_api: true, works.
  2. Do not use_legacy_build_api,
    $ gem update
    $ gem outdated
    does not work.
  3. Do not use_legacy_build_api,
    $ gem install CFPropertyList
    does not work.
  4. Do not use_legacy_build_api,
    $ gem install CFPropertyList
    $ gem install sqlite3
    It works !

@fastlanebot
Copy link
Author

@dugalp commented

Thanks for that response.

I actually had a different error which I solved with use_legacy_build_api, but not sure I like that solution. So I tried your suggestion of 'gem install CFPropertyList' and 'gem install sqlite3' anyway for giggles.

With or without the 2 gem install commands, I use use_legacy_build_api, and TA DA! fastlane/gym is successful!

Again, not sure what ramifications of using the legacy api would be, versus new one. If someone could elaborate as well as provide some clues for a fix (are we still waiting on Apple?) that would help.

I have taken caution to de-identify the company I work for. It took me a while to do this de-identification, hopefully it is going to help others as well.

Error is here:
Archive Succeeded
[11:27:11]: Successfully stored the archive. You can find it in the Xcode Organizer.
[11:27:11]: /usr/bin/xcrun xcodebuild -exportArchive -exportOptionsPlist '/tmp/gym_config_1448584031.plist' -archivePath '/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive' -exportPath '/tmp/1448584031'
2015-11-27 11:27:12.079 xcodebuild[9206:18311] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/t2/jntzlyqs5sd8yj72s2ldwb0c0000gn/T/myApp_2015-11-27_11-27-12.078.xcdistributionlogs'.
2015-11-27 11:27:12.635 xcodebuild[9206:18311] [MT] IDEDistribution: -[IDEDistributionProvisioning _itemToSigningInfoMap:]: Can't find any applicable signing identities for items: (
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app'>'>",
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app'>'>",
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp.watchkitextension' '<DVTFilePath:0x7fc068fc85e0:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app/PlugIns/myApp WatchKit Extension.appex'>'>",
"<IDEDistributionItem: 0xID_REMOVED '(null)' '<DVTFilePath:0x7fc06c2f7fb0:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app/_WatchKitStub/WK'>'>"
)
Errors={
"<DVTSigningCertificate: 0xID_REMOVED; name='iPhone Distribution: mycompany ', hash='LONG_HASH_ID_REMOVED', certificateKind='1.2.840.113635.100.6.1.4'>" = {
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemove_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemoved_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp.watchkitapp', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..
",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp.watchkitextension' '<DVTFilePath:0x7fc068fc85e0:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app/PlugIns/myApp WatchKit Extension.appex'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemoved_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp.watchkitapp.watchkitextension', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
};
}
2015-11-27 11:27:12.636 xcodebuild[9206:18311] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fc06c0534e0>: Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={
"<DVTSigningCertificate: 0xID_REMOVED; name='iPhone Distribution: mycompany ', hash='LONG_HASH_ID_REMOVED', certificateKind='1.2.840.113635.100.6.1.4'>" = {
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemove_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..
",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp' '<DVTFilePath:ID_REMOVED:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemoved_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp.watchkitapp', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
"<IDEDistributionItem: 0xID_REMOVED 'enterprise.com.mycompany.mycompanymyApp.watchkitapp.watchkitextension' '<DVTFilePath:0x7fc068fc85e0:'/Users/myuser/Library/Developer/Xcode/Archives/2015-11-27/myApp-Testing 2015-11-27 11.24.46.xcarchive/Products/Applications/myApp.app/Watch/myApp WatchKit App.app/PlugIns/myApp WatchKit Extension.appex'>'>" = "Error Domain=DVTCodesignResolverErrorDomain Code=7 "No matching provisioning profiles found" UserInfo={NSLocalizedRecoverySuggestion=None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups, keychain-access-groups., NSLocalizedDescription=No matching provisioning profiles found, DVTCodesignResolverError_ResolutionInputsKey=<DVTCodesignResolutionInputs: 0xRemoved_ID; portalTeamID='REMOVED_ID', usingTeamBasedSigning='NO', bundleIdentifier='enterprise.com.mycompany.mycompanymyApp.watchkitapp.watchkitextension', targetName='(null)', provisioningProfileType='1', requiresProvisioningProfile='YES', provisioningProfilePlatform='iOS', certificateKind='1.2.840.113635.100.6.1.4', requiredEntitlements='{\n "beta-reports-active" = 1;\n "com.apple.security.application-groups" = (\n "group.enterprise.com.mycompany.mycompanymyApp.watchAppGroup"\n );\n "keychain-access-groups" = (\n "MyTEAM_ID_REMOVED..
",\n "MyTEAM_ID_REMOVED..enterprise.com.mycompany.mycompanymyApp"\n );\n}', requiredCodesignableDevices='(null)', requiredFeatures='(null)'>\n}";
};
}}
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)

@fastlanebot
Copy link
Author

@lacostej commented

For the record, that one is also linked to #168.

@fastlanebot
Copy link
Author

@lemonkey-medhelp commented

@bassrock I added those two gems to my Gemfile and it resolved it for me as well.

@viktorbenei
Copy link

viktorbenei commented May 20, 2016

One more note for @bassrock 's solution: in our case it wasn't enough to just add the two gem to the Gemfile, and actually it wasn't even required. The error happened if $GEM_HOME was set to any path (we did call xcodebuild directly from the script, without any additional tool).

We did a couple of additional tests and it seems that (at least in our case) the issue only happens if we have a Gemfile in the directory and $GEM_HOME is set. The exact same xcodebuild -exportArchive .. command works if either there's no Gemfile in the directory, or if $GEM_HOME is not set.

Just in case someone would find this issue when searching for the error message ;)

@TKBurner
Copy link

@viktorbenei Thanks for sharing that info, it'll help other developers! 👍

@KrauseFx
Copy link
Member

Hey everyone, we just pushed a new gym release with gym 1.11.1, that should fix an error in xcodebuild. Xcode depends on system Ruby being used, and sometimes can't find the system gems. The new release should fix that error. Please disable the use_legacy_build_api flag, update to the latest version of gym and give it a try. More information about the fixed error can be found here: #6495

Let us know if that fixes the issue for you. If it doesn't work still, please share the complete output with the latest version of gym so we can further investigate the problem 👍

Thanks everybody for helping resolve this issue 🚀

@TKBurner
Copy link

@vegidio-symbio Thanks for following up. Can you share your full output for the lane you run when you get this error? Thanks!

@romk1n
Copy link

romk1n commented Jan 3, 2017

@KrauseFx after updating fastlane to the latest version and removing legacy_api call i am getting this error ```[14:36:38]: ▸ Signing DerivedData/MyApp/Build/Intermediates/ArchiveIntermediates/MyApp\ Beta/InstallationBuildProductsLocation/Applications/MyApp-Enterprise.app
@[14:36:40]: ▸ Touching MyApp-Enterprise.app.dSYM
[14:36:42]: ▸ Archive Succeeded
[14:36:42]: Generated plist file with the following values:
[14:36:42]: ▸ -----------------------------------------
[14:36:42]: ▸ {
[14:36:42]: ▸ "method": "enterprise"
[14:36:42]: ▸ }
[14:36:42]: ▸ -----------------------------------------
[14:36:42]: $ /usr/bin/xcrun /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.4.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/xg/p2flh_xs4hj8wd9wrdmg5v080000gp/T/gym_config20170103-18919-wn7ul6.plist' -archivePath /Users/romk1n/Library/Developer/Xcode/Archives/2017-01-03/MyApp-Enterprise\ 2017-01-03\ 14.26.57.xcarchive -exportPath '/var/folders/xg/p2flh_xs4hj8wd9wrdmg5v080000gp/T/gym_output20170103-18919-1qp1av'
rbenv detected, removing env variables
rbenv: no such command `shell'

  • xcodebuild -exportArchive -exportOptionsPlist /var/folders/xg/p2flh_xs4hj8wd9wrdmg5v080000gp/T/gym_config20170103-18919-wn7ul6.plist -archivePath '/Users/romk1n/Library/Developer/Xcode/Archives/2017-01-03/MyApp-Enterprise 2017-01-03 14.26.57.xcarchive' -exportPath /var/folders/xg/p2flh_xs4hj8wd9wrdmg5v080000gp/T/gym_output20170103-18919-1qp1av
    2017-01-03 14:36:42.793 xcodebuild[27853:13815313] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/xg/p2flh_xs4hj8wd9wrdmg5v080000gp/T/MyApp-Enterpise_2017-01-03_14-36-42.792.xcdistributionlogs'.
    2017-01-03 14:37:08.401 xcodebuild[27853:13815313] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7ff6be3f3e00>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
    error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}```

no idea how to fix it really, i substitute it the real app name for privacy

fastlane version 2.4.0

@AppsTitude
Copy link

I think it is trying to apply bitcode app thinning even though it's an app build for enterprise. It is trying to apply the bitcode thinning to a set of devices which it is not finding. That is my theory. So for now, I am checking the build environement and if it matches and adhoc/entreprise type I use the legacy flag, if not I use the bitcode flag.

@romk1n
Copy link

romk1n commented Jan 9, 2017

Definitely not. All the bitcode is disabled everywhere.

@AppsTitude
Copy link

AppsTitude commented Jan 9, 2017

I am also setting the 'include_bitcode' to false, but I have the same error message as you pointing us to the fact that it is trying to 'thin' the app. => 'Step failed: <IDEDistributionThinningStep'
Do you have app extensions in your project?

@romk1n
Copy link

romk1n commented Jan 9, 2017

As far as I remember 'include_bitcode' is false by default. Will check if that has changed recently. We don't have any extensions.

@AppsTitude
Copy link

AppsTitude commented Jan 9, 2017

Well I'm out of ideas…
I'd say this is a Faslane/Gym issue. Will try to set it to a previous version and test.

@romk1n
Copy link

romk1n commented Jan 9, 2017

yeah i will keep debugging it, want to get rid of the legacy as well.

@sbandol
Copy link

sbandol commented Jan 9, 2017

Got exactly same error as well.
In my case the cause was a framework missing UIDeviceFamilyin Info.plist.

@AppsTitude
Copy link

@sbandol Are you sure you had the same error mentioning IDEDistributionThinningStep while trying to build for enterprise?

@sbandol
Copy link

sbandol commented Jan 10, 2017

@AppsTitude IDEDistributionThinningStep, yes, but for ad-hoc

@AppsTitude
Copy link

It looks like the same error indeed. I'll try setting the UIDeviceFamily. Thank you!

@AppsTitude
Copy link

AppsTitude commented Jan 10, 2017

Setting UIDeviceFamily did not work for me nor did set fastlane version to 2.2.0. I guess I'll use the legacy method for now (for non bitcode enabled build config)

@AppsTitude
Copy link

AppsTitude commented Jan 10, 2017

@sbandol Oh my god you were right! It was a lib (Instabug) which was missing its UIDeviceFamily info in its plist… Wow.
=> Instabug/Instabug-iOS#103

@romk1n
Copy link

romk1n commented Jan 10, 2017

interesting will try to update cocoa pod to set UIDeviceFamily as well since we using Instabug

@romk1n
Copy link

romk1n commented Jan 11, 2017

i have tried adding UIDeviceFamily same error

@AppsTitude
Copy link

AppsTitude commented Jan 11, 2017

You are not the one needing to add UIDeviceFamiy. It is the lib's responsibility. So just update Instabug and it should work. If it doesn't maybe another lib is creating the same issue.

@romk1n
Copy link

romk1n commented Jan 11, 2017 via email

@orschaef
Copy link

orschaef commented Jan 12, 2017

Same problem here. Using fastlane 2.7.0.

[13:47:53]: ▸ Archive Succeeded
[13:47:53]: Generated plist file with the following values:
[13:47:53]: ▸ -----------------------------------------
[13:47:53]: ▸ {
[13:47:53]: ▸   "method": "enterprise"
[13:47:53]: ▸ }
[13:47:53]: ▸ -----------------------------------------
[13:47:53]: $ /usr/bin/xcrun /Users/itsme/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.7.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/gym_config20170112-56443-qpdt8r.plist' -archivePath /Users/itsme/Library/Developer/Xcode/Archives/2017-01-12/myapp-nightly\ 2017-01-12\ 13.46.05.xcarchive -exportPath '/var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/gym_output20170112-56443-179rbd3'
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/gym_config20170112-56443-qpdt8r.plist -archivePath '/Users/itsme/Library/Developer/Xcode/Archives/2017-01-12/myapp-nightly 2017-01-12 13.46.05.xcarchive' -exportPath /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/gym_output20170112-56443-179rbd3
2017-01-12 13:47:54.429 xcodebuild[57449:1224890] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/myapp-nightly_2017-01-12_13-47-54.428.xcdistributionlogs'.
2017-01-12 13:48:08.146 xcodebuild[57449:1224890] [MT] IDEDistribution: Step failed: <IDEDistributionThinningStep: 0x7f9d5872d000>: Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}
error: exportArchive: No applicable devices found.

Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." UserInfo={NSLocalizedDescription=No applicable devices found.}

Using this in my Fastfile:

lane :build do
...
  gym({
    scheme: "myapp-nightly",
    use_legacy_build_api: false,
    export_method: "enterprise",
    clean: true
  })
end

When setting use_legacy_build_api to true, everything is fine. But I think this is no longer an option...
I also tried it with different ruby versions (also with system ruby), using it with bundler and without bundler. No Chance. I have installed the latest Xcode Version 8.2.1 (8C1002)...

Have no idea what I could try anymore...
And btw: UIDeviceFamily is set on all my dependencies (I am using carthage)

@orschaef
Copy link

orschaef commented Jan 12, 2017

Little update here. Finally i digged into the log dir /var/folders/.../myapp-nightly_2017-01-12_13-47-54.428.xcdistributionlogs which is printed in the above log output. I saw those lines at the end:

            code = 0;
            description = "Failed to verify bitcode in Alamofire.framework/Alamofire:\nerror: Cannot extract bundle from /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/IDEDistributionThinningStep.eP6/Payload/myapp-nightly.app/Frameworks/Alamofire.framework/Alamofire (i386)\n\n";
            info =             {
            };
            level = ERROR;
            type = "malformed-payload";
        },
                {
            code = 0;
            description = "Failed to verify bitcode in KeychainSwift.framework/KeychainSwift:\nerror: Cannot extract bundle from /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/IDEDistributionThinningStep.eP6/Payload/myapp-nightly.app/Frameworks/KeychainSwift.framework/KeychainSwift (i386)\n\n";
            info =             {
            };
            level = ERROR;
            type = "malformed-payload";
        },
                {
            code = 0;
            description = "Failed to verify bitcode in Realm.framework/Realm:\nerror: Cannot extract bundle from /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/IDEDistributionThinningStep.eP6/Payload/myapp-nightly.app/Frameworks/Realm.framework/Realm (i386)\n\n";
            info =             {
            };
            level = ERROR;
            type = "malformed-payload";
        },
                {
            code = 0;
            description = "Failed to verify bitcode in RealmSwift.framework/RealmSwift:\nerror: Cannot extract bundle from /var/folders/kg/hgs6n2rs0lsdynbwjhtg360c0000gn/T/IDEDistributionThinningStep.eP6/Payload/myapp-nightly.app/Frameworks/RealmSwift.framework/RealmSwift (i386)\n\n";
            info =             {
            };
            level = ERROR;
            type = "malformed-payload";
        }
    );
}

That told me it has something to do with bitcode enabled. After I diabled bitcode in my project and changed my gym action to this:

gym({
    scheme: "myapp-nightly",
    include_bitcode: false,
    clean: true
  })

it worked smoothly...
So as small hint for the others with the same problem: Try to investigate the detailed problem in the IDEDistribution.standard.log file.

Of course ... it would be nice to have bitcode enabled. But I think as long as Apple does not make it mandatory we will always struggle with this ... because so much tools and frameworks out there do not support bitcode right. In my specific case I think it's somehow the combination with carthage, which also still have some bitcode support issues.

@saraht129
Copy link

@orschaef I see the same kind of error message from IDEDistribution.standard.log file, but excluding bitcode on gym doesn't solve the issue for me.

@JanC
Copy link

JanC commented Feb 21, 2017

Hi,
I'm having the same issue

fastlane 2.17.1
gym 1.11.0
Xcode 8.2.1

It works fine with Xcode 7 sudo xcode-select -s /Applications/Xcode7.3.1.app/ but I need to build using Xcode 8 now

@dsrees
Copy link

dsrees commented Feb 22, 2017

@saraht129 I was seeing this same problem, but disabling bitcode in gym didn't solve the problem for me. I had to go into my target's Build Settings and disable bitcode from there. After that, everything worked fine

@dallasjohnson
Copy link

I had the same problem include_bitcode: false did not work from Gym but like @orschaef did work smoothly when disabled from within the project (which is far from ideal). Also tried use_legacy_build_api: true but it had no success. I guess include_bitcode: false is not having any real effect at the moment using Xcode 8.3 beta 3 with Gym 2.19.3

@philipengberg
Copy link

I just experienced the same problem with Xcode 8.3.1. However, none of the above suggestions worked for me. Turned out that Xcode 8.3.2 just released and that fixed the problem for me
¯\_(ツ)_/¯

@fastlane fastlane locked and limited conversation to collaborators Jul 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests