firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.73k stars 3.98k forks source link

Cloud_Firestore cocoapods install error #16686

Open MRtootisabz opened 1 week ago

MRtootisabz commented 1 week ago

Is there an existing issue for this?

Which plugins are affected?

Database

Which platforms are affected?

iOS

Description

I update cloud firestore version in my flutter project and cocoa pods in my system. then i got this error when call pod install.

JSON::ParserError - Failed to parse JSON at file: '/Users/macbookair/.cocoapods/repos/trunk/Specs/9/1/0/gRPC-Core/1.68.0/gRPC-Core.podspec.json'.

Reproducing the issue

cloud_firestore 5.5.0 cocoapods version : 1.16.2 flutter version : 3.24.5

Firebase Core version

3.8.0

Flutter Version

3.24.5

Relevant Log Output

cloud_firestore: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '11.4.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '11.4.0' defined in 'firebase_core'

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

/opt/homebrew/Cellar/cocoapods/1.16.2/libexec/bin/pod install

Report

Stack

   CocoaPods : 1.16.2
        Ruby : ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [arm64-darwin23]
    RubyGems : 3.5.23
        Host : macOS 14.6.1 (23G93)
       Xcode : 15.3 (15E204a)
         Git : git version 2.47.0
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.6/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

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

Podfile

Uncomment this line to define a global platform for your project

platform :ios, '14.0'

CocoaPods analytics sends network stats synchronously affecting flutter build latency.

ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', { 'Debug' => :debug, 'Profile' => :release, '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!

flutter_install_all_ios_pods File.dirname(File.realpath(FILE)) target 'RunnerTests' do inherit! :search_paths end end

post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) end end


### Error

JSON::ParserError - Failed to parse JSON at file: '/Users/macbookair/.cocoapods/repos/trunk/Specs/9/1/0/gRPC-Core/1.68.0/gRPC-Core.podspec.json'.

unexpected token at '"src/core/lib/iomgr/call_combiner.' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification/json.rb:66:in rescue in from_json' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification/json.rb:61:infrom_json' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification.rb:759:in from_string' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification.rb:733:infrom_file' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/source.rb:188:in specification' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification/set.rb:58:inblock in specification_name' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification/set.rb:56:in each' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/specification/set.rb:56:inspecification_name' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/cdn_source.rb:217:in search' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/source/aggregate.rb:83:inblock in search' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/source/aggregate.rb:83:in select' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-core-1.16.2/lib/cocoapods-core/source/aggregate.rb:83:insearch' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:416:in create_set_from_sources' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:385:infind_cached_set' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:360:in specifications_for_dependency' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:165:insearch_for' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:274:in block in sort_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:267:ineach' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:267:in sort_by' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:267:insort_by!' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:267:in sort_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:inblock in sort_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in with_no_such_dependency_error_handling' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:insort_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in push_state_for_requirements' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:inrequire_nested_dependencies_for' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in activate_new_spec' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:inattempt_to_activate' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in process_topmost_state' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:inresolve' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in resolve' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:94:inresolve' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1082:in block in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:insection' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1080:in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:125:inanalyze' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in analyze' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:inblock in resolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in section' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:inresolve_dependencies' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in install!' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:inrun' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in run' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:inrun' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/gems/cocoapods-1.16.2/bin/pod:55:in <top (required)>' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/bin/pod:25:inload' /opt/homebrew/Cellar/cocoapods/1.16.2/libexec/bin/pod:25:in `

'


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

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=Failed+to+parse+JSON+at+file%3A+%27%2FUsers%2Fmacbookair%2F.cocoapods%2Frepos%2Ftrunk%2FSpecs%2F9%2F1%2F0%2FgRPC-Core%2F1.68.0%2FgRPC-Core.podspec.json%27.%0A%0Aunexpected+token+at+%27%22src%2Fcore%2Flib%2Fiomgr%2Fcall_combiner.%27&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

Flutter dependencies

firebase_core: ^3.8.0 firebase_messaging: ^15.1.5

cloud_firestore: ^5.5.0 Screenshot 2024-11-17 at 2 41 19 PM

Additional context and comments

I have reported to cocoapods github page also

SelaseKay commented 1 week ago

Hi @MRtootisabz, I'm unable to reproduce this issue. Could you share a complete minimal repo reproducing this issue?

MRtootisabz commented 1 week ago

@SelaseKay Just create a flutter empty project and add cloud_firestore then pod install.

SelaseKay commented 1 week ago

Hi @MRtootisabz, I'm still unable to reproduce this issue with an new Flutter Project. Kindly upgrade your Xcode and try again.

JherysVargas commented 6 days ago

I had the same error and I solved it by changing the following value in the Podfile platform: ios, '13.0'