xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

xcversion installed not all versions in the output #465

Open al-cheb opened 2 years ago

al-cheb commented 2 years ago

Description: We got an issue from customers - https://github.com/actions/runner-images/issues/6108 that xcversion sometimes doesn't list all installed Xcode.

Expected behavior:

13.1    (/Applications/Xcode_13.1.app)
13.2.1  (/Applications/Xcode_13.2.1.app)
13.3.1  (/Applications/Xcode_13.3.1.app)
13.4    (/Applications/Xcode_13.4.app)
13.4.1  (/Applications/Xcode_13.4.1.app)
14.0    (/Applications/Xcode_14.0.app)

Actual behavior:

13.4.1  (/Applications/Xcode_13.4.1.app)    
14.0    (/Applications/Xcode_14.0.app)

Environment: macOS 12.5 (21G72) xcversion 2.8.1

Repro steps: xcversion installed

CI:

jobs:
  build:
    runs-on: macos-12
    steps:
      - run: |
          xcversion installed
tigerw commented 2 years ago

This looks similar to #204, #203, #193, #128. I've also seen random failures on Azure DevOps due to xcversion being unable to find an Xcode version, despite it being present under /Applications. The issue seems to be that this tool is using Spotlight to find Xcode (to avoid hardcoding any paths), but sometimes Spotlight indexing isn't complete. Can you check if the Azure images' indexes are fully built? https://github.com/xcpretty/xcode-install/issues/203#issuecomment-350021269

al-cheb commented 2 years ago

This looks similar to #204, #203, #193, #128. I've also seen random failures on Azure DevOps due to xcversion being unable to find an Xcode version, despite it being present under /Applications. The issue seems to be that this tool is using Spotlight to find Xcode (to avoid hardcoding any paths), but sometimes Spotlight indexing isn't complete. Can you check if the Azure images' indexes are fully built? #203 (comment)

Thank you for the directions.

bouthainaghachem commented 2 years ago

I'm facing a similar issue with last runner image version updated two days ago :

System Version: macOS 11.7 (20G817) Kernel Version: Darwin 20.6.0 Image Version: 20220925.1

I'm setting under my fastlane file the xcversion(version: "13.0") but I'm getting pipeline error : [!] Cannot find an installed Xcode satisfying '13.0'.

Under the readme file is mentionned that MacOS 11.7 support xcode 13.0 ( link for ref: https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md )

Thanks in advance for your reply.