Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError - undefined method `search' for nil:NilClass #5062

Closed
ryu1 opened this issue Mar 19, 2016 · 5 comments
Closed

NoMethodError - undefined method `search' for nil:NilClass #5062

ryu1 opened this issue Mar 19, 2016 · 5 comments
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Milestone

Comments

@ryu1
Copy link

ryu1 commented Mar 19, 2016

Command

/Applications/AppCode.app/Contents/bin/pod install --no-ansi

Report

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

   CocoaPods : 1.0.0.beta.6
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.3 (15D21)
       Xcode : 7.2.1 (7C1002)
         Git : git version 2.5.4 (Apple Git-61)
Ruby lib dir : /Users/ryu/.rbenv/versions/2.3.0/lib
Repositories : artsy - https://github.com/Artsy/Specs.git @ dedcf2d06799bad580b1656703f0025a4516d034
               artsy-1 - git://github.com/Artsy/Specs.git @ dedcf2d06799bad580b1656703f0025a4516d034
               master - https://github.com/CocoaPods/Specs.git @ 52212677fd6b96137a2f1f2d9af5044e05cefc3d

Plugins

cocoapods-deintegrate : 1.0.0.beta.1
cocoapods-plugins     : 1.0.0.beta.1
cocoapods-search      : 1.0.0.beta.1
cocoapods-stats       : 1.0.0.beta.3
cocoapods-trunk       : 1.0.0.beta.2
cocoapods-try         : 1.0.0.beta.3

Podfile

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

platform :osx, '10.11'
inhibit_all_warnings!

target 'ProgrammingLanguageSwiftDefinitiveGuide' do
  pod 'GoogleAnalytics', '~> 3.1'

  # Has its own copy of OCMock
  # and has access to GoogleAnalytics via the app
  # that hosts the test target

  target 'ProgrammingLanguageSwiftDefinitiveGuideTests' do
    inherit! :search_paths
  end

  target 'ProgrammingLanguageSwiftDefinitiveGuideUITests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    puts target.name
  end
end

Error

NoMethodError - undefined method `search' for nil:NilClass
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.0.beta.6/lib/cocoapods-core/source/aggregate.rb:82:in `block in search'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.0.beta.6/lib/cocoapods-core/source/aggregate.rb:82:in `select'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-core-1.0.0.beta.6/lib/cocoapods-core/source/aggregate.rb:82:in `search'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:346:in `create_set_from_sources'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:316:in `find_cached_set'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:289:in `specifications_for_dependency'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:107:in `search_for'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:205:in `block in sort_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:199:in `each'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:199:in `sort_by'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:199:in `sort_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/molinillo-0.4.4/lib/molinillo/resolution.rb:131:in `block (2 levels) in <class:Resolution>'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/molinillo-0.4.4/lib/molinillo/resolution.rb:174:in `initial_state'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/molinillo-0.4.4/lib/molinillo/resolution.rb:100:in `start_resolution'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/molinillo-0.4.4/lib/molinillo/resolution.rb:63:in `resolve'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/molinillo-0.4.4/lib/molinillo/resolver.rb:42:in `resolve'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/resolver.rb:62:in `resolve'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer/analyzer.rb:563:in `block in resolve_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/user_interface.rb:63:in `section'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer/analyzer.rb:561:in `resolve_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer/analyzer.rb:76:in `analyze'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer.rb:227:in `analyze'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer.rb:151:in `block in resolve_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/user_interface.rb:63:in `section'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer.rb:150:in `resolve_dependencies'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/installer.rb:114:in `install!'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/command/install.rb:37:in `run'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/claide-1.0.0.beta.3/lib/claide/command.rb:334:in `run'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/lib/cocoapods/command.rb:50:in `run'
/Users/ryu/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/cocoapods-1.0.0.beta.6/bin/pod:44:in `<top (required)>'
/Applications/AppCode.app/Contents/bin/pod:6:in `load'
/Applications/AppCode.app/Contents/bin/pod:6:in `<main>'
@orta
Copy link
Member

orta commented Mar 20, 2016

@mrackwitz think the two empty test targets are returning nil instead of an empty set?

@ryu1
Copy link
Author

ryu1 commented Mar 21, 2016

I changed URL scheme of source in podfile.
The problem was solved. Thank you.

Before:

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

After:

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

@ryu1 ryu1 closed this as completed Mar 21, 2016
@orta
Copy link
Member

orta commented Mar 21, 2016

Thanks @ryu1 - I'm going to re-open this, it feels like a real CP 1.0 bug too

@orta orta reopened this Mar 21, 2016
@mrackwitz mrackwitz added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Mar 21, 2016
@mrackwitz
Copy link
Member

Yes, that looks like it is a bug. Maybe caused through the latest changes in Source / SourceManager?
@segiddins: Any concrete ideas?

@segiddins segiddins added s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member and removed s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Apr 1, 2016
@segiddins
Copy link
Member

I have a fix for this in CocoaPods/Core#316.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s4:awaiting validation A Pull Request that is waiting for validation by a CocoaPods Core Team member t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

No branches or pull requests

4 participants