CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 403 [closed]
Asked Answered
C

4

23

I was testing my application which is written in flutter and suddenly I keep getting CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 403 error. I am not sure why this is happening. This is the error I am getting in the log. Note: This project was working fine but however suddenly I keep getting these errors.

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: 403 <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | Cloudflare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->
<style>body{margin:0;padding:0}</style>


<!--[if gte IE 10]><!-->
<script>
  if (!navigator.cookieEnabled) {
    window.addEventListener('DOMContentLoaded', function () {
      var cookieEl = document.getElementById('cookie-alert');
      cookieEl.style.display = 'block';
    })
  }
</script>
<!--<![endif]-->


</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
        <h1 data-translate="block_headline">Sorry, you have been blocked</h1>
        <h2 class="cf-subheadline"><span data-translate="unable_to_access">You are unable to access</span> cocoapods.org</h2>
      </div><!-- /.header -->

      <div class="cf-section cf-highlight">
        <div class="cf-wrapper">
          <div class="cf-screenshot-container cf-screenshot-full">
            
              <span class="cf-no-screenshot error"></span>
            
          </div>
        </div>
      </div><!-- /.captcha-container -->

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="blocked_why_headline">Why have I been blocked?</h2>

            <p data-translate="blocked_why_detail">This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="blocked_resolve_headline">What can I do to resolve this?</h2>

            <p data-translate="blocked_resolve_detail">You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.</p>
          </div>
        </div>
      </div><!-- /.section -->

      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">
  <p class="text-13">
    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong class="font-semibold">709ac7f028be46eb</strong></span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Your IP</span>:..</span>
    <span class="cf-footer-separator sm:hidden">&bull;</span>
    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; security by</span> <a rel="noopener noreferrer" href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" target="_blank">Cloudflare</a></span>
    
  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
  </div><!-- /#cf-wrapper -->

  <script>
  window._cf_translation = {};
  
  
</script>

</body>
</html>

Any instructions how i could solve this?

Claudell answered 11/5, 2022 at 12:10 Comment(3)
I am struggling with the exact same error now. I'm also getting this error suddenly when trying to build my flutter project on iOS. Maybe it's a cocoapods server error? From about 12: 15, the problem seems to be resolved. My project build succeeds on iOS without any changes!!Mcmillan
Also getting this error, I'm new to react-native and saw this as a solution github.com/CocoaPods/CocoaPods/issues/… It does take a while to run but will work and install your pods successfullyTartuffery
I've continued to have this problem even though this is closed, try updating the ethon gem: sudo gem update ethon. Updating this gem to 0.16.0 has fixed it for me.Vickers
P
11

also getting this error! until fixed, you can try to bypass the CDN:

run:

pod repo remove trunk

and add to Podfile:

source 'https://cocoapods-cdn.netlify.app/'

or without CDN at all:

source 'https://github.com/CocoaPods/Specs.git'
Propjet answered 11/5, 2022 at 12:41 Comment(1)
adding source 'github.com/CocoaPods/Specs.git' to Podfile finally helped. Couldn't make 'cdn.cocoapods.org' work :/Ruthanneruthe
J
11

There seems to be a problem with CloudFlare at the moment, status: https://github.com/CocoaPods/CocoaPods/issues/11355

Jamisonjammal answered 11/5, 2022 at 12:44 Comment(0)
D
3

I found a temporary workaround that worked for me very well:

source 'https://cdn.cocoapods.org/'

target '...' do
  ...
end

require 'typhoeus'
Typhoeus::Config.user_agent = 'CocoaPods'

After that start pod deintegrate and pod install

Diversion answered 11/5, 2022 at 14:3 Comment(0)
V
2

This should be fixed now. It seems that CloudFlare started to falsely detect CocoaPods traffic as a DDoS attack, and Orta Therox, a CocoaPods maintainer, had to change some configuration in order to get it working properly. Quoting from one of their comments on the GitHub issue:

The DDoS detection was triggered which can happen occasionally because CDN activity is still going up overall. It looks like traffic bounces over a threshold for stricter rules now. The way DDoS detection works in Cloudflare is through a series of rules/heuristics which can be individually tuned ( which is what I looked at in #11355 .)

After tuning the one people were hitting to "off", we paused a bit to determine if it was making changes. After seeing no changes, we flipped every rule/heuristic to off #11355

What we were seeing was still similar CDN traffic patterns but some traffic occasionally getting through correctly. This was when we reached out to Cloudflare support. With their help we determined that it was likely that the migration of our rules from the central settings repo to the different CDN edges (e.g. for simplicity think the servers closest to users each time) were using the cached (older) settings.

This meant some regions didn't have the new rules saying ignore the rule about 'allow the custom user-agent' - the Cloudflare support folks clears up the cache and now its looking like everything is working fine.

Vasti answered 12/5, 2022 at 1:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.