actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

Error: redefinition of module 'SwiftBridging' #9577

Closed QiZhan closed 2 weeks ago

QiZhan commented 1 month ago

Description

Build works fine with the default Xcode 15.0.1. However when we select Xcode 15.2, builds fail with Error: redefinition of module 'SwiftBridging'.

Possible useful link: https://forums.developer.apple.com/forums/thread/739510

Platforms affected

Runner images affected

Image version and build link

macos-13-xlarge

Is it regression?

N/A

Expected behavior

Build should pass with Xcode 15.2

Actual behavior

Github Actions return build error: /Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift/module.modulemap,line=13,col=8::redefinition of module 'SwiftBridging'

Repro steps

  1. Select Xcode version by updating "sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer" in Github workflows
  2. Build on macos-13-xlarge runner.
sergei-pyshnoi commented 1 month ago

Hello @QiZhan. Can you please provide simple repro steps? Its can be sample xcode project with action yaml.

QiZhan commented 1 month ago

Hi sergei-pyshnoi, The only change we made was selecting Xcode 15.2 in the job compared with the working one with Xcode 15.0.1. Not sure if this info will help, we archive using bundle exec fastlane gym and our project is using React Native.

sergei-pyshnoi commented 1 month ago

Hi sergei-pyshnoi, The only change we made was selecting Xcode 15.2 in the job compared with the working one with Xcode 15.0.1. Not sure if this info will help, we archive using bundle exec fastlane gym and our project is using React Native.

Unfortunately without any additional information we cannot start any investigation. I mean for example its error can be your project related. At least changing Xcode for building its kind of major changing and its It's not uncommon for this to cause errors during the build process.

erik-bershel commented 1 month ago

Hey @QiZhan! I'm going to close this item since no repro steps were provided. Feel free to reopen it in case you got some information to investigate.

ruslanskorb commented 1 month ago

Hey, @erik-bershel.

I have a project for you where this error occurs.

Failed job logs.zip

Let me know if there is anything else I can do to help resolve this issue.

matbouil commented 1 month ago

Hi, We have exactly the same issue here. Did you make any progress on this?

MaksimZhukov commented 1 month ago

Hello @matbouil! Unfortunately, we have not found the root cause yet. It would be great for further investigation if you could also provide a link to the public repository where the issue occurred.

matbouil commented 1 month ago

Hello @matbouil! Unfortunately, we have not found the root cause yet. It would be great for further investigation if you could also provide a link to the public repository where the issue occurred.

Hi @MaksimZhukov , Unfortunately, my project is not on a public repository and can't share it with you. Also, as @ruslanskorb said, the build works perfectly using Xcode 15.0.1. Could this problem be related to the fact that there are multiple installs of Xcode, along with a default one simply named "Xcode.app" on this runner (as mentioned in this Apple issue) ?

nanduu058 commented 1 month ago

Adding our observation here - Last successful build with Xcode 15.2 was on Feb 12 and we noticed that it started failing from Feb 23.

In between, we noticed that the macOS 13 image got updated. We are thinking this could be a possible root cause.

Mac OS image on feb 12 Image: macos-13 Version: 20240114.1

Mac OS image we noticed on Feb 23 Image: macos-13 Version: 20240219.1

You may try to look into this direction and see if you can find any root cause.

MaksimZhukov commented 1 month ago

Hello @nanduu058! Thank you for providing additional information! Could you please share the link to the latest successful build with Xcode 15.2?

nanduu058 commented 1 month ago

@MaksimZhukov Unfortunately, due to security concerns we cant share our project or logs. Is there any office hours for your clients to jump on a call to debug any of this kind of issues? We can do a screen share.

We were hoping the sample app shared by @ruslanskorb would be helpful for your analysis. However, if it is possible we can join your office hours and do screenshare.

nanduu058 commented 3 weeks ago

@MaksimZhukov Do you have any update on this?

matbouil commented 3 weeks ago

Hello @MaksimZhukov We would also be interested in an update on this subject too ;-)

MaksimZhukov commented 2 weeks ago

Hello everyone! The issue is caused by installing multiple versions of Xcode alongside and can be fixed by deleting Xcode.app:

- name: Delete Xcode.app
  run: sudo rm -rf /Applications/Xcode.app

Here is a link to the successful run and corresponding workflow file.

I'm closing the issue. Feel free to contact us if you have any questions or concerns.

nanduu058 commented 2 weeks ago

https://github.com/actions/runner-images/issues/9542#issuecomment-2073287239

We were able to pass our build from the above mentioned link. However, we are curious if it can be fixed from GitHub side as this one started happening with the recent update. It would be really difficult to triage this kind of issues that came up with the updates as it is difficult to reproduce locally.