Installing a CocoaPod pod (Firestore) is giving inconsistent results on same laptop

296 Views Asked by At

Limited CocoaPod experience here... So, I have 2 projects containing Firestore CocoaPod with the same pod file except for the application name. One of them, no matter how many times I install/update, clear cache, etc it successfully installs all the pods I need and creates the Pods/Pods.xcodeproj file and Podfile.lock file.


WORKING POD FILE

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

target 'Exercise DB' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Exercise DB
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
end

The other project (brand new, built clean before pod install), attempts to install the same pods and always fails and doesn't create the Pods/Pods.xcodeproj file or Podfile.lock file. Actually I created a few new projects with the same results.


FAILING POD FILE

# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
platform :ios, '9.0'

target 'CocoaPodsnanotest' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  # Pods for CocoaPodsnanotest
  pod 'Firebase/Core'
  pod 'Firebase/Firestore'
end

ERROR MESSAGE

[!] Error installing nanopb
[!] /usr/local/bin/curl -f -L -o /var/folders/__/0c2ry6ss1wn6wrk65f_lgmyh0000gn/T/d20180808-9545-g29rhf/file.tgz https://github.com/nanopb/nanopb/archive/0.3.8.tar.gz --create-dirs --netrc-optional --retry 2

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

The pod file that works had older versions of pod files since I haven't touched the code in a while, so I upgraded the versions and it still worked.

I don't understand where all these pod file copies are stored and pulling from but I can't see how they could be pulling in different source files or something like that. I would think that if a pod worked for one project that it would work for another on the same Mac.

A while back I gave up on Firestore/Firebase altogether because I got stumped with same issue. I think this nanopb pod is something I am going to need elsewhere too though and need to learn how to get past this kind of hurdle whether it is a nanopb issue or CocoaPods issue. I am hoping this is a common problem with CocoaPods installations and not too unique. When I search for nanopb install issues there isn't much to find. Searching for CocoaPods install issues refers to CocoaPods itself and not specific modules.

Thanks for the help.

1

There are 1 best solutions below

1
On

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

This sounds like your /usr/local/bin/curl is too old to support the newer encryption protocols used by Github.

Github changed their SSL settings in February 2018. Since then, many older clients have stopped working. I'm not sure why your older project still works, but it is possible it has somehow cached the package despite you trying to clear the caches.

Check your version with /usr/local/bin/curl --version. Version 7.47.0 seems to work for me.