xcode-install icon indicating copy to clipboard operation
xcode-install copied to clipboard

xcversion installed not all versions in the output

Open al-cheb opened this issue 3 years ago • 3 comments

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

al-cheb avatar Aug 18 '22 14:08 al-cheb

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

tigerw avatar Aug 30 '22 16:08 tigerw

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.

al-cheb avatar Aug 31 '22 13:08 al-cheb

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.

bouthainaghachem avatar Sep 30 '22 14:09 bouthainaghachem