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

RuntimeError - [Xcodeproj] Unknown object version. #10984

Closed
1 task done
PunkStarStudios opened this issue Oct 4, 2021 · 15 comments
Closed
1 task done

RuntimeError - [Xcodeproj] Unknown object version. #10984

PunkStarStudios opened this issue Oct 4, 2021 · 15 comments

Comments

@PunkStarStudios
Copy link

PunkStarStudios commented Oct 4, 2021

Report

What did you do?

pod init

What did you expect to happen?

Initialize podfile etc.

What happened instead?

An error occurred

Error

RuntimeError - [Xcodeproj] Unknown object version.
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:218:in `initialize_from_file'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project.rb:103:in `open'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/lib/cocoapods/command/init.rb:41:in `validate!'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:52:in `run'
/Users/punky/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.5.0/bin/pod:55:in `<top (required)>'
/Users/punky/.rbenv/versions/2.4.1/bin/pod:23:in `load'
/Users/punky/.rbenv/versions/2.4.1/bin/pod:23:in `<main>'


## CocoaPods Environment
### Stack

CocoaPods : 1.5.0
Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
RubyGems : 2.7.6
Host : macOS 11.6 (20G165)
Xcode : 13.0 (13A233)
Git : git version 2.24.1
Ruby lib dir : /Users/punky/.rbenv/versions/2.4.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 5f0e69d664cb8452ef4c0b6ae0ea95ce6d46fc61


### Installation Source

Executable Path: /Users/punky/.rbenv/versions/2.4.1/bin/pod


### Plugins

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



## Project that demonstrates the issue

