Carthage stuck in `carthage bootstrap`

Created on 20 Mar 2019  Β·  14Comments  Β·  Source: Carthage/Carthage

  • carthage install method: [ ] .pkg, [X] homebrew, [ ] source
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.32.0
  • xcodebuild -version: Xcode 10.1 | Build version 10B61
  • Are you using --no-build? NO
  • Are you using --no-use-binaries? YES
  • Are you using --use-submodules? NO
  • Are you using --cache-builds? NO
  • Are you using --new-resolver? NO

Cartfile

github "iziz/libPhoneNumber-iOS"
github "jdg/MBProgressHUD" ~> 1.0.0
github "hackiftekhar/IQKeyboardManager"
github "ruslanskorb/RSKImageCropper"
github "onevcat/Kingfisher" ~> 4.0
github "marmelroy/PhoneNumberKit"
github "realm/realm-cocoa"
github "kevin0571/STPopup"
github "CooperRS/RMActionController"
github "CooperRS/RMDateSelectionViewController"
github "loopce/10Clock" "aded0c926684a08b943b3247e25ff5e55fefdbaa"
git "[email protected]:loopec/lklib-ios.git"

Carthage Output

*** Checking out PhoneNumberKit at "2.5.0"
*** Checking out RMActionController at "1.3.1"
*** Checking out realm-cocoa at "v3.7.4"
*** Checking out RMDateSelectionViewController at "2.3.1"
*** Checking out 10Clock at "aded0c926684a08b943b3247e25ff5e55fefdbaa"
*** Checking out IQKeyboardManager at "v6.0.4"
*** Checking out MBProgressHUD at "1.1.0"
*** Checking out RSKImageCropper at "2.1.0"
*** Checking out lkcrypto-ios at "v1.1.0"
*** Cloning lkcrypto-ios
*** Checking out lklib-ios at "v1.5.1"
*** Cloning lklib-ios
*** Checking out Kingfisher at "4.8.0"
*** Checking out STPopup at "1.8.3"
*** Checking out libPhoneNumber-iOS at "0.9.13"

Actual outcome
After clone my project I run carthage bootstrap --platform iOS --no-use-binaries several times, and always get stuck after 15 dependencies.

Expected outcome
Run all dependencies to run my project.

question stale

All 14 comments

Same issue here, the process freezes after 15 depedencies

This has been happening to me on a project with 8 dependencies:

github "OAuthSwift/OAuthSwift"
github "mxcl/PromiseKit"
github "PromiseKit/Foundation"
github "jrtibbetts/JSONClient"
github "jrtibbetts/Stylobate"
github "jrtibbetts/SwiftDiscogs"
github "jrtibbetts/SwiftGenius"
github "jrtibbetts/SwiftMusicbrainz"

Those last 5 are all very small projects, and the only transitive dependency is Kingfisher. I deleted my Carthage directory and Cartfile.resolved, just to make sure, and even after 42 minutes of waiting for carthage update --platform iOS and pegging the CPUs at 247% (the highest I observed, anyway), the Checkouts directory hadn't even been created. What's going on?

After a _long_ time, bootstrap succeeds. Apparently, checking out the resolved dependecies was the issue: One checkout takes unexpectedly long and Carthage doesn't tell the user what it's currently working on.

@oliverlist, I've left more than 2 hours running the carthage, but to no success. This long time you tell, is how long?

In total, the checkout probably took an hour. While carthage bootstrap is busy, you might want to run

ps aux | grep git

to find out which dependency is causing this behaviour.

try using --new-resolver

Also, not pinning dependencies is bad practice.

@blender, what do you mean "not pinning dependencies is bad practice?

I try run with this flag you said

In your Cartfile I see that only a few dependencies have a version specified, like

github "jdg/MBProgressHUD" ~> 1.0.0

You should specify a version for all of your dependencies.

You should specify a version for all of your dependencies.

I agree that this should be the standard practice for using third-party dependencies, but what about dependencies that you control and/or are under active development? I don't include them as submodules, and I don't see any way to point Carthage to a local checkout (outside of the Carthage/Checkouts folder) or even a specific GitHub commit hash.

Similar problem here. (carthage version 0.32.0)
--new-resolver option does not resolve this problem.

$ carthage update --platform iOS --no-use-binaries --new-resolver
*** Fetching SCLAlertView-Swift
*** Fetching Charts
*** Fetching Validator
*** Fetching SwiftFontName
*** Fetching Cosmos
*** Fetching SnapKit
*** Fetching Spring
*** Fetching Then
*** Fetching SwiftDate
*** Fetching Unbox
*** Fetching KRProgressHUD
*** Fetching Motion
*** Fetching XCGLogger
*** Fetching KRActivityIndicatorView
*** Fetching Nuke
*** Fetching Alamofire
*** Fetching ReactiveSwift
*** Fetching RxSwift
*** Fetching Result
:
:
:
(Never ending...)
:
:
:

Here is the htop command results:

13586 tdkn       32   0 5391M 97964 ? 31.3  0.6  6:12.98    β”‚  β”‚  └─ carthage update --platform iOS --no-use-binaries --new-resolver
66217 tdkn       32   0 4180M  1412 ?  0.0  0.0  0:00.00    β”‚  β”‚     β”œβ”€ git rev-parse 3.4.0^{commit}
66216 tdkn        8   0 4180M  1900 ?  0.0  0.0  0:00.00    β”‚  β”‚     β”œβ”€ git show-ref --tags 3.4.0
66215 tdkn       32   0 4180M  1900 ?  0.0  0.0  0:00.00    β”‚  β”‚     └─ git show-ref 3.4.0

Forever repeating git rev-parse / git show-ref / git show ...

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was resolved on version 0.33.0.

The issue comes back with Xcode 11 & Swift 5.1. Executing without the --new-resolver option leads to 247% CPU usage and infinite execution, e.g. stuck. If I use --new-resolver than Carthage begins some cycled calls and it never ends. List of repos is below:

carthage update --platform iOS --new-resolver
*** Fetching PryntTrimmerView
*** Fetching Kingfisher
*** Fetching ObjectMapper
*** Fetching Starscream
*** Fetching AssetsPicker
*** Fetching ImageResizeExtension
*** Fetching SwiftMessages
*** Fetching ColorSlider
*** Fetching ProgressView
*** Fetching libPhoneNumber-iOS
*** Fetching Keychain
*** Fetching Drawsana
*** Fetching Alamofire
*** Fetching realm-cocoa
*** Fetching DeepDiff
*** Fetching RealmBrowser
*** Fetching CocoaLumberjack
*** Fetching Mantis
*** Fetching swift-sodium
*** Fetching SnapKit
*** Fetching Device
....................
and it never finishes
Was this page helpful?
0 / 5 - 0 ratings