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

Parsing Xcode projects using plist gem fails #5724

Closed
1 task
labargmd opened this issue Aug 8, 2016 · 16 comments
Closed
1 task

Parsing Xcode projects using plist gem fails #5724

labargmd opened this issue Aug 8, 2016 · 16 comments
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!

Comments

@labargmd
Copy link

labargmd commented Aug 8, 2016

Command

/Users/myusername/.rbenv/versions/2.2.3/bin/pod init

Report

What did you do?

Run pod init

What did you expect to happen?

The init to run correctly.

What happened instead?

The Runtime Error (Unimplemented element) shown.

Stack

   CocoaPods : 1.0.1
        Ruby : ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
    RubyGems : 2.4.5.1
        Host : Mac OS X 10.11.6 (15G31)
       Xcode : 7.3.1 (7D1014)
         Git : git version 2.5.2
Ruby lib dir : /Users/myusername/.rbenv/versions/2.2.3/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ f9227bd28f1b4b14a916882756e167fcb2baa0b4

Installation Source

Executable Path: /Users/myusername/.rbenv/versions/2.2.3/bin/pod

Plugins

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

Error

RuntimeError - Unimplemented element
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/plist-3.2.0/lib/plist/parser.rb:105:in `parse'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/plist-3.2.0/lib/plist/parser.rb:29:in `parse_xml'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist/plist_gem.rb:23:in `read_from_path'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/xcodeproj-1.2.0/lib/xcodeproj/plist.rb:22:in `read_from_path'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/xcodeproj-1.2.0/lib/xcodeproj/project.rb:102:in `open'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/claide-1.0.0/lib/claide/command.rb:333:in `run'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.1/lib/cocoapods/command.rb:50:in `run'
/Users/myusername/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/cocoapods-1.0.1/bin/pod:55:in `<top (required)>'
/Users/myusername/.rbenv/versions/2.2.3/bin/pod:23:in `load'
/Users/myusername/.rbenv/versions/2.2.3/bin/pod:23:in `<main>'
@orta
Copy link
Member

orta commented Aug 8, 2016

Can Xcode open your xcodeproject?

@labargmd
Copy link
Author

labargmd commented Aug 8, 2016

'pod init' first failed on an existing project. In accordance with the
contributing guide, I created a brand new project in xcode and tried it
there. It failed there as well. xcode still opens the new project.​

On Mon, Aug 8, 2016 at 9:19 AM, Orta notifications@github.com wrote:

Can Xcode open your xcodeproject?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5724 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOJwTPCNBkz8yM5KE1m91t99a1iJRrd3ks5qdyzUgaJpZM4JfBq9
.

@orta
Copy link
Member

orta commented Aug 8, 2016

I wonder if there's a new type of element in the plists you're creating - can you try with the 1.1 beta please? Either use a Gemfile, or use gem install cocoapods --pre to get it.

@labargmd
Copy link
Author

labargmd commented Aug 8, 2016

The gem install appears to have succeeded, but 'pod init' results in the
same error.​

On Mon, Aug 8, 2016 at 9:26 AM, Orta notifications@github.com wrote:

I wonder if there's a new type of element in the plists you're creating -
can you try with the 1.1 beta please? Either use a Gemfile
https://guides.cocoapods.org/using/a-gemfile.html, or use gem install
cocoapods --pre to get it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5724 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AOJwTOn0tiw514P3Vf0UG6CgefTVNGA_ks5qdy6hgaJpZM4JfBq9
.

@neonichu
Copy link
Member

neonichu commented Aug 9, 2016

Interesting, looks like parsing falls back to the plist gem instead of using DevToolsCore or Foundation.

@neonichu
Copy link
Member

I can definitely repro this with any new project and forcing the plist gem fallback, so I guess that it is not actually working anymore.

@neonichu neonichu changed the title Error running 'pod init' Parsing Xcode projects using plist gem fails Aug 11, 2016
@neonichu neonichu 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 Aug 11, 2016
@neonichu
Copy link
Member

Giving it a quick look, I don't think that it really ever worked in the current setup, because the plist gem seems to only support XML plists.

@segiddins
Copy link
Member

@neonichu yup, but it should work for XML plists -- the idea behind it was to allow running on linux wherever possible, but it's always been basically untested

@neonichu
Copy link
Member

Makes sense, might be worth adding a check to see if the input is even XML to avoid confusion when it is being hit as a fallback.

@phthaloblue
Copy link

I'm suddenly running into this too. Is there a workaround? A way to avoid falling back to the plist gem? I'm on 10.11.6, Xcode 7.3.1, cocoapods 1.0.1.

@gzfrancisco
Copy link

Also happens with: cocoapods: 1.0.0

@gzfrancisco
Copy link

gzfrancisco commented Aug 23, 2016

I don't know if it's the same problem but I figured out how to fix it:

  1. gem update --system
  2. gem update bundler
  3. Make sure you have a Gemfile
  4. bundle install
  5. bundle update
  6. pod init
  7. pod install

@phthaloblue
Copy link

Uninstalling and reinstalling ruby fixed my issue.

The underlying reason may have been a bad path for libffi, which caused require 'fiddle' to fail.

@neonichu
Copy link
Member

Interesting, which ruby version are y'all using?

@labargmd
Copy link
Author

ruby 2.2.3p173 (2015-08-18 revision 51636)
i'm traveling, so have been unable to try gzf or phth's suggestions yet. thanks, though- looking forward to getting past this.

@gzfrancisco
Copy link

Mine is ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15] also it worked with rubinius 3.33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor 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

6 participants