ℹ Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool
[Burgardts.zip](https://github.com/CocoaPods/CocoaPods/files/7280035/Burgardts.zip)
.
@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 4, 2021

you are on a very old version of cocoapods. please update to latest version and also gem update xcodeproj which should support xcode 13.

@dnkoutso dnkoutso closed this as completed Oct 4, 2021
@PunkStarStudios
Copy link
Author

Ya - I tried that... and this is what I get...

Davids-MacBook-Pro:Burgardts punky$ gem update xcodeproj
Updating installed gems
Nothing to update
Davids-MacBook-Pro:Burgardts punky$

And this is after I completely removed pods and reinstalled

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 4, 2021

you will need to update cocoapods gem too. gem update cocoapods you are on 1.5.0 whereas the latest version is 1.11.2.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 4, 2021

its possible the latest version of xcodeproj gem doesnt work with 1.5.0 so you are maxing out what version of xcodproj you can use with 1.5.0 of cocoapods.

@PunkStarStudios
Copy link
Author

Ok. So this is what I did...
gem list --local ! grep cocoapods
gave me a list of all the installed cocoa pods stuff ;P
then sudo gem uninstall [each of the ones in the list one by one]

gem list --local ! grep cocoapods
now shows nothing is installed.

Now I do
sudo gem install cocoapods

The output is :
Fetching cocoapods-1.11.2.gem
Fetching cocoapods-trunk-1.6.0.gem
Fetching cocoapods-try-1.2.0.gem
Fetching cocoapods-search-1.0.1.gem
Fetching cocoapods-plugins-1.0.0.gem
Fetching cocoapods-downloader-1.5.1.gem
Fetching cocoapods-deintegrate-1.0.5.gem
Fetching cocoapods-core-1.11.2.gem
Successfully installed cocoapods-try-1.2.0
Successfully installed cocoapods-trunk-1.6.0
Successfully installed cocoapods-search-1.0.1
Successfully installed cocoapods-plugins-1.0.0
Successfully installed cocoapods-downloader-1.5.1
Successfully installed cocoapods-deintegrate-1.0.5
Successfully installed cocoapods-core-1.11.2
Successfully installed cocoapods-1.11.2
Parsing documentation for cocoapods-try-1.2.0
Installing ri documentation for cocoapods-try-1.2.0
Parsing documentation for cocoapods-trunk-1.6.0
Installing ri documentation for cocoapods-trunk-1.6.0
Parsing documentation for cocoapods-search-1.0.1
Installing ri documentation for cocoapods-search-1.0.1
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-downloader-1.5.1
Installing ri documentation for cocoapods-downloader-1.5.1
Parsing documentation for cocoapods-deintegrate-1.0.5
Installing ri documentation for cocoapods-deintegrate-1.0.5
Parsing documentation for cocoapods-core-1.11.2
Installing ri documentation for cocoapods-core-1.11.2
Parsing documentation for cocoapods-1.11.2
Installing ri documentation for cocoapods-1.11.2
Done installing documentation for cocoapods-try, cocoapods-trunk, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, cocoapods-core, cocoapods after 3 seconds
8 gems installed

However...
pod --version
still reports 1.5.0

So I guess a better question is ... how do I install 1.11.2 ?

@PunkStarStudios
Copy link
Author

Ok - so an even better question...
gem list --local ! grep pod
shows nothing is installed :
*** LOCAL GEMS ***

*** LOCAL GEMS ***

*** LOCAL GEMS ***

but pod --version responds with
1.5.0

I hace no idea how this is happening and am a little loss now for words... Clearly there are conflicting versions or something going on.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 4, 2021

I think you installed it but somehow your environment is not using it. If you want to somehow force it then use https://bundler.io/ with a Gemfile and do bundle install and bundle exec pod install then.

@PunkStarStudios
Copy link
Author

Well - I noticed in the environment - there was a POD file sitting in
/Users/punky/.rbenv/versions/2.4.1/lib

Once I removed that file.. pod --version stopped working... which is good... means it's no where to be found ... that seems to be where the conflicting version was.

So ya - your hint that the environment was not using the correct version was accurate.
So I went and installed it again.
The install all seems to have worked... no errors reported etc.
But when I try any pods command, such as pods --version I get:

rbenv: pod: command not found

I did try out bundler - but it was giving me errors.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 4, 2021

Yeah I am not entirely sure. Sorry. It seems that things were working out once you got the latest version installed.

@PunkStarStudios
Copy link
Author

Actually... it's still not working... I an still getting
rbenv: pod: command not found

However. the Cocoapods GUI is doing something... looks like it is running the pods setup command (which I was not able to do within terminal since pods could not be found)... so I am just letting this all run its course.

I'll be back....

@PunkStarStudios
Copy link
Author

Using Homebrew I removed RUBY and and the ruby environment and rebooted the computer.

Well the GUI fixed up the command line installation... but it was still showing 1.5.0 with pod --version. HOWEVER, the gui reported that a newer version was available and to do a gem install cocoapods.

I did that - it failed on permissions so I did sudo.
This time ... it started doing more and at one point asked me if I wanted to overwrite :
cocoapods's executable "pod" conflicts with /usr/local/bin/pod
Overwrite the executable? [yN]

Of course I said yes.
It did some more work.

At the end... I did pod --version and was told
1.11.2

Eureka... We are getting close.
Tried pod --init

and
drumroll

no Error and the pod file was created.

So.
It seems all is well.

I left this message here so people could see the pain and maybe pickup some hints if they are having the same issues as I had.

@gohilj
Copy link

gohilj commented Oct 15, 2021

you will need to update cocoapods gem too. gem update cocoapods you are on 1.5.0 whereas the latest version is 1.11.2.

This worked for me. I had old cocoapods version

@rome753
Copy link

rome753 commented Nov 8, 2021

sudo gem install cocoapods

Nothing to update, but reinstall cocoapods solved my problem.

@farisarie
Copy link

you will need to update cocoapods gem too. gem update cocoapods you are on 1.5.0 whereas the latest version is 1.11.2.

Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.

this is what i get after gem update cocoapods

@programandoconro
Copy link

@PunkStarStudios this answer helped me https://stackoverflow.com/questions/39481636/updating-to-latest-version-of-cocoapods

You have to install cocoapods again and very importantly link the updated version with brew link --overwrite cocoapods

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

6 participants