bitrise-io / codesigndoc

Your friendly iOS Code Signing Doctor
MIT License
319 stars 43 forks source link

Failed on Macbook Pro 2017 "failed to list installed provisioning profiles, error: missing Platform array in profile" #160

Open stevebrowndotco opened 2 years ago

stevebrowndotco commented 2 years ago

_Please include the full (Terminal) output of codesigndoc -

 => Creating a temporary directory for codesigndoc ...
 => Downloading version: 3.0.0
 => Downloading codesigndoc from (https://github.com/bitrise-io/codesigndoc/releases/download/3.0.0/codesigndoc-Darwin-x86_64) to (/var/folders/gs/4qrdgw6167q3pv16ctx9_b4c0000gn/T/codesigndocXXXXXX.kHIkaIyp/codesigndoc) ...
#=#=-  #       #                                                                                                                                                                                                                                               #=O=#     #        #                                                                                                                                                                                                                                           -#O=- #      #          #                     ######################################################################################################################################################################################################################################################### 100.0%-=O#-   #        #    ######################################################################################################################################################################################################################################################### 100.0%
 => Making it executable ...
 => codesigndoc version: 3.0.0
 => Running codesigndoc scan ...

Scan the directory for project files
You can specify the Xcode project/workspace file to scan with the --file flag.
Found one project file: App.xcworkspace.

🔦  Scanning Schemes ...
$ xcodebuild "-workspace" "/Users/Steve/Sites/code-projects/chalk-3/ios/App/App.xcworkspace" "-list"

Select the Scheme you usually use in Xcode
Please select from the list:
[1] : App
[2] : Capacitor
[3] : CapacitorApp
[4] : CapacitorCamera
[5] : CapacitorCommunityCapacitorGooglemapsNative
[6] : CapacitorCommunityFacebookLogin
[7] : CapacitorCommunityFcm
[8] : CapacitorCommunityFirebaseAnalytics
[9] : CapacitorCordova
[10] : CapacitorDevice
[11] : CapacitorGeolocation
[12] : CapacitorHaptics
[13] : CapacitorKeyboard
[14] : CapacitorPushNotifications
[15] : CapacitorShare
[16] : CapacitorStatusBar
[17] : CordovaPlugins
[18] : FBSDKCoreKit
[19] : FBSDKCoreKit_Basics
[20] : FBSDKCoreKit-FacebookSDKStrings
[21] : FBSDKLoginKit
[22] : Firebase
[23] : FirebaseAnalytics
[24] : FirebaseCore
[25] : FirebaseCoreDiagnostics
[26] : FirebaseInstallations
[27] : FirebaseMessaging
[28] : GoogleAppMeasurement
[29] : GoogleDataTransport
[30] : GoogleMaps
[31] : GoogleUtilities
[32] : nanopb
[33] : Pods-App
[34] : PromisesObjC
(type in the option's number, then hit Enter) [1] : 1
Setting xcodebuild -destination flag to: generic/platform=iOS
Xcode (xcodebuild) version: Xcode 13.1 (Build version 13A1030d)

🔦  Running an Xcode Archive, to get all the required code signing settings...
$ xcodebuild "-workspace" "/Users/Steve/Sites/code-projects/chalk-3/ios/App/App.xcworkspace" "-scheme" "App" "-destination" "generic/platform=iOS" "clean" "archive" "-archivePath" "/var/folders/gs/4qrdgw6167q3pv16ctx9_b4c0000gn/T/__codesigndoc__822372874/App.xcarchive"
.........................................................................................................................................................................................................................................................................................................................................................................................................

💡  Saving xcodebuild output into file: /Users/Steve/Sites/code-projects/chalk-3/codesigndoc_exports/xcodebuild-output.log
failed to list installed provisioning profiles, error: missing Platform array in profile

In addition to this, if codesigndoc generated an Xcode output log, please attach that too.

xcodebuild-output.log

stevebrowndotco commented 2 years ago

Please can you help with my issue above? Thank you :)

shams-ahmed commented 2 years ago

@stevebrowndotco Looks like you have an invalid file in ~/Library/MobileDevice/Provisioning\ Profiles. The scripts tries to read a file and fail early.. can you double-check this folder? all provision files must have a platform i.e ios, mac, tvOS etc..

keithburgoyne commented 2 years ago

Did you ever solve this issue, @stevebrowndotco ? I'm seeing the same thing.

keithburgoyne commented 2 years ago

Did you ever solve this issue, @stevebrowndotco ? I'm seeing the same thing.

Managed to sort out a fix. In a terminal: 1.cd ~/Library/MobileDevice/Provisioning\ Profiles. 2.mkdir tmp ; mv *.mobileprovision tmp

  1. In Xcode, go to Xcode -> Preferences -> Accounts -> select each of your accounts and click Download Manual Profiles
  2. Rerun the script
kcw-grunt commented 1 year ago

thanks @keithburgoyne this ☝🏾 worked for me.

DavidSReich commented 1 year ago

Likewise Keith ... worked like a charm.

(Now I just need to add more profiles and certificates. That's what happens when I inherit a project where someone cloned a repo, changed the bundle IDs and expected everything to work! Not. But that's my problem.)