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

NoMethodError - undefined method `size' for nil:NilClass #8377

Closed
ucarbehlul opened this issue Dec 26, 2018 · 28 comments
Closed

NoMethodError - undefined method `size' for nil:NilClass #8377

ucarbehlul opened this issue Dec 26, 2018 · 28 comments

Comments

@ucarbehlul
Copy link

ucarbehlul commented Dec 26, 2018

Command

/opt/local/bin/pod install --verbose

Report

  • What did you do?
    I was running pod install to install dependencies.

Stack

   CocoaPods : 1.5.3
        Ruby : ruby 2.2.10p489 (2018-03-28 revision 63023) [x86_64-darwin18]
    RubyGems : 2.6.6
        Host : Mac OS X 10.14.1 (18B75)
       Xcode : 10.0 (10A255)
         Git : git version 2.19.1
Ruby lib dir : /opt/local/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 6adefc22e9c2797b2d91b4c65d22db90acaac49b

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

Podfile

platform :ios, '9.0'

def base_pods
  # Pods for xReactNative
  pod 'Fabric'
  pod 'Crashlytics'
  pod 'TwitterKit'
  pod 'FBSDKCoreKit'
  pod 'FBSDKShareKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKMessengerShareKit'
  pod 'AppsFlyerFramework'
  pod 'Kahuna'
  pod 'Google/SignIn'
end

target 'xProduction' do
    base_pods
end

target 'xStaging' do
    base_pods
end

target 'xDevelopment' do
    base_pods
end


target 'xReactNativeTests' do
    base_pods
end

Error

NoMethodError - undefined method `size' for nil:NilClass
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/macho_file.rb:420:in `populate_mach_header'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/macho_file.rb:234:in `populate_fields'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/macho_file.rb:55:in `initialize_from_bin'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/macho_file.rb:33:in `new_from_bin'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/fat_file.rb:321:in `block in populate_machos'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/fat_file.rb:320:in `each'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/fat_file.rb:320:in `populate_machos'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/fat_file.rb:124:in `populate_fields'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho/fat_file.rb:63:in `initialize'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho.rb:31:in `new'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/ruby-macho-1.2.0/lib/macho.rb:31:in `open'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:431:in `dynamic_binary?'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:164:in `block in vendored_dynamic_frameworks'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `select'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `vendored_dynamic_frameworks'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:172:in `vendored_static_frameworks'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:122:in `add_static_dependency_build_settings'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:89:in `block in add_settings_for_file_accessors_of_target'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:86:in `each'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:86:in `add_settings_for_file_accessors_of_target'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:424:in `block in generate_vendored_build_settings'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:422:in `each'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:422:in `generate_vendored_build_settings'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:79:in `generate'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:39:in `save_as'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:107:in `update_changed_file'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:96:in `block in create_xcconfig_file'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:in `each'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:in `create_xcconfig_file'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:18:in `block in install!'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:14:in `install!'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:181:in `block (2 levels) in install_libraries'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:in `each'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:in `block in install_libraries'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:167:in `install_libraries'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:65:in `generate!'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:184:in `block in generate_pods_project'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:183:in `generate_pods_project'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:119:in `install!'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/opt/local/lib/ruby2.2/gems/2.2.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/opt/local/bin/pod:22:in `load'
/opt/local/bin/pod:22:in `<main>'
@ucarbehlul
Copy link
Author

Removing contents of Pods folder solved the issue.

@dnkoutso
Copy link
Contributor

Something was installed in your Pods folder that was failing. If you can reproduce it can you please upload sample

@dnkoutso dnkoutso closed this as completed Jan 1, 2019
@ZhuHui19921129
Copy link

It happens pod install for Flutter,Flutter needs to upgrade, then flutter clean. then flutter build iOS

@TheWalkingDead1024
Copy link

It happens pod install for Flutter,Flutter needs to upgrade, then flutter clean. then flutter build iOS

It does not work for me. Could anybody help me with this issue?

@czqasngit
Copy link

It happens pod install for Flutter,Flutter needs to upgrade, then flutter clean. then flutter build iOS

It works for me, thanks you!!!~

@victorkifer
Copy link

victorkifer commented Nov 18, 2019

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

@zhouyangyng
Copy link

It happens pod install for Flutter,Flutter needs to upgrade, then flutter clean. then flutter build iOS

It works for me. Thanks~

@rufw91
Copy link

rufw91 commented Feb 15, 2020

Removing contents of Pods folder solved the issue.

Solved for me too

@kashbase
Copy link

works Thanks

@jiyeyuran
Copy link

It does not work for me. I am working on a react native project. I've tried rm -rf Pods, pod install and pod update.

@JigneshWorld
Copy link

Thanks @victorkifer worked for me. (y)

@karan-rawal
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

You just saved me. :)

@JoakimLiu
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Thank you

@DanielCardona
Copy link

DanielCardona commented Jul 3, 2020

rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec```


@victorkifer, you are my new hero!  ;-)

@jurgenizer
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Thank you very very much @victorkifer - it worked!

@hasherhari
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Thank you

@AhmedAlaa96
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Thank you

@w819314930
Copy link

flutter clean
flutter pub get
pod install
problem solving

@a8thunder
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

thanks you

@mreram
Copy link

mreram commented Dec 13, 2020

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

Nice, solved!

@JasonXZJ
Copy link

JasonXZJ commented Jan 8, 2021

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

It works for me. Thanks~

@MASKADEV
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

thanks

@KohlsAdrian
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

If it was on StackOverflow, this should be the accepted answer

@nixonoftheyear
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

save my day, thanku!

@padishahG
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

thanks

@carusd
Copy link

carusd commented May 18, 2021

no solution above works for me, have to remove all files from git

then make a hardcore git reset --hard HEAD

@amitsaha-93
Copy link

Also faced with this issue. Fixed by updating flutter and cocoa pods to the latest version and then

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec

It's works perfectly

@azarAngga
Copy link

thanks bro u make my day :)

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