Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`
Asked Answered
S

7

27

I'm building an app with capacitor for ios. When I launch the command 'npx cap sync ios' (which launch pod install) and I get this error :

✖ Updating iOS native dependencies with "pod install" (may take several minutes): 
✖ update ios: 
[error] Error running update: Analyzing dependencies
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/damien/.cocoapods/repos` or via `pod repo add`.

If i execute the recommandation :

pod repo add trunk https://cdn.cocoapods.org/

I get this error

[!] Repo name `trunk` is reserved for CocoaPods' main spec repo accessed via CDN.

I'm blocked on this issue since 6 hours. I read all post mentionning this error on internet.

Socio answered 27/3, 2020 at 11:11 Comment(2)
What’s your CocoaPods version?Tetrasyllable
Have you solved this problem? I got the same issue. I tried pod repo add master https://github.com/CocoaPods/Specs.git, not working. I tried add source https://github.com/CocoaPods/Specs.git in Podfile, not working, I tried pod repo remove trunk, pod repo add trunk https://cdn.cocoapods.org/. Neither works.Book
S
35

Temporary solution :

I added `source 'https://github.com/CocoaPods/Specs.git' on the top of my Podfile

platform :ios, '11.0'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
....

But it takes 30 minutes to download all the repo (2.5gb) in my Users/damien/.cocoapods/repos/ folder 🤯

Socio answered 27/3, 2020 at 13:47 Comment(6)
I had to do this too :( I get an SSL error from the command line trying to connect to the CDN, though I can use CURL or open the files in the browser without a problem. This started after updating to Catalina and then updating my cocoapods versionObara
I had an openssl error too, after updated it. tTo avoid it, I downgraded the version with brew switch openssl 1.0.2qSocio
I have the same problem, it just broke, maybe the service is just down at the moment.Custos
Worked for me with v1.9.3Lumbering
I got a different error after this. Unable to find a specification for 'React-Core' depended upon by 'RNCPushNotificationIOS'. already ran pod repo update. still not working. any ideas?Personate
i am getting this error - [!] The 'Pods-RNNativebase' target has transitive dependencies that include statically linked binaries: (Flipper-Boost-iOSX and Flipper-RSocket)Burnsides
H
18

You can restore trunk using:

pod repo add-cdn trunk https://cdn.cocoapods.org/

found at: https://github.com/CocoaPods/CocoaPods/issues/10078#issuecomment-696481185

Hodgkins answered 22/9, 2020 at 7:19 Comment(5)
I get this error [!] CDN: trunk URL couldn't be downloaded: cdn.cocoapods.org/CocoaPods-version.yml Response: 500 <html> <head> <title>Fastly error: unknown domain cdn.cocoapods.org</title> </head> <body> <p>Fastly error: unknown domain: cdn.cocoapods.org. Please check that this domain has been added to a service.</p> <p>Details: cache-hhn4056-HHN</p></body></html>Telekinesis
Me same, it looks like this url has been deprecated.Book
status.cocoapods.org There is a status page you can see if stuff is running. Right now CDN is down due to DNS issues.Hodgkins
I got this error CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: Unsupported protocol.Personate
I got this. [!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 403 <!DOCTYPE html>Burnsides
S
9

I just solved this with a sudo gem update

Supplant answered 20/3, 2023 at 19:9 Comment(3)
Helped me on M1. Couldn't run 'pod install' because of llvm, ffi issues. Reinstalled cocoapods, llvm, ffi (x86, arm64) but nothing helped. Only 'sudo gem update' solved the problem.Spoilsport
Thank you so much for this. I just spent like 6 hours trying to solve this issue. I guess that's what I get for only looking at the top three answers, even when they're three years old.Fauteuil
That worked for me also on a M1 macbook. Thanks!Trimurti
A
6

Another way you can get it working locally since this CDN is an issue

pod repo remove trunk

In Podfile

source 'https://github.com/CocoaPods/Specs.git'

# source 'https://cdn.cocoapods.org/'

found at:https://github.com/CocoaPods/CocoaPods/issues/10078

Agathy answered 22/9, 2020 at 17:42 Comment(0)
Y
3

If you still have issues after changing the source in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'

Its because you need to remove the current "trunk" and re-install pods with --repo-update:

pod repo remove trunk
pod install --repo-update  

OR --clean-install to execute a full pod installation ignoring the content of the project cache:

pod install --clean-install
Yawata answered 11/5, 2022 at 15:8 Comment(0)
P
1

I got it fixed according to what Logan says on Github:

gem uninstall cocoapods
gem install cocoapods -v 1.8
pod install

It seems that there's a bug or something with 1.9.1!

Parts answered 12/6, 2021 at 17:3 Comment(0)
T
0

I was facing the same issue and found this post that solved my problem.

From nvahalik

What ended up working for me was updating ethon to 0.16.0

Just do:

sudo gem update ethon
Turquoise answered 24/7, 2023 at 17:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.