Pod init error

I've read and understood the CONTRIBUTING guidelines and have done my best effort to follow. Report What did you do? Run pod init What did you expect to happen? Create podfile. What happened in...

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


Closed

mhmtkrgz opened this issue

Sep 12, 2022

· 18 comments


Closed

Error occurred when executing pod init

#11536

mhmtkrgz opened this issue

Sep 12, 2022

· 18 comments

Comments

@mhmtkrgz

  • I’ve read and understood the CONTRIBUTING guidelines and have done my best effort to follow.

Report

What did you do?

Run pod init

What did you expect to happen?

Create podfile.

What happened instead?

RuntimeError - [Xcodeproj] Unknown object version (56).
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:333:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'

CocoaPods Environment

   CocoaPods : 1.11.3
        Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
    RubyGems : 3.3.11
        Host : macOS 12.5.1 (21G83)
       Xcode : 14.0 (14A309)
         Git : git version 2.37.0 (Apple Git-136)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.1.2_1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

@SergejLogis

Same. I’m on latest CocoaPods version and have updated xcodeproj, as recommended in #11521, but it still doesn’t work.
P.S. Manually changing objectVersion to 55 in project.pbxproj does work, until I change anything in project, obviously.

@thanhnam1042

«brew uninstall cocoapods» and reinstall cocoapods with «sudo gem install cocoapods»

SergejLogis, stavigor, tungdangplus, Taimoor20, sher304, davestrand, sapazutku, mhasan341, yuxin670, KYHyeon, and 7 more reacted with thumbs up emoji
below, kevinmcmahondev, panandafog, douglaspostureco, yuangu, and marcjulianfleck reacted with thumbs down emoji

@saqib-saud

Xcode : 14.0 (14A309)

This issue exists in new projects created using Xcode 14.0. Even pod init fails unless we downgrade the object version to 55 in project file.

@SergejLogis

«brew uninstall cocoapods» and reinstall cocoapods with «sudo gem install cocoapods»

This fixed it for me! Thanks 🙇‍♂️

@saqib-saud

Screen Shot 2022-09-15 at 10 27 28 am

reinstalling cocoapods did not fix the issue but downgrading project format did fix this issue.

sz-ashik440, cherrystz, EddyRog, xiangBiaoOne, dragosmandu, MGAH55, The-Igor, ajevans99, ajithrnayak, SongheeZoeyChoi, and 24 more reacted with thumbs up emoji
heistings reacted with laugh emoji
EddyRog, MGAH55, ajithrnayak, ttaashutoshtt, geadalfa, AmandaTorres, panandafog, Andoran90, hanh-3224, josh-burt, and Deitsch reacted with hooray emoji

@ttaashutoshtt

Screen Shot 2022-09-15 at 10 27 28 am

reinstalling cocoapods did not fix the issue but downgrading project format did fix this issue.

Thank you so much, this fixed the issue for me.

@toufique-imam

gem update xcodeproj
sudo gem update xcodeproj
brew uninstall cocoapods
sudo gem install cocoapods

using these commands together solved my issue

@tungdangplus

Thank to thanhnam1042: «brew uninstall cocoapods» and reinstall cocoapods with «sudo gem install cocoapods»
This fixed for my project created by Xcode 14

@yaozhang-this

After brew uninstall cocoapods I am getting a different error

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:5:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi.rb:2:in `<top (required)>'

This seems to be using the system gems shipped with macOS that is using x86 architecture

The pod command should use the gem compatible with ARM architecture.

@MikkiWhiteDove

@mhasan341

«brew uninstall cocoapods» and reinstall cocoapods with «sudo gem install cocoapods»

Solved! 🥳 Thanks much!

@samplegitrithub

  1. sudo arch -x86_64 gem install ffi
  2. arch -x86_64 pod install
    this two can solve your issue

@SBarpit

gem update xcodeproj
sudo gem update xcodeproj
brew uninstall cocoapods
sudo gem install cocoapods

using these commands together solved my issue

I’m using Xcode 14.0, and this is working for me. Thanks @toufique-imam

@phongle6893

Screen Shot 2022-09-15 at 10 27 28 am

reinstalling cocoapods did not fix the issue but downgrading project format did fix this issue.

Thank you, It works for me 👍

@patratacus

Below works for me (based on all the other answers) after I did brew install and pod init doesn’t work on Xcode 14 project I have.

sudo brew uninstall cocoapods
sudo gem install cocoapods
sudo gem update xcodeproj

Setting Project Format to Xcode 13.0-compatible also works, but I’d rather have it working with Xcode 14

@sourav-singh-rawat

«brew uninstall cocoapods» and reinstall cocoapods with «sudo gem install cocoapods»

This worked for me thanks!

@jubran

Screen Shot 2022-09-15 at 10 27 28 am
reinstalling cocoapods did not fix the issue but downgrading project format did fix this issue.

Thank you, It works for me 👍

working with me
thank u

@heistings

Screen Shot 2022-09-15 at 10 27 28 am

reinstalling cocoapods did not fix the issue but downgrading project format did fix this issue.

Thanks very much, it works for me.

K-Aje108 opened this issue a year ago · comments

  • I’ve read and understood the CONTRIBUTING guidelines and have done my best effort to follow.

Report

What did you do?

Pod init

What did you expect to happen?

Initialisation of pod

What happened instead?

Stack

   CocoaPods : 1.9.3
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.4 (20F71)
       Xcode : 13.0 (13A233)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Error

RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.17.0/lib/xcodeproj/project.rb:227:in `initialize_from_file'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.17.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

CocoaPods Environment

Output of pod env below

Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi —version 1.13.1

Stack

   CocoaPods : 1.9.3
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.4 (20F71)
       Xcode : 13.0 (13A233)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

To use xcode 13 you need latest version of xcodeproj gem. Try gem update xcodeproj or try to upgrade cocopods via gem update cocoapods which should give you latest version of xcodeproj.

Okay I tried this and this is what I received

kanyinaje@UNKNOWN ~ % gem update xcodeproj Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1 Updating installed gems Updating xcodeproj ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. kanyinaje@UNKNOWN ~ % gem update cocoapods Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1 Updating installed gems Updating cocoapods ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory. kanyinaje@UNKNOWN ~ %

Same error as @K-Aje108. Anyone has a solution??

Заметки исполняютсяpod initОшибка заключается в следующем:
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod init

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.4.0.beta.1
        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
    RubyGems : 2.6.13
        Host : Mac OS X 10.13.4 (17E202)
       Xcode : 9.4 (9F1027a)
         Git : git version 2.15.1 (Apple Git-101)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 9b3a30eaf895fced56099a774ddba9978685ef72

Plugins

cocoapods-deintegrate : 1.0.1
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

Error

RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project.rb:217:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.2/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0.beta.1/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0.beta.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.4.0.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don’t forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods…

  • RuntimeError — [Xcodeproj] Unknown object version.
    https://github.com/CocoaPods/CocoaPods/issues/7697 [closed] [19 comments]
    2 days ago

  • Unknown object version
    https://github.com/CocoaPods/CocoaPods/issues/7760 [closed] [1 comment]
    3 weeks ago

  • RuntimeError — [Xcodeproj] Unknown object version.

СтавитьProject Formatизменился наXcode 8.0-compatibleВот и все.

Понравилась статья? Поделить с друзьями:
  • Pod detached ошибка что значит
  • Pod detached как исправить
  • Pod detached smok novo x ошибка
  • Poco f3 датчик приближения как исправить
  • Pocketbook 740 зависла как исправить