Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cocoapods [!] Error installing Crashlytics

Crashlytics as a cocoapod is breaking for our CI system. Basically we have a Rakefile that runs some tasks to do a pod update, build our app, and run tests, etc. However, we recently switched to Fabric & Crashlytics as cocoapods. Now our automation build is failing with the following error during the pod update phase:

[!] Error installing Crashlytics
[!] /usr/bin/curl -f -L -o /var/folders/fx/hfsy48h13839_jm5wmkp5mx00000gn/T/d20151009-74266-1p34ehf/file.zip https://kit-downloads.fabric.io/ios/com.twitter.crashlytics.ios/3.3.4/com.twitter.crashlytics.ios-default.zip --create-dirs

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed


  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: kit-downloads.fabric.io
Update all pods
Analyzing dependencies 

The workspace is not generated since Crashlytics fails to install. I believe there are two problems occurring: 1. Crashlytics pod is trying to download and write to a system file that it does not have permission to write to when running that command in script file (we don't want to run the script with as sudos) 2. That endpoint is in fact a bit flaky.

If I run that curl command manually in terminal, it succeeds MOST of the time and downloads the file. However, sometimes that curl command does in fact fail to resolve the host. Also however, I have two virtual machines that can run that curl command successfully without doing sudo usr/bin/curl/... but one of our VMs (which is an exact clone of another) does need sudo usr/bin/curl... to get write access to that folder.

If I run that just that curl command in a Rakefile, I get this: $ rake You don't have permission to create /var/folders/fx.

So again, I believe the problem is that trying to do pod update from the Rakefile causes there to be a file write permissions problem due to Crashlytics trying to download a file to the system /var/folder which is not permitted. Additionally, that endpoint might also be flaky and fail out from being unable to resolve the host.

So basically the workaround is to run that curl command manually in terminal on our CI machine so that it downloads and installs. Now any future pod update works SO LONG AS WE STAY ON THE SAME VERSION OF CRASHLYTICS. So for now, we froze our Crashlytics install on 3.3.4.

Anyone run into a similar issue, have any advice as to what they think is happening, or have a better suggestion as to how to fix this?

like image 893
n8tr Avatar asked Oct 09 '15 19:10

n8tr


3 Answers

Are you using a VPN?

I found that fabric.io is blocked by NordVPN and had to disconnect it in order to pod install.

In fact, it specifically is NordVPN's "Block ads and malware" toggle that doesn't allow it. If you temporarily switch that off it will work fine.

like image 101
Matt Fletcher Avatar answered Oct 19 '22 08:10

Matt Fletcher


refering to this : here i found solution

Step To Resolve :

  • echo insecure >> ~/.curlrc
  • pod install
like image 6
Cristea Victor Avatar answered Oct 19 '22 08:10

Cristea Victor


My solution was to delete the Pods directory in the repository (rm -rf Pods). That way all the pods were removed, even Crashlytics. After that, a pod install could run successfully. I have now Crashlytics 3.8.6 installed.

like image 5
Gabriel Avatar answered Oct 19 '22 10:10

Gabriel