Cocoapods: [!] Oh no, an error occurred.

Created on 13 Jul 2019  ยท  15Comments  ยท  Source: CocoaPods/CocoaPods

โ€•โ€•โ€• MARKDOWN TEMPLATE โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.7.4
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.5 (18F132)
       Xcode : 10.2.1 (10E1001)
         Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 4c1f66c8e36754907d16c9f222be9c38332c5604

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.3.1
cocoapods-try         : 1.1.0

Podfile

use_frameworks!

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

def pods
    pod 'PopcornTorrent', '~> 1.3.0'
    pod 'XCDYouTubeKit', '~> 2.7.0'
    pod 'Alamofire', '~> 4.8.0'
    pod 'AlamofireImage', '~> 3.5.0'
    pod 'SwiftyTimer', '~> 2.1.0'
    pod 'FloatRatingView', '~> 3.0.1'
    pod 'Reachability', :git => 'https://github.com/tonymillion/Reachability'
    pod 'MarqueeLabel/Swift', '~> 3.2.0'
    pod 'ObjectMapper', '~> 3.4.0'
end

target 'PopcornTimeiOS' do
    platform :ios, '9.0'
    pods
    pod 'AlamofireNetworkActivityIndicator', '~> 2.3.0'
    pod 'google-cast-sdk', '~> 4.3'
    pod 'OBSlider', '~> 1.1.1'
    pod '1PasswordExtension', '~> 1.8.4'
    pod 'MobileVLCKit', '~> 3.3.0'
end

target 'PopcornTimetvOS' do
    platform :tvos, '10.2'
    pods
    pod 'TvOSMoreButton', '~> 1.2.0'
    pod 'TVVLCKit', '~> 3.3.0'
    pod 'MBCircularProgressBar', '~> 0.3.5-1'
end

target 'TopShelf' do
    platform :tvos, '10.2'
    pod 'ObjectMapper', '~> 3.4.0'
end

def kitPods
    pod 'Alamofire', '~> 4.8.0'
    pod 'ObjectMapper', '~> 3.4.0'
    pod 'SwiftyJSON', '~> 4.2.0'
    pod 'Locksmith', '~> 4.0.0'
end

target 'PopcornKit tvOS' do
    platform :tvos, '10.2'
    kitPods
end

target 'PopcornKit iOS' do
    platform :ios, '9.0'
    kitPods
    pod 'google-cast-sdk', '~> 4.3'
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
            config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
            config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
        end
        if ['FloatRatingView-iOS', 'FloatRatingView-tvOS'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
    end
end

Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/paolo/.cocoapods/repos/popcorntimetv/all_pods_versions.txt
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/cdn_source.rb:276:in `initialize'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/cdn_source.rb:276:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/cdn_source.rb:276:in `local_file'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/cdn_source.rb:253:in `ensure_versions_file_loaded'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/cdn_source.rb:187:in `search'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.7.4/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:389:in `create_set_from_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:358:in `find_cached_set'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:332:in `specifications_for_dependency'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:139:in `search_for'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:248:in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:241:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:241:in `sort_by'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:241:in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/resolver.rb:88:in `resolve'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer/analyzer.rb:939:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer/analyzer.rb:937:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer.rb:398:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'

โ€•โ€•โ€• TEMPLATE END โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

Most helpful comment

rm -rf ~/.cocoapods/repos/popcorntimetv and re set it up. We keep #9000 to fix this.

All 15 comments

/cc @igor-makarov - somehow this user has a CDN repo set up to the wrong url?

/Users/paolo/.cocoapods/repos/popcorntimetv/all_pods_versions.txt

Git URLs should end with .git, as described in the documentation.

I've found the reason this failure occurs now: a7b02cc28387 changed the heuristic that determines repo type.
Before this, the else clause took care of this, but now it isn't reached.

Ultimately, I believe the current behavior is the correct one, even though the messaging is not.

Possible solutions (for CocoaPods code):

  • Introduce a different cdn_source DSL to prevent ambiguity. This is not trivial though.
  • Pattern-match common URL hosts such as github.com that are guaranteed not to be CDN and warn about them. Not very reliable.

As for PopcornTime, the fix is:

source 'https://cdn.cocoapods.org/'
source 'https://github.com/PopcornTimeTV/Specs.git'

Hrm, Yeah - I think that's too loose of a heuristic ATM - git urls don't need to end in .git on GitHub, and I pretty regularly don't include it:

git clone https://github.com/orta/typescript-notes/issues

Maybe look specifically for cdn.? - if someone's willing to set up their own CDN, they are very likely able to set the DNS for their domain, optionally source could take a type if you wanted to override that?

I have a better idea: How about we just do a HTTP HEAD or something and figure out it's a CDN?

After all, this does only happen when the source doesn't already exist.

That's 10/10 to me, nice thinking

Hello,
tried to substitute
source 'https://cdn.cocoapods.org/'
source 'https://github.com/PopcornTimeTV/Specs.git'
in podfile and launch pod install again, but the error is the same

Close this in favor of #9000 ?

Think so

not closed

Hello,
tried to substitute
source 'https://cdn.cocoapods.org/'
source 'https://github.com/PopcornTimeTV/Specs.git'
in podfile and launch pod install again, but the error is the same

rm -rf ~/.cocoapods/repos/popcorntimetv and re set it up. We keep #9000 to fix this.

rm -rf ~/.cocoapods/repos/popcorntimetv and re set it up. We keep #9000 to fix this.

Correct, works.
Thanks for help !

I got this error when I did the following:

  1. pod install
  2. ctrl-C while pod install is running
  3. pod install --verbose

The last pod install took a while, then failed with a Errno::ENOENT - No such file or directory error. After that, each pod install immediately failed with the same error.

Fixed by:

  1. pod cache clean --all
  2. pod install

The last pod install ran from scratch and succeeded.

This is on CocoaPods 1.5.3

cocoapods version 1.7.5 pod update and pod repo not working when adding some pod
maybe this will help you:

pod repo remove goinstant
pod repo add goinstant https://github.com/goinstant/pods-specs-public
pod update

@SandrikaJanjghava you save my day :)

Just do this

sudo chmod -R 777 ios

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Curtis-Halbrook picture Curtis-Halbrook  ยท  3Comments

intelliot picture intelliot  ยท  3Comments

tlandsmancars picture tlandsmancars  ยท  3Comments

soleares picture soleares  ยท  3Comments

pallaviMN picture pallaviMN  ยท  3Comments