cocoapods [!] Error installing Crashlytics
Asked Answered
C

3

12

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?

Cosper answered 9/10, 2015 at 19:41 Comment(5)
Turns out that curl command changes often, possibly as often as each pod update. The only workaround that we could find was to add read/write access to the /var/folders/fx for all users which is far from ideal. sudo chmod -R a+rw /var/folders/fx/Cosper
As an update, we ended up giving up on using the Fabric and Crashlytics cocoapods and just imported the frameworks manually since we continued to run into random CC update failures that looked similar to the original post.Cosper
how did you resolve the issue , i see in the cocoapod website they update the Crashlytics cocoapods in Sep 2016Kapor
will you please let me know how you imported the framework manuallyKapor
Sure. After a successful pod update in a project that uses Fabric and Crashlytics (you can always make a one-off proj), you can find the framework files in the Pods folder in the project. Copy them out. Then manually import those Frameworks into your other project. BTW, everything started working fine after we gave up on using virtual machines in our CI system.Cosper
D
6

refering to this : here i found solution

Step To Resolve :

  • echo insecure >> ~/.curlrc
  • pod install
Divider answered 9/7, 2021 at 7:11 Comment(0)
M
5

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.

Measles answered 13/9, 2017 at 8:9 Comment(0)
A
4

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.

Acatalectic answered 11/11, 2019 at 13:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.