pod update is resulting into error [fatal: unable to access] - ios

After running pod update I am getting this error, I can only think of internet issue but my internet seems working fine. And another thing I noticed it is not happening every time, sometimes it just work fine with the same Pod file and some time result into mentioned error.
fatal: unable to access 'https://github.com/CocoaPods/Specs.git/': transfer closed with outstanding read data remaining
[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

its mean the latest pod not updated yet on git , wait 2 or 3 days it will work until you can add .framework file in your project or can use one down version of pod like latest pod is 10.2 so you can use 10.1

Repo updated but git not update. Check this link click.

Reinstalling CocoaPods:
sudo gem install cocoapods
Once it will be finished then write below command:
pod install
If pods were already installed. Otherwise, you will have to update all of them with
pod update

open your terminal go to your project i.e cd your_project_path hit enter and then run this command
pod repo update --verbose
hope this will resolve your issue
for more info check this link it might help you

Related

Why can't i install my newly created CocoaPod?

I created a framework and wanted to distribute it via CocoaPods. For that I published the code to CocoaPod's Specs github repository (https://github.com/CocoaPods/Specs.git) using the command:
pod trunk push RXSStoryblokClient.podspec
The pod was successfully pushed to the trunk (https://github.com/CocoaPods/Specs/commit/b0a141b3c741d757090f61d1579ec92a7c0ebfb6) and on the outside everything seems to have worked. But when I create a small test project and try to install the newly created pod by adding it to the podfile and running
pod install
it tells me: Unable to find a specification for 'RXSStoryblokClient'
I have tried (as suggested by cocoapods) to update the repo using the
pod repo update
command, but this didn't resolve the issue.
Any help in this matter would be greatly appreciated!
The issue actually resolved itself. It seems CocoaPods had not finished some indexing work and 48h after pushing the pod spec to github, the installation finally worked.

Newly submitted Podfile won't install with pod install but instead installs with pod install --repo-update

I have created a new iOS framework in which I listed external cocoapods as dependancies in my podspec file.
I successfully ran podspec lint without warnings/errors and then pushed the trunk which was also successful.
I read in several places that it usually takes up to an hour to show up so after 2 hours I tried to integrate the pod into a demo project using pod install, it gave me some errors like:
This pod might no longer be available
There could be an issue with the repository link
The name of the pod might be invalid
All of which I disagree to. So upon further research, I saw some people even had to wait for 7 hours as they had quite a heavy project, however, my library is not too heavy and it's dependancies are quite heavy but since they are not included in the project itself, I was wondering why it took so long.
Then I came across another pod install command pod install --repo-update which I ran seconds after pod install failed and it installed my pod and all of it's dependancies.
So I am curious to know what is the difference between these commands and how come one worked and the other did not ?
Thanks
pod install --repo-update and pod update update your local copy of the centralized CocoaPods Specs repository with the latest version.
pod install will use the previous local copy on your machine.
If a pod publisher published a new version after the last time you updated your local copy, pod install won't have access it to it. That's why you need to specify --repo-update.

mobile-ffmpeg-https (4.3.1) POD install failed

I am getting error on my pod install command , Error creating package is mobile-ffmpeg-https (4.3.1). Image attached for more details.
Actually i have not used this package anywhere in my project. I tried to use it and then removed it from project. But i am not getting why this is still showing up in pod install.
i tried deleting my podfile.lock and again running pod install but issue remains.
thanks in advance .
Just try to install it with different wifi or mobile data, and you're done

Сocoapods trunk URL couldn't be downloaded

I am getting this error when I try to pod repo update and pod install
CDN: trunk URL couldn't be downloaded:
https://cdn.cocoapods.org/deprecated_podspecs.txt, error: Failed to
open TCP connection to cdn.cocoapods.org:443 (No route to host -
connect(2) for "cdn.cocoapods.org" port 443)
Does somebody know how to fix this problem?
I got it working by using below commands:
pod repo remove trunk
and then
pod install or pod update
It seems that it's a cdn problem because when i use proxy the link https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt is opened and when not it return error.
What i did:
gem uninstall cocoapods
gem cleanup
rvm osx-ssl-certs update all
That didn't help.
Then i went to Chrome and opened https://cdn.cocoapods.org/all_pods_versions_e_2_1.txt it was an error. Then i cleared cache but it didn't help. After switching to proxy and returning back it started to work.
Resume: Turn on and switch off the VPN.
Also try to pod cache clean --all and pod setup by #NightWatcher
Step one. Remove trunk & master
pod repo remove trunk
pod repo remove master
Step two. Add source in podfile.
source 'https://github.com/CocoaPods/Specs.git'
source 'https://cdn.cocoapods.org/'
Step three. Run pod update. Solve my problem.
pod update --verbose
I fixed it by this solution
Add this to your Podfile:
source 'https://cdn.cocoapods.org/'
Afterwards, run the following command to remove it from your managed repo list (in console):
pod repo remove master
Cheers!
Just try this in your terminal:
sudo gem install cocoapods
I spend hours by uninstalling and reinstalling pods, Connecting and disconnecting wifi, and trying out different solutions I could find from the internet. And nothing worked. Finally I decided to restart my Macbook and the problem solved. So before trying the solutions given above, I would strongly recommend you to try restarting your system.
After checking all the answers and using VPN just to update pods, I've tried:
pod repo remove trunk
pod repo remove master
sudo rm -rf ~/.cocoapods/repos
pod update
I'm not specifying this BTW:
source 'https://cdn.cocoapods.org/'
And all worked.
Based on this github comment: whenever cocoapods CDN not working due to DNS issues, try adding directly the url that cdn.cocoapods.org redirects to, as a source in the top level of your Podfile:
source 'https://cocoapods-cdn.netlify.app/'
Remove Podfile.lock and try re-installing the Pods again (pod install). This worked for me.
For those, who faced with the following:
[!] CDN: trunk Repo update failed - 1 error(s):
CDN: trunk URL couldn't be downloaded: https://...podspec.json Response: 429 429: Too Many Requests
You should remove Podfile.lock, Pod folder and reconnect to your VPN (if any) then run
pod install --repo-update
On all of those comments; nothing worked for me
So i found this and it worked perfectly for me :
pod cache clean --all
pod setup
I had the same issue. I followed below steps and it works.
I suggest to restart the system before following below instructions.
Delete Podfile.lock
add source 'https://github.com/CocoaPods/Specs.git' line in Podfile
Then run below commands
pod repo remove trunk
sudo gem install cocoapods-deintegrate cocoapods-clean
pod deintegrate
pod cache clean --all
sudo gem uninstall cocoapods
sudo gem install cocoapods
pod install or pod update
Tried many solutions from here and there but what worked in my case is:
gem uninstall cocoapods
gem cleanup
sudo gem install cocoapods -n /usr/local/bin
Hope it works for you!
Several of these solutions didn't work for me but it was successful with updating the pods once I disconnected from AnyConnect VPN.
i have tried all above options but nothing fixed my issue. i just switched my internet connection to other service provider and then try pod install and trunk url issue was no more there. so try to switch internet connection if facing trunk url issue.
Faced the same issue and tried all the answers suggested above. But, the real issue seemed to be with not being able to access the Git repo for Cocoapods:
‘error: cannot open .git/FETCH_HEAD: Permission denied’
Executing sudo chown -R $USER: .
at
/Users/user_name/.cocoapods/repos/cocoapods
fixed the issue
it's up to proxy servise you've to do is all
first open up your proxy and set it up into your country or turn it off temporarely and
clean your xcode build folder and
try again pod install ro pod update
I hope that'll work

Unable to install pods using a legacy Cocoapods version

Working an a iOS project and don't have time to fix potential pod conflicts, getting the following error when running 'pod install'
The `master` repo requires CocoaPods 1.0.0 - (currently using 0.39.0)
Using --no-repo-update flag seems to help but throws another warning
https://github.com/CocoaPods/CocoaPods/issues/6163
Unable to find specification for
... manually replaced te pod master repo .. but didn't work ..
Unable to find a specification in CocoaPods
Being forced to use the latest version ... (--verbose .. also states that I need to update)
when running pod install I get The `master` repo requires CocoaPods 0.32.1, try updating but still in 0.31
As iHulk states in his comment:
Use source "https://github.com/CocoaPods/Old-Specs" at top of your pod file
Try this command in your terminal
sudo gem install -n /usr/local/bin cocoapods

Resources