Cocoapods: pod repo update crash on 1.8.x

Created on 2 Oct 2019  Â·  11Comments  Â·  Source: CocoaPods/CocoaPods

Report

I know CocoaPods 1.8 use the CDN by default, but since pod setup does nothing, if you have a Podfile with source 'https://github.com/CocoaPods/Specs.git', when you run pod repo update it will fail.

pod setup should continue working or there should be a new command to get the git based source downloaded.

What did you do?

I have an autogenerated Podfile with source 'https://github.com/CocoaPods/Specs.git', when I run pod repo update it fails.

What did you expect to happen?

To get the git sources as on previous versions

What happened instead?

Got this error:
No such file or directory ~/.cocoapods/repos/Spec_Lock

CocoaPods Environment

Stack

   CocoaPods : 1.8.0
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.6 (18G95)
       Xcode : 11.0 (11A420a)
         Git : git version 2.21.0 (Apple Git-122)
Ruby lib dir : /Users/jcesarmobile/.rbenv/versions/2.3.7/lib
Repositories: 

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.0
cocoapods-try         : 1.1.0
easy confirmed workaround available defect

Most helpful comment

Shipped today with 1.8.4

All 11 comments

hmmmmmm can you list out exactly all steps you do from a clean CocoaPods install? You may have found a bug.

pod setup intentionally won't do something anymore as it has nothing to do. However, the error you've seen I've seen in another repo so I think you have uncovered a bug.

Yeah, is a bug, there is no way of setting up the local copy on cocopadods 1.8.x, but it will try to use it if you have the github url in the Podfile.
I guess a workaround is to manually clone the repo, but would be good if there was a command for it.

@jcesarmobile so I can't reproduce your issue. It seems you might be hitting this issue https://github.com/CocoaPods/CocoaPods/issues/9209

Can you paste your pod repo list?

Workaround: At least one invocation of pod install will create the ~/.cocoapods/repos directory.

cc @igor-makarov should we add this to create repos_dir in pod setup command or perhaps update the code with the Spec_Lock file to ensure mkdir_p has been invoked?

PR #9234 is out for review and will ship with 1.8.4. I reproduce'd the issue locally as well.

Thanks for the fix, and sorry for not answering, I missed the notifications. Also my problem was on a private CI that was downgraded to 1.7.x because of this, so was hard to reproduce again.

It's OK. There were other duplicate reports of this issue and I was able to figure it out.

@dnkoutso is there a schedule for when this fix will be released in 1.8.4?

Shipped today with 1.8.4

Was this page helpful?
0 / 5 - 0 ratings