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

xcodebuild timed out while trying to read SmoketestSPM.xcodeproj 😭 when update with Carthage #1251

Closed
yoni89 opened this issue Feb 20, 2020 · 18 comments

Comments

@yoni89
Copy link

yoni89 commented Feb 20, 2020

Hi,
Im using Carthage to update the library of facebook-ios-sdk, but it keeps showing me the same problem all the time.

In Cartfile add this:
github "facebook/facebook-ios-sdk"

problem:
"xcodebuild timed out while trying to read SmoketestSPM.xcodeproj 😭"

@joesus
Copy link
Contributor

joesus commented Feb 21, 2020

Hi.

Could you please provide the carthage command you ran along with the full output of the command? Thanks!

@yoni89
Copy link
Author

yoni89 commented Feb 23, 2020

carthage update --no-use-binaries --platform iOS

@joesus
Copy link
Contributor

joesus commented Feb 24, 2020

Not able to reproduce. If you delete the Carthage checkout directory and the .resolved file and rerun the command are you able to reproduce?

@kelvin-lima
Copy link

I'm facing the same issue. Delete Carthage repository does not solve the problem and Removes Cartfile.resolved isn't an option.

@joesus
Copy link
Contributor

joesus commented Mar 4, 2020

@yoni89 what directory are you running the command from? Also, out of curiosity are you running any other tools that modify the directory structure or mess with xcode targets? Also why is removing Cartfile.resolved or at least the lines of Cartfile.resolved that reference the SDK not an option?

@kelvin-lima
Copy link

Additionally, Building only facebook-ios-sdk from checkouts folder results in:

carthage build --no-skip-current --platform iOS
*** xcodebuild output can be found in /var/folders/hy/5szzcfdn2mncf68j9yymwxfm0000gn/T/carthage-xcodebuild.qKmJwC.log
*** Building scheme "OCMock iOS" in OCMock.xcodeproj
*** Building scheme "OHHTTPStubs iOS Framework" in OHHTTPStubs.xcworkspace
*** Skipped building Tweaks due to the error:
Dependency "Tweaks" has no shared framework schemes for any of the platforms: iOS
If you believe this to be an error, please file an issue with the maintainers at https://github.com/facebook/Tweaks/issues/new
xcodebuild timed out while trying to read SmoketestSPM.xcodeproj 😭

@kelvin-lima
Copy link

Removing facebook-ios-sdk from Carfile.resolved and run carthage update, result at same response.

@yoni89
Copy link
Author

yoni89 commented Mar 4, 2020

@joesus
I have changed to apple package manager which you also support, facebook-ios-sdk currently doesn't work on carthage for me.

@joesus
Copy link
Contributor

joesus commented Mar 4, 2020

@yoni89 will investigate this more. Glad we were able to provide another channel!

@bennettyuan
Copy link

I have same issue. My temporarily resolution:

Remove "facebook-ios-sdk" form Cartfile, and update completed. Then add back "facebook-ios-sdk" to Cartfile, Update it separately, finally done.

@joesus
Copy link
Contributor

joesus commented Mar 9, 2020

As I was unable to reproduce I would advise trying @bennettyuan18's approach. If that does not work you may try using a different distribution channel such as SPM or Cocoapods. Also, based on the number of responses to this issue it seems like this is a local configuration issue. If you are able to reproduce this in a small sample app, attach that and we can look into reopening. Thanks!

@joesus joesus closed this as completed Mar 9, 2020
@Allui
Copy link

Allui commented Apr 7, 2020

My resolution:

  1. Open "SmoketestSPM.xcodeproj" (... Carthage/Checkouts/facebook-ios-sdk/samples/SmoketestSPM/SmoketestSPM.xcodeproj)
  2. Wait for SMP to load a dependency (Carthage can't wait for the dependency to download and it is cause of the timeout)
  3. And now you can use "carthage update"

@hien352911
Copy link

My resolution:

1. Open "SmoketestSPM.xcodeproj" (... Carthage/Checkouts/facebook-ios-sdk/samples/SmoketestSPM/SmoketestSPM.xcodeproj)

2. Wait for SMP to load a dependency  (Carthage can't wait for the dependency to download and it is cause of the timeout)

3. And now you can use "carthage update"

Thank your answer. It helps for me

@ahsan-khalil
Copy link

My resolution:

  1. Open "SmoketestSPM.xcodeproj" (... Carthage/Checkouts/facebook-ios-sdk/samples/SmoketestSPM/SmoketestSPM.xcodeproj)
  2. Wait for SMP to load a dependency (Carthage can't wait for the dependency to download and it is cause of the timeout)
  3. And now you can use "carthage update"

Thank you. It worked for me

@pigeondotdev
Copy link

Does anyone know the root cause of this issue? It's really annoying to have to do this every time.

@joesus
Copy link
Contributor

joesus commented Jan 31, 2021

Does anyone know the root cause of this issue? It's really annoying to have to do this every time.

Root cause is that Carthage build will greedy-search the repo for any Xcode project files / targets, this means it will pick up sample projects because they have project files with valid targets. You can avoid this by using Carthage's no-build flag which will pull prebuilt binaries from the latest release, or by avoiding Carthage entirely, using the XCFrameworks uploaded to the latest release, or Swift Package Manager, or CocoaPods.

@nebillo
Copy link

nebillo commented Feb 1, 2021

after a bit of research, this article from circle CI:
https://support.circleci.com/hc/en-us/articles/360044709573-Swift-Package-Manager-fails-to-clone-from-private-Git-repositories
xcodebuild does not conform to the system ssh config and does not access the keys CircleCI stores in ssh-agent

the same applies to local repository, so I was able to work around this by running the following as part of my third party setup code:

sudo defaults write com.apple.dt.Xcode IDEPackageSupportUseBuiltinSCM YES
rm ~/.ssh/id_rsa || true
for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true 
for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true

@joesus
Copy link
Contributor

joesus commented Feb 1, 2021

It seems like this is sufficiently answered. Closing conversation. If there is a new or more specific issue around this please open a new issue with supporting details. Thanks!

@facebook facebook locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants