-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 `each' for nil:NilClass #9239
Comments
There is insufficient information for us to diagnose this issue. Please provide a sample app and steps to reproduce. Going to close preemptively until a sample app or steps to reproduce are included since we are getting a high volume of issues. |
@dnkoutso same issue I'm facing project-103524:ios bhumin3imac$ pod install Analyzing dependencies ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― Command
Report
Stack
Plugins
Podfile# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '11.0'
target '@FirebaseApp' do
project '@FirebaseApp.xcodeproj'
pod 'FirebaseMessaging', '~> 2.0.0'
end Error
――― TEMPLATE END ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― [!] Oh no, an error occurred. Search for existing GitHub issues similar to yours: If none exists, create a ticket, with the template displayed above, on: Be sure to first read the contributing guide for details on how to properly submit a ticket: Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods...
and 206 more at: |
In case anybody else gets this error and is routed here: You will see this error if you've had a bad merge on your Podfile.lock. Specifically, when I saw the issue, it was because there was a trailing colon ":" on a pod line like so:
You can delete that errant line and then re-run |
@cchamb-gh Thanks! |
@cchamb-gh 's solution really worked perfectly for me. I deleted the unnecessary semi-colon (which is used to indicate that the following packages, which are normally indented, are dependencies) and ran |
I deleted Podfile.lock and ran |
flutter clean |
The @cchamb-gh is right. For example: On this case, you only need to remove the semi-colon from
|
Tks. it solve my problem |
Deleting the |
@up I found problem. It was typo in Podfile. Things started working. Hello ――― MARKDOWN TEMPLATE ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― Command
Report
Stack
Plugins
Podfile# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :rease,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end Error
After updating MacOS once moreI tried solution from @w819314930, I couldn’t try solution from @cchamb-gh because I do not have Podfile.lock file. What more can I do? I’d be thankful for any suggestions. |
This helped. Seems to be an issue with mixed info within Podfile.lock |
same error in 1.7.1, 1.8.0, and 1.8.3
The text was updated successfully, but these errors were encountered: