Cocoapods: [1.9.2] Error during pod install JSON::ParserError - 767: unexpected token

Created on 22 May 2020  ยท  37Comments  ยท  Source: CocoaPods/CocoaPods

Command

/usr/local/bin/pod install

Report

  • What did you do?
    I add Firebase into multiple target.

  • What did you expect to happen?
    Firebase pods will installed correctly

  • What happened instead?
    The response after pod install is just JSON::ParserError - 767: unexpected token at ''. But when I didn't include Firebase, installation going well

Stack

   CocoaPods : 1.9.2
        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 :  ()
         Git : git version 2.24.1 (Apple Git-126)
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.4.1
cocoapods-try         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

workspace 'MyMultiCare'

project 'App/App.xcodeproj'
project 'App-in/App-in.xcodeproj'

def firebase_pods
  pod 'Firebase/Core' #
  pod 'Firebase/Firestore' #
  pod 'Firebase/Messaging' #
  pod 'Firebase/RemoteConfig' #
  pod 'Firebase/Storage' #
  pod 'FirebaseFirestoreSwift'#
end

def pod_utility
  pod 'Kingfisher' #
  pod 'PDFGenerator'
end

def pod_ui
  pod 'SwiftMessages'
end

target 'App' do
  use_frameworks!
  project 'App/App.xcodeproj'
  pod 'Firebase/Core'
  pod 'Firebase/Storage'
  pod_ui
  pod_utility
end

Error

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.2/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

Most helpful comment

Running only sudo rm -rf ~/.cocoapods/repos and then pod install was enough for my case.

All 37 comments

Oops wrong issue! Can you try https://github.com/CocoaPods/CocoaPods/issues/9672#issuecomment-632810885 wiping out your cache?

@dnkoutso I just tried a few seconds ago and still didn't work

@igor-makarov seems 1.9.2 fix did not work.

@lutluthfi in the meantime I do not know what to recommend, any help is appreciated.

@dnkoutso why can my previous project be installed when it only consisted of one target? and why an error appears when I try to add Firebase pods?

I am not sure. That issue has been reported multiple times but i cant reproduce. Something returns a bad response that is not properly handled.

@dnkoutso if you are iOS developer, you can try to make several projects and put them in one .xcworkspace, then create a Podfile and try to hit pod install in hopes that errors will reproduce

The problem is that I have tried this over and over again and I cant reproduce.

I just tried again on a fresh install of 1.9.2 with your Podfile above.

-> Pod installation complete! There are 5 dependencies from the Podfile and 18 total pods installed.

@dnkoutso it's weird, how does your directory look like? for mine, it will looks like

+-- App
+-- App-in
+-- MyMultiCare.xcworkspace
+-- Pods
+-- Podfile
+-- Podfile.lock

@dnkoutso fyi, it complete when I change the way to install Firebase pods to be like this, here is my Podfile

workspace 'MyMultiCare'

project 'App/App.xcodeproj'
project 'App-in/App-in.xcodeproj'

def firebase_pods
  pod 'Firebase/Core' #
  pod 'Firebase/Firestore' #
  pod 'Firebase/Messaging' #
  pod 'Firebase/RemoteConfig' #
  pod 'Firebase/Storage' #
  pod 'FirebaseFirestoreSwift'#
end

def pod_utility
  pod 'Kingfisher' #
  pod 'PDFGenerator'
end

def pod_ui
  pod 'SwiftMessages'
end

target 'App' do
  use_frameworks!
  project 'App/App.xcodeproj'
  pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
  pod_ui
  pod_utility
end

target 'App-in' do
  use_frameworks!
  project 'App-in/App-in.xcodeproj'
  pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master'
  pod_ui
  pod_utility
end

Probably because that podspec came down corrupted and using โ€˜gitโ€™ to clone it worked. The question is why did it come down corrupted to begin with

me too

See Description

โ€•โ€•โ€• MARKDOWN TEMPLATE โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.9.2
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.1.3
        Host : Mac OS X 10.15.4 (19E287)
       Xcode : 11.5 (11E608c)
         Git : git version 2.24.3 (Apple Git-128)
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

Podfile

source 'https://cdn.cocoapods.org/'
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

inhibit_all_warnings!

target 'OCTestProject' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for OCTestProject


pod 'AFNetworking'
pod 'YogaKit'
pod 'Masonry'
pod 'UITableView+FDTemplateLayoutCell'#่ฟ™ไธชๆ˜ฏๆญ้…Masonryไฝฟ็”จ็š„่ฎก็ฎ—cell้ซ˜ๅบฆ็š„
pod 'SDWebImage'
pod 'MJExtension'
pod 'MJRefresh'
pod 'ReactiveObjC'
pod 'MBProgressHUD'
pod 'FMDB'
pod 'MLeaksFinder'




  target 'OCTestProjectTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'OCTestProjectUITests' do
    # Pods for testing
  end

end

Error

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.2/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/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:746:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686: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.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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=767%3A+unexpected+token+at+%27%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

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

and 12 more at:
https://github.com/cocoapods/cocoapods/search?q=767%3A%20unexpected%20token%20at%20%27%27&type=Issues&utf8=โœ“

Upgrading to CocoaPods 1.9.2 also started erroring for us:

EDIT: Moved to https://github.com/CocoaPods/CocoaPods/issues/9816

The last one seems like a different intermittent issue.

Allright, I can create new one then.

Seems like a lot of issues for minor release with no changelog ๐Ÿ˜”

The fix was in Cocoapods/core gem. The issue you have might not have to do anything with 1.9.2

I think I managed to troubleshoot the issue. My error was as follows:

JSON::ParserError - 783: unexpected token at '2020-05-24 19:05:37.501195+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.MobileDeviceDevelopment
2020-05-24 19:05:37.502511+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.CoreTypes.1300A40
2020-05-24 19:05:37.503848+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.MobileDevice
2020-05-24 19:05:37.505379+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.XcodeSystemResources
'
/Users/user/Git/.../vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Users/user/Git/.../vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/common.rb:156:in `parse'
/Users/user/Git/.../vendor/bundle/ruby/2.6.0/gems/fourflusher-2.3.1/lib/fourflusher/find.rb:125:in `fetch_sims'
/Users/user/Git/.../vendor/bundle/ruby/2.6.0/gems/fourflusher-2.3.1/lib/fourflusher/find.rb:101:in `usable_simulators'
/Users/user/Git/.../vendor/bundle/ruby/2.6.0/gems/fourflusher-2.3.1/lib/fourflusher/find.rb:97:in `simulator'

Apparently, in fourflusher-2.3.1/lib/fourflusher/find.rb:125 when running xcrun simctl list -j ..., simctl is returning the json containing the list of simulators, plus some xcodebuild messages attached at the end, which are messing up the json of course:

...
      {
        "dataPath" : "\/Users\/user\/Library\/Developer\/CoreSimulator\/Devices\/C17DFB6D-4B07-4015-A45E-FB8F26E70740\/data",
        "logPath" : "\/Users\/user\/Library\/Logs\/CoreSimulator\/C17DFB6D-4B07-4015-A45E-FB8F26E70740",
        "udid" : "C17DFB6D-4B07-4015-A45E-FB8F26E70740",
        "isAvailable" : true,
        "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p",
        "state" : "Shutdown",
        "name" : "Apple TV"
      },
      {
        "dataPath" : "\/Users\/user\/Library\/Developer\/CoreSimulator\/Devices\/D413AB24-3968-4D65-8BF6-D99F60575A1A\/data",
        "logPath" : "\/Users\/user\/Library\/Logs\/CoreSimulator\/D413AB24-3968-4D65-8BF6-D99F60575A1A",
        "udid" : "D413AB24-3968-4D65-8BF6-D99F60575A1A",
        "isAvailable" : true,
        "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K",
        "state" : "Shutdown",
        "name" : "Apple TV 4K"
      },
      {
        "dataPath" : "\/Users\/user\/Library\/Developer\/CoreSimulator\/Devices\/57EFB096-5B38-42D3-AC6E-15AC0690A3C4\/data",
        "logPath" : "\/Users\/user\/Library\/Logs\/CoreSimulator\/57EFB096-5B38-42D3-AC6E-15AC0690A3C4",
        "udid" : "57EFB096-5B38-42D3-AC6E-15AC0690A3C4",
        "isAvailable" : true,
        "deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p",
        "state" : "Shutdown",
        "name" : "Apple TV 4K (at 1080p)"
      }
    ]
  }
}
2020-05-24 19:05:37.501195+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.MobileDeviceDevelopment
2020-05-24 19:05:37.502511+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.CoreTypes.1300A40
2020-05-24 19:05:37.503848+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.MobileDevice
2020-05-24 19:05:37.505379+0200 xcodebuild[42195:605643] [FirstLaunchPackageInstallationHelper] Cache file exists for com.apple.pkg.XcodeSystemResources

No idea why simctl would do that :/ Not sure about a workaround yet.

I just yesterday updated my command line tools from Apple, that could be the issue, and not the new 1.9.2 version

I am still not quite sure if those two are related. We are conflating too many different issues here with similar error messages but different stacktraces.

