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

Using plutil causes crash in Mac OS X 10.10 Yosemite Beta #2502

Closed
Kurry opened this issue Sep 21, 2014 · 10 comments
Closed

Using plutil causes crash in Mac OS X 10.10 Yosemite Beta #2502

Kurry opened this issue Sep 21, 2014 · 10 comments

Comments

@Kurry
Copy link
Contributor

Kurry commented Sep 21, 2014

Report

  • What did you do?

When I run bundle exec pod install I get this crash with the Cocoapods version 0.34.0.rc2 gem:

new-host:ta-flights-ios ktran$ bundle exec pod install
Preparing
Analyzing dependencies
dyld: Library not loaded: /usr/local/lib/libplist.1.dylib
  Referenced from: /usr/local/bin/plutil
  Reason: image not found

Stack

   CocoaPods : 0.34.0.rc2
        Ruby : ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0]
    RubyGems : 2.2.2
        Host : Mac OS X 10.10 (14A361p)
       Xcode : 6.0.1 (6A317)
Ruby lib dir : /Users/ktran/.rvm/rubies/ruby-2.0.0-p451/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ d41ba93d846919756dd93224409eba5e21d974bd
tripadvisor - https://[url_omitted].com/mobile/ta-specs.git @ 6656503c36a1344115a5f8f101d8f07abad80f42

Plugins

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

Podfile

source 'tripadvisor'
source 'master'

platform :ios, '7.0'

target 'TAFlights' do
  pod 'TAFlights', path: '.'
  pod 'DCIntrospect-ARC', '~> 0.0.8'
end

target 'TAFlightsUnitTests', exclusive: true do
  pod 'OCMock', '~> 2.2.0', inhibit_warnings: true
  pod 'Expecta', '~> 0.2'
  pod 'RestKit/Testing'
end

target 'TAFlightsIntegrationTests' do
  pod 'KIF/XCTest', '~> 3.0.7'
  pod 'KIFViewControllerActions', '~> 1.0.0'
  pod 'OCMock', '~> 2.2.0', inhibit_warnings: true
  pod 'RestKit/Testing'
end
  • What did you expect to happen?

I expect my pods to be installed in my workspace.

  • What happened instead?

Error

RuntimeError - Could not parse document
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/document.rb:55:in `read_memory'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/nokogiri-1.6.3.1/lib/nokogiri/xml/document.rb:55:in `parse'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/CFPropertyList-2.2.8/lib/cfpropertylist/rbNokogiriParser.rb:17:in `load'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/CFPropertyList-2.2.8/lib/cfpropertylist/rbCFPropertyList.rb:297:in `load_str'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/CFPropertyList-2.2.8/lib/cfpropertylist/rbCFPropertyList.rb:277:in `load_xml_str'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/xcodeproj-0.19.1/lib/xcodeproj/plist_helper.rb:58:in `read'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/xcodeproj-0.19.1/lib/xcodeproj/project.rb:175:in `initialize_from_file'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/xcodeproj-0.19.1/lib/xcodeproj/project.rb:92:in `open'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer/analyzer.rb:517:in `block (2 levels) in compute_target_platforms'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer/analyzer.rb:514:in `each'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer/analyzer.rb:514:in `block in compute_target_platforms'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/user_interface.rb:49:in `section'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer/analyzer.rb:513:in `compute_target_platforms'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer/analyzer.rb:50:in `analyze'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer.rb:184:in `analyze'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer.rb:106:in `block in resolve_dependencies'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/user_interface.rb:49:in `section'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer.rb:105:in `resolve_dependencies'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/installer.rb:90:in `install!'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/command/project.rb:101:in `run'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/lib/cocoapods/command.rb:48:in `run'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/gems/cocoapods-0.34.0.rc2/bin/pod:33:in `<top (required)>'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/bin/pod:23:in `load'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/bin/pod:23:in `<main>'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `eval'
/Users/ktran/.rvm/gems/ruby-2.0.0-p451/bin/ruby_executable_hooks:15:in `<main>'

I noticed in one of the release notes you started to use plutil. I think there is an issue with plutil in the latest Mac OS X 10.10 Yosemite beta release. I don't think this is a "bug" (since Yosemite is not supported), but I think it should be monitored, just so people know.

@segiddins
Copy link
Member

Looking at the stack trace, it just looks like your project file wasn't readable.

@Kurry
Copy link
Contributor Author

Kurry commented Sep 21, 2014

I just verified it was readable, by opening it in Xcode. The issue is plutil though because I get this error:

new-host:ta-flights-ios ktran$ plutil -h
dyld: Library not loaded: /usr/local/lib/libplist.1.dylib
  Referenced from: /usr/local/bin/plutil
  Reason: image not found
Trace/BPT trap: 5
* Now the plutil tool is used when available to produce output consistent with Xcode.
Fabio Pelosin

Source: https://github.com/CocoaPods/CocoaPods/blob/dd70ffddedc8c5d46b9677d8085737f61a00fb17/CHANGELOG.md#enhancements

@segiddins
Copy link
Member

Have you installed plutil via Homebrew? The normal install location is /usr/bin/plutil

@Kurry
Copy link
Contributor Author

Kurry commented Sep 21, 2014

That's a very good point! There isn't a homebrew formula for plutil, so something most have installed it in that local path.

new-host:ta-flights-ios ktran$ brew info plutil
Error: No available formula for plutil 

When I deleted it, it worked!

new-host:ta-flights-ios ktran$ rm -f /usr/local/bin/plutil
new-host:ta-flights-ios ktran$ bundle exec pod install
Analyzing dependencies
Fetching podspec for `TAFlights` from `.`
Downloading dependencies
Using AFNetworking (1.3.4)
Using BZipCompression (1.0.1)
...
Generating Pods project
Integrating client project
new-host:ta-flights-ios ktran$ 

@Kurry Kurry closed this as completed Sep 21, 2014
@alloy
Copy link
Member

alloy commented Sep 21, 2014

We should use the full path to /usr/bin/plutil, I don’t understand why that’s not done right now, there is no point in using from $PATH.

@segiddins
Copy link
Member

@alloy see CocoaPods/Xcodeproj@f835e6e.

@alloy
Copy link
Member

alloy commented Sep 21, 2014

@segiddins Ah man, good find and thanks 👍

@fabiopelosin See, better to not do things for which there really is no point :)

@Kurry
Copy link
Contributor Author

Kurry commented Sep 22, 2014

Glad this wasn't a total waste of time. Thanks for the feedback and help.

@fabiopelosin
Copy link
Member

There is not point in hardcoding the path either :) ... This is a rare issue, as unexpected as the user moving the binary to another location. Also I prefer to not have specific logic when not needed... looking for the full path of the executable in PATH is similar to the behaviour of the shells and follows the principle of least surprise.

@alloy
Copy link
Member

alloy commented Sep 22, 2014

There is definitely a point in hardcoding it. We expect it to be the binary at that location, so that’s what we should try to use. Not hardcoding paths to binaries that you expect to be used inevitably always leads to issues, I have seen it happen time and time again.

alloy added a commit to CocoaPods/Xcodeproj that referenced this issue Sep 22, 2014
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

4 participants