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?