Mm yes, didnt pay attention to the initial stacktrace of this issue, it is originated somewhere else, yep

I had the same error code and i updated cocoapods then cleared cache with the code below and then installed pod without errors.

clear cache with this line -- sudo rm -rf ~/.cocoapods/repos

@badmunkey Did it worked? I've tried this way, but still got that error. Maybe I will try again later

I had the same error code and i updated cocoapods then cleared cache with the code below and then installed pod without errors.

clear cache with this line -- sudo rm -rf ~/.cocoapods/repos

Oops wrong issue! Can you try #9672 (comment) wiping out your cache?

i'm also facing this issue.And tried every command still same issue.Please help me

trunk.zip

Command

/usr/local/bin/pod install

Report

  • What did you do?
    SendBird example app

  • What did you expect to happen?
    Regular pod install

  • What happened instead?
    pod installation inerrupted

Stack

   CocoaPods : 1.9.2
        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.5 (11E608c)
         Git : git version 2.24.3 (Apple Git-128)
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.4.1
cocoapods-try         : 1.1.0

Podfile

platform :ios, '9.0'

target 'SendBird-iOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  #use_frameworks!

  # Pods for SendBird-iOS
  pod 'SendBirdSDK'
  pod 'AFNetworking', '~> 3.0'
  pod 'RSKImageCropper'
  pod 'NYTPhotoViewer', '~> 1.1.0'
  pod 'FLAnimatedImage', '~> 1.0'
end

Error

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.2/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.2/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/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:746:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:729:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:686: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.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/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.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

@igor-makarov zipped trunk attached

@gorevoy can you please zip up the ~/.cocoapods/repos/trunk folder and attach it here?

@Aynnor can you please zip up the~/.cocoapods/repos/trunk folder and attach it here?

@lutluthfi can you please zip up the ~/.cocoapods/repos/trunk folder and attach it here?

@dnkoutso @orta
It appears that the attached zip contains zero-length files with valid & up-to-date eTags attached.
There are two things in my opinion that can cause this condition:

  1. GH CDN returning the empty file due to some sort of backend error - we need to move forward with our redirect to Netlify.
  2. The file getting deleted some other way and then getting touched because the eTag exists - need to rewrite it a bit for robustness.

@badmunkey Did it worked? I've tried this way, but still got that error. Maybe I will try again later

I had the same error code and i updated cocoapods then cleared cache with the code below and then installed pod without errors.
clear cache with this line -- sudo rm -rf ~/.cocoapods/repos

yea, it worked for me. like I said you have to update cocoapods then clear cache with the code in terminal : sudo rm -rf ~/.cocoapods/repos

then install the pods you need. I assume you created the podfile and listed the pod in the podfile you are trying to install as well.

If none of that works try installing a different pod. It might be just an issue with the specific pod showing the error.

I hope that helps. I know it gets frustrating when things don't work out as planned. Good Luck!

Running only sudo rm -rf ~/.cocoapods/repos and then pod install was enough for my case.

This answer worked for me
https://stackoverflow.com/questions/60533677/pod-install-failure-catalina-10-15-3

Just run the following commands in the below given order:

gem list --local | grep cocoapods

sudo gem uninstall (each item from above command)

sudo rm -rf ~/.cocoapods

sudo gem install cocoapods

cd (PROJECT DIRECTORY)

pod init

(put cocoapod in podfile)

pod install

rm -rf ~/.cocoapods/repos/trunk/

pod cache clean --all

pod install

We shipped 1.9.3 with an additional fix that could help prevent this from happening. You might still have a dirty cache and its wise to wipe it out even if you upgrade to 1.9.3.

Going to close for now and keep monitoring.

p.s for those who are wondering why CocoaPods has an empty CHANGELOG for 1.9.2 and 1.9.3 its because the fixes are in CocoaPods/Core https://github.com/CocoaPods/Core/releases/1.9.3

Running only sudo rm -rf ~/.cocoapods/repos and then pod install was enough for my case.

This is a life saver

I had the same error code and i updated cocoapods then cleared cache with the code below and then installed pod without errors.

clear cache with this line -- sudo rm -rf ~/.cocoapods/repos

In am getting command not found, help me.

Running only sudo rm -rf ~/.cocoapods/repos and then pod install was enough for my case.

Thanks so much for help. I thought I will never be able to learn Firebase

Running only sudo rm -rf ~/.cocoapods/repos and then pod install was enough for my case.

This solved my problem!
I thought that issue was something to do with FirebaseFirestore package until now.

sudo rm -rf ~/.cocoapods/repos

Running this solved my issue

Was this page helpful?
0 / 5 - 0 ratings