A fix will ship with CocoaPods 1.9.2. However, even if you upgrade you might still have a corrupt CocoaPods cache from before. Upgrading to 1.9.2 will ensure you wont see this issue again hopefully.
To resolve corrupt cache part then remove the CocoaPods repo cache:
sudo rm -rf ~/.cocoapods/repos
If this does not work you are having a different issue and should file a new issue.
ℹ pod spec lint MyPodSpec.podspec --verbose --allow-warnings
ℹ Validate my podspec.
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
MyProject (1.17.0) - Analyzing on iOS 13.0 platform.
/usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35: warning: The called method `initialize' is defined here
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-App`: (``)
Fetching external sources
-> Fetching podspec for `MyProject` from `/Users/user/Development/server/myrepo/MyProject-swift5/MyProject.podspec`
Resolving dependencies of
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
CDN: trunk Relative path: all_pods_versions_d_a_2.txt exists! Returning local because checking is only perfomed in repo update
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete
CDN: trunk Relative path: Specs/d/a/2/Alamofire/5.0.2/Alamofire.podspec.json exists! Returning local because checking is only perfomed in repo update
-> MyProject (1.17.0)
- ERROR | [iOS] unknown: Encountered an unknown error (783: unexpected token at ''
/usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse'
/usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:216:in `search'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:in `resolve'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `block in download_pod'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `download_pod'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:389:in `block in perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:130:in `validate'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:78:in `block in run'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `each'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
) during validation.
ℹ
```### Stack
CocoaPods : 1.9.1
Ruby : ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
RubyGems : 3.1.2
Host : Mac OS X 10.15.4 (19E266)
Xcode : 11.4 (11E146)
Git : git version 2.24.1 (Apple Git-126)
Ruby lib dir : /usr/local/Cellar/ruby/2.7.0/lib
## Additional notes
I've tried to fallback to previous versions of cocoapods, unsuccessfully, until I reached 1.7.5:
`pod _1.7.5_ spec lint MyPodSpec.podspec --verbose --allow-warnings`
This worked like a charm.
## MyPodSpec
Pod::Spec.new do |s|
s.name = 'MyPodSpec'
s.platform = :ios, "13.0"
s.ios.deployment_target = "13.0"
s.swift_version = "5.0"
s.version = '1.17.0'
s.source = { :git => 'https://gitlab.mycompany.it/mobile/myrepo.git', :tag => s.version.to_s }
s.authors = { 'Me' => '[email protected]' }
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.homepage = 'https://www.mycompanywebsite.it/'
s.summary = 'MyPodSpec'
s.source_files = 'MyPodSpec-swift5/MyPodSpec/Classes/OpenAPIs/*/.swift'
s.dependency 'Alamofire', '~> 5.0.2'
end
```
What am I doing wrong?
Thanks for your help,
Alessandro
We've seen these reports quite a bit lately. I am unable to reproduce as I am trying different Podfiles that people provide. I really need some help for someone to debug this.
Hi guys,
yesterday I managed to track down the issue: Alamofire >= 5.
Apparently the new version of Alamofire breaks the validation of my podspec. After a few tests I noticed that the word "Alamofire" was appearing here and there, depending on different build flags, and I started looking into it and I found out that all began after a pod update
that pulled the new version of it (5.0.2).
In my podspec I used to have s.dependency 'Alamofire'
, therefore it started using the new version.
As soon as I changed it to s.dependency 'Alamofire', '~> 4.9.0'
everything went smoothly.
As an additional context, maybe it matters: my pod is a library created through OpenAPIGenerator, that creates networking libraries based on Alamofire. Not sure if it's really connected to it, maybe not.
As far as I'm concerned this issue can be closed, but the problem with Alamofire >= 5 still lives, up to you to decide whether to keep this post to track it or not. :-)
Thanks,
Alessandro
Thanks! I will keep it closed for now.
Actually I will keep it open for now as more reports coming in.
I will try to learn a bit of ruby to try to debug this, any idea of a good page or book I can read? Or any idea in what way can I help?
Error: [iOS] Unable to install Firebase using pod install
Facing a similar error, can someone help me with this?
/usr/local/bin/pod install
pod install
Pod Installation for Google Firebase
Error Occured
CocoaPods : 1.9.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.4 (19E266)
Xcode : 11.3.1 (11C504)
Git : git version 2.21.1 (Apple Git-122.3)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.1.0
platform :ios, '9.0'
target 'Flash Chat iOS13' do
use_frameworks!
# Pods for Flash Chat iOS13
#pod 'CLTypingLabel'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
end
JSON::ParserError - 783: unexpected token at ''
/Library/Ruby/Gems/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Will someone with this problem share a reproducible zip or GitHub repo? I've been unable to reproduce from text descriptions.
Do the solutions at #9611 help?
Here is a project that i just created and gives the same error, trying to pod install (Firebase/Analytics):
https://github.com/IgnaOromendia/TestCocoaPodIssue
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but worked
Having this issue also...
We need clear steps to reproduce this. We have a gut-feeling its within CDN responses but we are not aware of that. Please someone who has this issue dig in and print out debug statements if possible.
@dnkoutso if you would recommend some commands or instructions I'd be happy to post the output. Unfortunately am inexperienced in this area so am not able to go about it myself.
Look at the stacktrace and do the following:
JSON::ParserError - 783: unexpected token at ''
/Library/Ruby/Gems/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver/lazy_specific
Open with your editor the file /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb
and add to the method:
def self.from_json(json)
require 'json'
puts "======"
puts json
puts "======"
hash = JSON.parse(json)
from_hash(hash)
end
Do that _before_ your cache or cocoapods is wiped out so we can diagnose what made the cache dirty with a bad file.
Analyzing dependencies
======
======
This is what happened before the markdown template began @dnkoutso
EDIT: Signing off now as it is late at night. Will continue this tomorrow.
@Sparrownor1 and the project still crashed with the same stacktrace? My advise is to continue further on debugging until we see some output on what exactly the podspec we are trying to parse looks like.
I think what is happening is an erroneous response is stored in our cache and it corrupts it and subsequent installations fail.
Also in specification.rb
add:
def self.from_string(spec_contents, path, subspec_name = nil)
path = Pathname.new(path).expand_path
spec = nil
case path.extname
when '.podspec'
Dir.chdir(path.parent.directory? ? path.parent : Dir.pwd) do
spec = ::Pod._eval_podspec(spec_contents, path)
unless spec.is_a?(Specification)
raise Informative, "Invalid podspec file at path `#{path}`."
end
end
when '.json'
puts path
puts "======"
puts spec_contents
spec = Specification.from_json(spec_contents)
else
raise Informative, "Unsupported specification format `#{path.extname}` for spec at `#{path}`."
end
spec.defined_in_file = path
spec.subspec_by_name(subspec_name, true)
end
Sorry again, total noob here, but I'm not sure how to continue debugging. I am also finding it hard to make sense of what you have just explained, probably due to my lack of experience. Please advise if you are able to and I will give you whatever output is required.
@Sparrownor1 see my comment above to continue on another method to add log statements.
Analyzing dependencies
/Users/[anon]/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.21.0/Firebase.podspec.json
======
Can you open -e /Users/[anon]/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.21.0/Firebase.podspec.json
I bet the file is empty?
Different error this time though
NameError - undefined local variable or method `contents' for Pod::Specification:Class
Did you mean? constants
Should be puts spec_contents
Also yes, empty file at specified path
So something somehow got an empty cache response and we stored that and cocoapods is unable to parse it.
Result after changing to spec_contents
Analyzing dependencies
/Users/[]/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.21.0/Firebase.podspec.json
======
======
======
Error is back to a 767
So yes overall this file is corrupted somehow. We do not know _how_ but the fix here is perhaps for us to guard through this and ensure the cache protects itself from adding a corrupt entry if possible.
@dnkoutso This file meaning the firebase podspec json?
yes
This is probably a bad question, but do you think reinstalling XCode would help? Is it worth a try?
Also, does any of this depend on the google info plist file that Firebase prompted me to add to the project?
nope neither would help. This is a bug in CocoaPods.
Okay, will join you again tomorrow.
How come this is not an overarching bug that affects everyone then? A friend is working on the same project as me and has had no issues.
The issue is because at some users are experiencing intermittent and erroneous response probably through CDN that ends up corrupting the cache, while for (most) others it works, including us who we cannot reproduce this issue.
@dnkoutso so what are potential solutions to this problem? Are there any?
Is it possible to get the same result as using a replacement to CocoaPods (like Carthage)?
Carthage is a completely different dependency manager and system. It will will most certainly not have this problem as this is specific to CocoaPods. Feel free to switch to that if it works for you.
Workaround for CocoaPods might bge pod cache clean --all
and try again.
If you get the issue again its worthwhile debugging again.
Okay, will try to clean cache. Do I clean cache before deintegrating and removing Podfile? or do I even need to do those steps? Had tried this before but maybe I did it in the wrong order so that's why I'm asking
Also, considering the Firebase podspec was empty, is it a good idea to copy-paste its contents from the GitHub page?
@dnkoutso I added to the podspec.json file and it provoked output. The file paths outputted by the code you added ended with Specs/0/3/5/Firebase/[Version Number]/Firebase.podspec.json
.
The output consisted of the files increasing in version, ie 5.8.0 then 5.9.0 with the outputted JSON below. The code breaks when the version number reaches 5.10.0.
I did some manual digging in the file paths, and all the podspec.json files starting from 6.13.0 are empty. There are some spotty unfilled files earlier as well like 6.5.0
@dnkoutso I have been manually copy-pasting in the contents of empty pod spec files from the GitHub repo and now pod install seems to have worked. I have all the files I edited currently open so if I have by chance made a grave error please let me know and I will undo it all.
Final output of pod install:
Downloading dependencies
Installing BoringSSL-GRPC (0.0.3)
Installing Firebase (6.21.0)
Installing FirebaseAuthInterop (1.1.0)
Installing FirebaseCore (6.6.5)
Installing FirebaseCoreDiagnostics (1.2.2)
Installing FirebaseCoreDiagnosticsInterop (1.2.0)
Installing FirebaseFirestore (1.11.2)
Installing GoogleDataTransport (5.1.0)
Installing GoogleDataTransportCCTSupport (2.0.1)
Installing GoogleUtilities (6.5.2)
Installing abseil (0.20190808)
Installing gRPC-C++ (0.0.9)
Installing gRPC-Core (1.21.0)
Installing leveldb-library (1.22)
Installing nanopb (0.3.9011)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Sustain.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 15 total pods installed.
[!] Automatically assigning platform `iOS` with version `13.2` on target `Sustain` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
Try This It worked for me
Thanks @IgnaOromendia
I know this is a complete hack, but I modified the file the error happens:
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:119
And just added a blank else case above it so it won't fail:
elsif swift_pod_target.swift_version.blank?
elsif swift_pod_target.swift_version.empty?
"- `#{swift_pod_target.name}` does not specify a Swift version (#{swift_pod_target.spec_swift_versions.map { |v| "`#{v}`" }.to_sentence}) " \
"that is satisfied by any of targets (#{swift_pod_target.target_definitions.map { |td| "`#{td.name}`" }.to_sentence}) integrating it."
end
Save that (admin privileges, of course) and now I can run pod install
once more:
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 15 dependencies from the Podfile and 24 total pods installed.
It's a complete hack - but it got me back on track!
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
For some reasons this worked for me
The reason this works for most is because the steps provided are deleting ~/.cocoapods/repos
which probably has the corrupt podspec.
Had this issue as well, but I found if you bring your Xcode Project back to version 11.0, Cocopods works fine. v11.4 seems to break everything
Here are my podfile and podlock files. pod install
works fine for me every time. But if i try pod update
it shows the same error 767 as others have mentioned. Hope the attached files help.
I'm using XCode 11.4.
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
These steps mentioned by other users earlier somehow fixed the issue.
@kamalk2 if you downgrade your project to Xcode 11.0 it should work
@kamalk2 if you downgrade your project to Xcode 11.0 it should work
Thanks @crazykarlau but somehow reinstalling the pods as mentioned earlier worked like a charm. I'm able to install/update pods as usual now even with XCode 11.4.
Ok, must be some issue with the pods upgrade script
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
These steps mentioned by other users earlier somehow fixed the issue.
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but worked
Reinstall cocoapods works for me too!
rm -rf ~/.cocoapods/repos/trunk/
pod install
pod update xxx
worked for me!
Same here:
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
I have tried this but unfortunately, it was not successful. I am still getting the same JSON Parse error.
JSON::ParserError - 783: unexpected token at ''
This error only happens whenever I try to add a Firebase dependency. Whenever I remove the firebase dependency, it works again.
I notice that it's getting a timeout whenever it's trying to get the json files and i'm getting messages such as this:
pod install --verbose
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/4.2.0/Firebase.podspec.json to
https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/4.2.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/5.15.0/Firebase.podspec.json to
https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/5.15.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/5.9.0/Firebase.podspec.json to
https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/5.9.0/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/4.8.2/Firebase.podspec.json to
https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/4.8.2/Firebase.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/0/3/5/Firebase/5.2.0/Firebase.podspec.json to
https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/5.2.0/Firebase.podspec.json
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/2.5.0/Firebase.podspec.json Response: Timeout was reached,
retries: 4
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/1.0.7/Firebase.podspec.json Response: Timeout was reached,
retries: 4
CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/0/3/5/Firebase/3.11.0/Firebase.podspec.json Response: Timeout was reached,
retries: 4
But in the end, it ended up getting downloaded with this message..
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/2.0.1/Firebase.podspec.json, save ETag: W/"fd63c87c3f5ad88f802164e72c8fa537d02eb233068617a7bc5d044ecf9f271b"
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/2.5.1/Firebase.podspec.json, save ETag: W/"ac40bd8f2ad85b77548ba099b21b787b933c5091987cdbbf80a782051c643a05"
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/2.5.0/Firebase.podspec.json, save ETag: W/"b7d03d00a78beb78259dac6f5533bd4ec75d2f826eac3b04b515916e8cf09972"
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/1.0.7/Firebase.podspec.json, save ETag: W/"eb6874708c57cc5746c49f0d4edb85c133e06d8df908bfedf46e47a8190cd9fe"
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/3.11.0/Firebase.podspec.json, save ETag: W/"3b7cba0b6fdb46fc0efaecdfc1bed4a66a496c2f80a9ed643681ea8afb8e20eb"
CDN: trunk Relative path downloaded: Specs/0/3/5/Firebase/2.1.2/Firebase.podspec.json, save ETag: W/"24973bfab54a4c2e670136a5e48b9b04001b931165e1f0f63f8b258b82803af1"
CDN: trunk Relative path: Specs/0/3/5/Firebase/6.22.0/Firebase.podspec.json modified during this run! Returning local
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
/usr/local/bin/pod install --verbose
and so on.
I am not really sure how to make sense of this.
this is happening to me on circleci, but working fine locally
they use this to fetch cocoapods specs
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
could this be a problem?
This is definitely a caching issue. I have somehow gotten an empty podspec
file.
In addition to the above debug print I added:
puts path
Output:
/Users/storr/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.13.0/Firebase.podspec.json
======
======
What it should be : https://github.com/CocoaPods/Specs/blob/master/Specs/0/3/5/Firebase/6.13.0/Firebase.podspec.json
But it is empty on my computer:
$ ls -la /Users/squirly/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.13.0/Firebase.podspec.json
-rw-r--r-- 1 squirly staff 0 Apr 15 14:24 /Users/storr/.cocoapods/repos/trunk/Specs/0/3/5/Firebase/6.13.0/Firebase.podspec.json
Removing ~/.cocoapods
resolved the issue, and I kept a copy of the ~/.cocoapods
that fails if that would be useful.
we upgraded to latest macos version on circleci, and also moved to ruby 2.7 and the issue was solved
Thanks @squirly . Not sure if keeping it around will help, perhaps for a test case.
The best path I can see here is writing a test or force a case which we believe the cache can be added a corrupt/empty file.
We can be defensive and if a podspec is loaded from the cache but cannot be parsed then we wipe it out and try to re-download it.
Basically because it is hard to reproduce this issue in real time we can just assume it can happen and prevent CocoaPods from crashing or using that invalid podspec.
@gmhcode solution helped me with Flutter firestore package
https://github.com/CocoaPods/CocoaPods/issues/9611#issuecomment-599125090
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
I have this issue on react native too, but its work for me,
i removed the pod.lock, keep the existing podfile, and run pod install
This is gonna be super stupid, but what fixed the problem for me was that I was in the wrong directory - I needed to have been in the root project directory (same location as Podfile
)
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
This also worked for me. Thank you so much.
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
This also worked for me, thanks a lot Sir!
For me this was happening on our release
branch few hours back, with one of our private pods. When i removed it pod install
went fine when i added it back it failed.
But our CI never showed any problems.
I then switched to some other task and just now tried again and it worked on release
without any new commits.
All of our systems are on same OS, cocoapods, ruby(via rvm), Xcode versions.
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
pod install
Works for me
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but workedThis also worked for me. Thank you so much.
Also worked for me. Thank you!
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
cd ios
pod init
(put cocoapod in podfile)
pod install
Worked for me with the las commands inside ios directory
Instead add a :+1:
This will keep it quiet here for people tracking the resolution of this issue and communicating about a solution.
@dnkoutso Could we add a note at the top of to the original issue with the current workaround?
This is a caching issue and to resolve this while a solution is build all do is remove the cocoapods repo cache:
sudo rm -rf ~/.cocoapods/repo
If this does not work you are having a different issue and should file a new issue.
done
Please do not add a worked for me
Instead add a 👍
This will keep it quiet here for people tracking the resolution of this issue and communicating about a solution.
@dnkoutso Could we add a note at the top of to the original issue with the current workaround?
TEMPORARY WORKAROUND
This is a caching issue and to resolve this while a solution is build all do is remove the cocoapods repo cache:
sudo rm -rf ~/.cocoapods/repo
If this does not work you are having a different issue and should file a new issue.
I tried all of the above workaround and they didn't work, but in the end I restarted my computer and its working. 😂
In my situation cocoapods installed with HomeBrew but ruby installed with rbenv.
Uninstalled brew based ruby and cocoapods and install again fixed for me.
brew uninstall ruby;
brew uninstall cocoapods;
gem install cocoapods;
pod repo remove trunk;
pod install;
hi everyone, i'm new here. I found same problems with pod install, i've done:
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but worked
The same error occured to me and I tried to insert below command before starting pod install:
% rm -rf ~/.cocoapods/repos/trunk/
% pod install
Problem solved and it worked like a charm
But please let me understand what repo does exactly because I'm new to Xcode & Cocoapods!
Does it will effect my local repository in source control ??
Pls answer my question
What is working for me is pod update rather than pod install after doing rm -rf ~/.cocoapods/repos/trunk/
I got this error on my computer, but on another computer everyting is ok. The same project the same podspec file and the same version of cocoapods(1.9.1).
pod spec lint
-> XXXXXX (1.5.8)
- ERROR | [iOS] unknown: Encountered an unknown error (767: unexpected token at '') during validation.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error.
I got this error on my computer, but on another computer everyting is ok. The same project the same podspec file and the same version of cocoapods(1.9.1).
pod spec lint
-> XXXXXX (1.5.8)
- ERROR | [iOS] unknown: Encountered an unknown error (767: unexpected token at '') during validation.
Analyzed 1 podspec.
[!] The spec did not pass validation, due to 1 error.
Maybe this is the reason:
I delete the 'iOS 9.2.simruntime', and then everything is ok.
I'm a novice with gem pods technology, so forgive my ignorance.
I had not touched one of my Xcode projects in over a year. Another in months.
I got the error describe above no matter which of the "workaround" solutions I tried.
I uninstalled and re-installed pods as instructed in comments above, so I had the latest version.
What worked is adding the following "open source" section to the top of each project's Podfile file and adding the line:
source 'https://github.com/CocoaPods/Specs.git'
I then ran under each project folder the command:
pod update
Output:
Update all pods
Updating local specs repositories
Cloning spec repo cocoapods
from https://github.com/CocoaPods/Specs.git
$ /usr/bin/git -C /Users/gregorybarnardimac/.cocoapods/repos/cocoapods fetch origin --progress
remote: Enumerating objects: 28, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 18 (delta 12), reused 0 (delta 0), pack-reused 0
From https://github.com/CocoaPods/Specs
085c7c0bd83..782d559048f master -> origin/master
$ /usr/bin/git -C /Users/gregorybarnardimac/.cocoapods/repos/cocoapods rev-parse --abbrev-ref HEAD
master
$ /usr/bin/git -C /Users/gregorybarnardimac/.cocoapods/repos/cocoapods reset --hard origin/master
HEAD is now at 782d559048f [Add] iOS_wis 2.0.19
Analyzing dependencies
Downloading dependencies
Installing Crashlytics 3.14.0 (was 3.13.2)
Installing Firebase 6.23.0 (was 6.3.0)
Installing FirebaseAnalytics 6.4.2 (was 6.0.2)
Installing FirebaseCore 6.6.7 (was 6.0.3)
Installing FirebaseCoreDiagnostics (1.2.4)
Installing FirebaseCoreDiagnosticsInterop (1.2.0)
Installing FirebaseInstallations (1.2.0)
Installing Google-Mobile-Ads-SDK 7.58.0 (was 7.46.0)
Installing GoogleAppMeasurement 6.4.2 (was 6.0.2)
Installing GoogleDataTransport (6.0.0)
Installing GoogleDataTransportCCTSupport (3.0.0)
Installing GoogleUtilities 6.6.0 (was 6.2.1)
Installing PromisesObjC (1.2.8)
Installing nanopb 0.3.9011 (was 0.3.901)
Removing FirebaseInstanceID
Generating Pods project
Integrating client project
Pod installation complete! There are 4 dependencies from the Podfile and 15 total pods installed.
I am now working on Dark Mode!!!
None of the solutions above worked for me.
Here is my sample project.
/usr/local/bin/pod install
CocoaPods : 1.9.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.4 (19E287)
Xcode : 11.4.1 (11E503a)
Git : git version 2.24.2 (Apple Git-127)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
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
platform :ios, '13.0'
use_frameworks!
target 'podtest' do
pod 'Firebase/Auth'
end
JSON::ParserError - 767: unexpected token at ''
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
pod installWorks for me
This works for me, make sure that you uninstall cocoapods. that was the problem I had so after uninstalling cocoapods and follow those steps it works, yay
Reinstalling cocoapods did not work for me.
Finally I fixed it inserting source 'https://github.com/CocoaPods/Specs.git'
at the top of the Podfile
(like @animalfat ).
I am new at iOS, Xcode, cocoa and all the other stuff... I would like understand a bit more... maybe I will...
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
This worked for me!
For me delete use_native_modules!
working, but I believe it's not a solution...
We believe we have identified the root cause for this issue and will ship CocoaPods 1.9.2 with it.
The fix will be in CocoaPods/Core https://github.com/CocoaPods/Core/pull/629
Keep in mind folks who hit this issue might have a bad cache and the workaround to wipe out the cache will _still_ be required for folks who are stuck in this state.
Closing as it was merged in CocoaPods/Core fix for 1.9.2 release.
Updating header at the top.
@dnkoutso when do you plan to release 1.9.2 ?
next week.
If this help there is more info about the bug,
When trying to install pod
'Instabug', '9.1.3'
the process will fail with 767 unexpected error
But if the pod is downgraded to :
'Instabug', '9.1.2'
It will work
1.9.2 has shipped with what we believe is a fix in CocoaPods/Core. Keep in mind that you might still have a corrupt cocoapods cache to which you should pod cache clean --all
and sudo rm -rf ~/.cocoapods/repos
to be certain.
This issue will remain closed.
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod installand worked, I don't know why, but worked
Worked, thanks
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but workedWorked, thanks
This worked for me too + Thank you
clearing the cache with the line of code you mentioned still works! Really appreciate you putting it up for us all. 💯
But the issue is still existing I used 1.9.2 @dnkoutso
The process is so slow when installed Spec repo,,,,,
TEMPORARY WORKAROUND
A fix will ship with CocoaPods 1.9.2. However, even if you upgrade you might still have a corrupt CocoaPods cache from before. Upgrading to 1.9.2 will ensure you wont see this issue again hopefully.
To resolve corrupt cache part then remove the CocoaPods repo cache:
sudo rm -rf ~/.cocoapods/repos
If this does not work you are having a different issue and should file a new issue.
- [x] I've read and understood the _CONTRIBUTING_ guidelines and have done my best effort to follow.
Report
What did you do?
ℹ
pod spec lint MyPodSpec.podspec --verbose --allow-warnings
What did you expect to happen?
ℹ Validate my podspec.
What happened instead?
/usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update MyProject (1.17.0) - Analyzing on iOS 13.0 platform. /usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call /usr/local/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35: warning: The called method `initialize' is defined here Preparing Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-App`: (``) Fetching external sources -> Fetching podspec for `MyProject` from `/Users/user/Development/server/myrepo/MyProject-swift5/MyProject.podspec` Resolving dependencies of /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete CDN: trunk Relative path: all_pods_versions_d_a_2.txt exists! Returning local because checking is only perfomed in repo update /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:337: warning: URI.escape is obsolete CDN: trunk Relative path: Specs/d/a/2/Alamofire/5.0.2/Alamofire.podspec.json exists! Returning local because checking is only perfomed in repo update -> MyProject (1.17.0) - ERROR | [iOS] unknown: Encountered an unknown error (783: unexpected token at '' /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse' /usr/local/Cellar/ruby/2.7.0/lib/ruby/2.7.0/json/common.rb:156:in `parse' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/json.rb:61:in `from_json' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `each' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification/set.rb:56:in `specification_name' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/cdn_source.rb:216:in `search' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `block in search' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `select' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source/aggregate.rb:83:in `search' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:416:in `create_set_from_sources' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:385:in `find_cached_set' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:754:in `push_state_for_requirements' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:746:in `require_nested_dependencies_for' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686:in `attempt_to_activate' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve' /usr/local/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:94:in `resolve' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `block in download_pod' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `each' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:565:in `download_pod' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:389:in `block in perform_extensive_analysis' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `each' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:383:in `perform_extensive_analysis' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/validator.rb:130:in `validate' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:78:in `block in run' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `each' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command/spec/lint.rb:63:in `run' /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run' /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>' ) during validation.
CocoaPods Environment
ℹ
CocoaPods : 1.9.1 Ruby : ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19] RubyGems : 3.1.2 Host : Mac OS X 10.15.4 (19E266) Xcode : 11.4 (11E146) Git : git version 2.24.1 (Apple Git-126) Ruby lib dir : /usr/local/Cellar/ruby/2.7.0/lib
Additional notes
I've tried to fallback to previous versions of cocoapods, unsuccessfully, until I reached 1.7.5:
pod _1.7.5_ spec lint MyPodSpec.podspec --verbose --allow-warnings
This worked like a charm.MyPodSpec
Pod::Spec.new do |s| s.name = 'MyPodSpec' s.platform = :ios, "13.0" s.ios.deployment_target = "13.0" s.swift_version = "5.0" s.version = '1.17.0' s.source = { :git => 'https://gitlab.mycompany.it/mobile/myrepo.git', :tag => s.version.to_s } s.authors = { 'Me' => '[email protected]' } s.license = { :type => 'MIT', :file => 'LICENSE' } s.homepage = 'https://www.mycompanywebsite.it/' s.summary = 'MyPodSpec' s.source_files = 'MyPodSpec-swift5/MyPodSpec/Classes/OpenAPIs/**/*.swift' s.dependency 'Alamofire', '~> 5.0.2' end
What am I doing wrong?
Thanks for your help,
Alessandro
It worked, Thinks!
Still having this issue. I'm on 1.9.2 already, nothing changed. Tried wiping the cache, removed the repos, everything suggested. I don't know how many hours I've spent dealing with it and no luck.
sudo rm -rf ~/.cocoapods/repos
Did you try this?
I did the following and it worked for me
# Uncomment the next line to define a global platform for your project
platform:ios,'9.0'
target 'Image Uploader' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Image Uploader
pod 'Firebase/Auth'
end
unknown: Encountered an unknown error (416: unexpected token at '{
"name": "CollectionCells",
"platforms": {
"ios": "9.0"
},
"public_header_files": "components/CollectionCells/src/.h",
"source_files": [
"components/CollectionCells/src/.{h,m}",
"components/CollectionCells/src/private/*.{h,m}"
],
"resources": [
"components/CollectionCells/src/MaterialCollectionCells.bundle"
],
"frameworks": [
"CoreGraphics",
"QuartzCore"
],
"dependencies": {
"MDFInternationalization": [
],
"MaterialComponents/CollectionLayoutAttributes": [
],
"MaterialComponents/Ink": [
],
"MaterialComponents/Typography": [
],
"MaterialComponents/Palettes": [
],
"MaterialComponents/private/Icons/ic_check": [
],
"MaterialComponents/private/Icons/ic_check_circle": [
],
"MaterialComponents/private/Icons/ic_chevron_right": [
],
"MaterialComponents/'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in
parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification/json.rb:61:in from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:742:in
from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:716:in from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source.rb:186:in
specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:37:in specification'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:348:in
block in delegating_block'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/delegate.rb:349:in block in delegating_block'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:178:in
dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:18:in block in dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in
with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:17:in dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:807:in
block in group_possibilities'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:806:in reverse_each'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:806:in
group_possibilities'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:778:in possibilities_for_requirement'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:761:in
push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:698:in attempt_to_filter_existing_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:673:in
attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in
resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in
resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in
section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in
analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in
block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in
resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:565:in block in download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:565:in
each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:565:in download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:389:in
block in perform_extensive_analysis'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:383:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:383:in
perform_extensive_analysis'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/validator.rb:130:in validate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/spec/lint.rb:78:in
block in run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/spec/lint.rb:63:in each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/spec/lint.rb:63:in
run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334: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 `
) during validation.
Analyzed 1 podspec.
Please can anyone help out on the above error, being on it for days
Most helpful comment
On the other hand, I did this (like in #9611):
gem list --local | grep cocoapods
sudo gem uninstall cocoapods
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
and worked, I don't know why, but worked