Cocoapods is always failing to find compatible version

#1

Description of the issue

Im running a simple Linter, and xcodebuild test workflow.

In order to do this quickly, Id prefer things pull from cache. (Which is seems they are)

However every single build complains that
CocoaPods could not find compatible versions for pod ....

Ive removed said pod, and transitioned it to Carthage, but on my subsequent build, another Pod complaint is shown
CocoaPods could not find compatible versions for pod

In this particular case the full log is here.

Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "JGProgressHUD":
  In snapshot (Podfile.lock):
    JGProgressHUD (= 2.1, ~> 2.0)
  In Podfile:
    JGProgressHUD (~> 2.0)

So naturally, it assumes its out of date, and runs

Command failed, error: exit status 31, retrying without --no-repo-update ...
$ bundle "_2.0.2_" "exec" "pod" "repo" "update"

This takes a long time when it isn’t necessary.

Environment:

Where did the issue happen?

Xcode 11.1.x, on macOS 10.14.6 (Mojave)

–osx-xcode-11.1.x, --elite1

Which build Step causes the issue and which version of the step?

pods install

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every Time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Its always been the case

Local reproduction

Nope

Local reproduction: Linux / Android (docker based) stack builds

No

Build log

0 Likes

#2

In CocoaPods 1.8+, the default spec repo changed to the CDN instead of Git. This has been problematic for a bunch of devs.

You can configure CocoaPods to go back to using the Git spec repo by adding source 'https://github.com/CocoaPods/Specs.git' to the top of your Podfile , which may help.

You might find you still need to run a pod repo update within your Bitrise build, depending on how new your dependencies are – Bitrise updates the spec repo once a week (correct me if I’m wrong). At the moment we’re seeing that add around 90 seconds to every build. It’s not ideal.

0 Likes