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

Pod Install DOES NOT WORK #2625

Closed
justlikealltherest opened this issue Oct 8, 2014 · 10 comments
Closed

Pod Install DOES NOT WORK #2625

justlikealltherest opened this issue Oct 8, 2014 · 10 comments

Comments

@justlikealltherest
Copy link

Report

  • What did you do?
    pod install
  • What did you expect to happen?
    the fucking thing to work, after dicking with this shit for like 3 hours.. and uninstalling it and reinstalling it, and installing older versions, and upgrading git, and upgrading ruby, and removing all the files and installing it again and having it keep creating 'Master-1' then 'Master-2', then 'Master-3' each time, then removing those files, uninstalling cocoapods, and reinstalling it again.
  • What happened instead?
    the crash below X 75 times

Stack

   CocoaPods : 0.34.1
        Ruby : ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin13]
    RubyGems : 2.4.2
        Host : Mac OS X 10.9.5 (13F34)
       Xcode : 6.0.1 (6A317)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 9d73fd604de3321cdcad23cc6f629b0424150e21
               master-1 - https://github.com/CocoaPods/Specs.git @ 9d73fd604de3321cdcad23cc6f629b0424150e21

Plugins

cocoapods-plugins : 0.3.1
cocoapods-trunk   : 0.2.0
cocoapods-try     : 0.4.1

Podfile

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

platform :ios, '7.0'
inhibit_all_warnings!

link_with 'Blah', 'Blah Enterprise'
xcodeproj 'blah.xcodeproj'

pod 'Facebook-iOS-SDK'

pod 'SSPullToRefresh'

pod 'Mixpanel'

pod 'UIImage+animatedGif'

pod 'ELCImagePickerController'

pod 'FXBlurView'

pod 'MDCSwipeToChoose'

pod 'ASIHTTPRequest'

pod 'GPUImage'

Error

NoMethodError - undefined method `name' for nil:NilClass
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer/analyzer.rb:172:in `block (2 levels) in update_repositories_if_needed'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer/analyzer.rb:172:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer/analyzer.rb:172:in `block in update_repositories_if_needed'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer/analyzer.rb:171:in `update_repositories_if_needed'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer/analyzer.rb:48:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer.rb:184:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer.rb:106:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer.rb:105:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/installer.rb:90:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/command.rb:48:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/bin/pod:33:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
@alloy
Copy link
Member

alloy commented Oct 8, 2014

Right. Sorry for the wasted time on this. Please accept a free lifetime license to this software.

Also, next time have the decency to read the contributing guidelines before you post, leave your attitude at the door, and try to be helpful. We’re not your personal support team.

@alloy alloy closed this as completed Oct 8, 2014
@justlikealltherest
Copy link
Author

Thank you for the lifetime license of this software. However, it has a bug. I would like to bring it to your attention as it may cause many people who are using this to have trouble and become frustrated. During these frustrated times, I would assume that all frustration is not directed towards the unknown people that contribute to a software project, but rather the software itself. I would hope that the crash report aids you in future releases.

@DenTelezhkin
Copy link

Sometimes i wish there was a downvote button on GitHub issues.

@alloy
Copy link
Member

alloy commented Oct 8, 2014

@justlikealltherest I appreciate your willingness to report an issue and actually sympathize with the annoyance of breaking builds. If you'd like to start over with a new ticket that communicates your willingness to help out more clearly, then please do so.

@justlikealltherest
Copy link
Author

Thank you alloy, that was well put. You have skills working with irate 'customers', and I apologize for being one. The original post was an unleashing of all of the challenges that I have had with cocoapods. The main issue I think is in using this with Git and a team of people. Since using it, we unfortunately have never been able to just 'git pull' someones changes. We have always had an issue with cocoapods that prevents that and then we do all kinds of praying to the Xcode gods a clean-> delete libpods.a -> clean -> pod install -> clean -> attempt to run ritual to try to get back to work (usually takes about 30-120 mins)... Today, it was all day. Sometimes during this process, we have to uninstall cocoapods, and sometime during that process, cocoapods crashes. Its a daily struggle and I know there are other people out there who are going through it too. I am sure that in time, these kinks will be worked out, and I commend you for your work, and time.

@segiddins
Copy link
Member

@justlikealltherest the easiest way for us to try and debug that situation is if you can share a sample setup that exhibits those same issues.

@alloy
Copy link
Member

alloy commented Oct 9, 2014

Thank you alloy, that was well put. You have skills working with irate 'customers', and I apologize for being one.

Thank you for coming around, it’s water under the bridge 👍 Now let’s see if we can get this sorted out.

You mention other issues regarding git pull and whatnot in your last message, please file individual tickets for individual issues you encounter that you deem bugs.


Regarding the original issue, it is indeed hard for us to determine what the cause is just by the stack trace and, as @segiddins points out, the only way for us to look into that would be for you to provide a reproducible setup.

However, I think it will be faster if you can perform some debugging on your side first.

First of all, I notice that you have the ‘master’ spec repository cloned twice (the second one being master-1). Is there a reason for this and can you see if removing the second one changes anything? (They are located in ~/.cocoapods/repos.)


Otherwise some deeper inspection is required. (I’d prefer that, if this part is required, you would create a new ticket, so that others that might have the same issue can find a clean to the point ticket without the noise in the beginning.)

  • First can you install the latest 0.34.2 release so that the sources we’re talking about are in the same locations?
  • Somewhere in this method it is returning a nil entry.
  • Seeing as you specify a source in your Podfile, it has to go through this part
  • Which in turn calls this method. I don’t see anything that could go wrong there
  • So finally we’ll have to inspect this method which is called from the previous method.
  • Can you change this last method (in /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.1/lib/cocoapods/sources_manager.rb) to be:
      def source_with_url(url)
        puts "ORIGINAL URL: #{url}"
        url = url.downcase.gsub(/.git$/, '')
        puts "NORMALISED URL TO FIND: #{url}"
        aggregate.sources.find do |s|
          puts "NORMALISED SOURCE URL: #{s.url.downcase.gsub(/.git$/, '')}"
          s.url.downcase.gsub(/.git$/, '') == url
        end
      end
  • Finally run pod install again and paste the printed results in the new ticket.

@ydnar
Copy link

ydnar commented Oct 18, 2014

Try changing the https URL to a git URL in your Podfile:
From: source 'https://github.com/CocoaPods/Specs.git'
To: source 'git@github.com:CocoaPods/Specs.git'

@justlikealltherest
Copy link
Author

Great writeup guys! So it appears that the actual root of the problem was in the setup of ruby / git on my machine. First things first, I updated ruby. Then, onto git. The git that I was using (I believe) was installed via Brew. OSX has its own version of git, but my bashrc (for aliases) was using the brew version. I changed the bashrc to use the apple/OSX version of git and then that seemed to fix the issue. So outdated ruby + brew git = crashing cocoapods.

My computer needed to be configured this way because git was giving an error when trying to do anything with github (saying that unsecure http connections were not longer supported), and so to remedy that, I had to ensure that all git requests were done via ssh. The root of that problem was that actually my github certificate was not installed on my machine anymore.

So the total set of actions for anyone having this issue to try is

  1. make sure your github certificate is installed
  2. update ruby
  3. only use the OSX version of git
  4. undo any funny business being done when running git from the command line

*hopefully this will help people in the future and thank you to the cocoapod guys for their help

@alloy
Copy link
Member

alloy commented Oct 21, 2014

@justlikealltherest Thanks for the update! ❤️

In the current version we’ve included a check for a minimum git version that we require #2651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants