Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pod install fails: "CDN: trunk URL couldn't be downloaded" #11939

Open
1 task done
yousefhamza opened this issue Jun 7, 2023 · 25 comments
Open
1 task done

Pod install fails: "CDN: trunk URL couldn't be downloaded" #11939

yousefhamza opened this issue Jun 7, 2023 · 25 comments

Comments

@yousefhamza
Copy link

Report

What did you do?

Run pod install

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

I get the following errors:

CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/3.2.0/AFNetworking.podspec.json Response: SSL connect error
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/3.2.1/AFNetworking.podspec.json Response: SSL connect error
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/4.0.0/AFNetworking.podspec.json Response: SSL connect error
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/4.0.1/AFNetworking.podspec.json Response: SSL connect error

CocoaPods Environment

Stack

   CocoaPods : 1.12.1
        Ruby : ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [arm64-darwin21]
    RubyGems : 3.1.6
        Host : macOS 12.6 (21G115)
       Xcode : 14.2 (14C18)
         Git : git version 2.37.1 (Apple Git-137.1)
Ruby lib dir : /Users/yosefhamza/.rbenv/versions/2.7.7/lib
Repositories : cocoapods-cdn - CDN - https://cocoapods-cdn.netlify.app/
               instabug-verizon - git - git@github.com:instabug-verizon/podspec-ios.git @ fe195c5f159289cf42a92e07fdc7ff39f7e8b95d

               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /Users/yosefhamza/Repos/ios/vendor/bundle/ruby/2.7.0/bin/pod

Plugins

claide-plugins        : 0.9.2
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

iOSVersion = '11.0'
platform :ios, iOSVersion
use_frameworks!

def common_pods_for_server_test_tunnel
  pod 'SBTUITestTunnelServer', '~> 6.6.4'
  pod 'SBTUITestTunnelCommon', '~> 6.6.4'
end

def common_pods_for_uitest
  pod 'SBTUITestTunnelClient', '~> 6.6.4'
  pod 'SBTUITestTunnelCommon', '~> 6.6.4'
  pod 'eDistantObject'
end

target 'InstabugDemo' do
  pod 'AFNetworking', '~> 3.2.1'
  pod 'GCDWebServer', :inhibit_warnings => true

  pod 'Firebase/Crashlytics'
  pod 'eDistantObject'
  pod "Apollo"
  common_pods_for_server_test_tunnel
end

target 'SwiftDemoApp' do
  common_pods_for_server_test_tunnel
  pod 'Instabug'
  pod 'Instabug-gRPC-Swift'
end

target 'ObjCDemoApp' do
  pod 'Instabug'
  pod 'Protobuf'
  pod 'gRPC-ProtoRPC'
  common_pods_for_server_test_tunnel
  pod 'Instabug-gRPC-ObjC'
end

target 'InstabugDemoTVoS' do
  platform :tvos, '11.0'
  pod "Apollo"
end

target 'InstabugAPMUIStressTests' do
  common_pods_for_uitest
end

target 'InstabugAPMUITests' do
  common_pods_for_uitest
end

target 'SwiftDemoAppUITests' do
	common_pods_for_uitest 
end

target 'ObjcDemoAppUITests' do
	common_pods_for_uitest 
end

target 'InstabugBugReportingUITests' do
  common_pods_for_uitest
end

target 'InstabugUITestsUtilities' do
  common_pods_for_uitest
end

target 'InstabugSurveysUITests' do
  common_pods_for_uitest
end

target 'InstabugChatsUITests' do
  common_pods_for_uitest
end

target 'InstabugCoreUITests' do
  common_pods_for_uitest
end

target 'InstabugReportingUITests' do
  common_pods_for_uitest
end

target 'InstabugFeatureRequestsUITests' do
  common_pods_for_uitest
end

target 'InstabugDemoEDistantObjectClient' do
  pod 'SBTUITestTunnelServer', '~> 6.6.4'
  pod 'SBTUITestTunnelCommon', '~> 6.6.4'
  pod 'eDistantObject'
end

abstract_target 'Specs' do
  pod 'Kiwi'
  pod 'MockInject', '~> 1.0.3'
  pod 'OHHTTPStubs', '~> 6.1.0'
  
  target 'InstabugIntegrationTests' do
  end
  
  target 'InstabugNetworkLoggerTests' do
  end
  
end

abstract_target 'SplittedSpecs' do
  pod 'OHHTTPStubs', '~> 6.1.0'
  
  target 'InstabugCoreTests' do
  end
  
  target 'InstabugReportingNoProductTests' do
  end 

  target 'InstabugNetworkLoggerCPInterfaceNoProductTests' do
  end
  
  target 'InstabugNoProductTests' do
  end

  target 'InstabugTests' do
  end

  target 'InstabugCrashReportingTests' do
  end

  target 'InstabugFeatureRequestsTests' do
  end
  
  target 'InstabugReportingTests' do
  end

  target 'InstabugBugReportingTests' do
  end
  
  target 'InstabugChatsTests' do
  end
  
  target 'InstabugNetworkLoggerCPInterfaceTests' do
  end

  target 'InstabugSessionProfilerTests' do
  end
  
  target 'InstabugUtilitiesTests' do
  end
  
  target 'InstabugAssetsTests' do
  end
  
  target 'InstabugPoliceTests' do
  end
  
  target 'InstabugViewHierarchyTests' do
  end
  
  target 'InstabugUserStepsTest' do
  end
  
  target 'InstabugCoreDataLayerTests' do
  end
      
  target 'InstabugDiskTests' do
  end
  
  target 'InstabugNetworkTests' do
  end
  
  target 'InstabugDefaultsTests' do
  end
  
  target 'InstabugSurveysTests' do
  end
  
  target 'InstabugCoreSpecs' do
  end

  target 'InstabugAPMTests' do
  end
  
  target 'InstabugAPMMultiThreadingTests' do
  end
  
  target 'InstabugScreenCapturerTests' do
  end
  
  target 'InstabugDiagnosticsTests' do
  end
  
  target 'InstabugSwizzlerTests' do
  end
end

post_install do |installer|
  installer.pods_project.build_configurations.each do |config|
    config.build_settings['COMPILER_INDEX_STORE_ENABLE'] = "NO"
    if config.name.include?("UITests")
      config.build_settings['GCC_OPTIMIZATION_LEVEL'] = '0'
    end
  end

  installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if config.name == 'UITests' # the name of your build configuration
                config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'ENABLE_UITUNNEL=1', 'ENABLE_UITUNNEL_SWIZZLING=1']
            end
        end
    end
    # Ensure that all generated targets have support the same iOS version
    # Fixes the Xcode 14.3 error -> ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphonesimulator.a
    # Root cause: https://developer.apple.com/forums/thread/725300    
  installer.generated_projects.each do |project|
    project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = iOSVersion
      end
    end
  end

end

Project that demonstrates the issue

More logs

When running verbose logs I get the following
https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/4.0.1/AFNetworking.podspec.json
CDN: trunk Redirecting from https://cdn.cocoapods.org/Specs/a/7/5/AFNetworking/2.3.1/AFNetworking.podspec.json to
https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/2.3.1/AFNetworking.podspec.json
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/0.10.0/AFNetworking.podspec.json
Response: Timeout was reached, retries: 4
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/1.0RC1/AFNetworking.podspec.json
Response: Timeout was reached, retries: 4

@FanningHau
Copy link

Same error here "trunk URL couldn't be downloaded: https://cdn.cocoapods.org/deprecated_podspecs.text Response:403"

@MoElnaggar14
Copy link

same error here "CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/5/a/4/Adyen/5.2.0/Adyen.podspec.json Response: SSL connect error"

@MalikHeshamII
Copy link

I am getting the same error CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/d/a/2/Alamofire/1.1.3/Alamofire.podspec.json Response: SSL connect error
and this work around #10078 (comment) is not working.

@yousefhamza
Copy link
Author

The current workaround, at least for developers in Egypt is to use a VPN

@yousefhamza
Copy link
Author

Confirmed that this problem is specific to Egypt as ISPs blocked jsdelivr

@AmrMohamad
Copy link

Which VPN is working?

@FanningHau
Copy link

The current workaround, at least for developers in Egypt is to use a VPN

Good Answer!It worked in China

@shadyaziza
Copy link

Managed to solve this problem by using Cloduflare's WARP which is a proxy server

Downloaded from here:

https://1.1.1.1/

@karimsayf
Copy link

Thanks a lot @shadyaziza

@ahmed-msayed
Copy link

thanx @shadyaziza
Worked finally

@Ahmed-Ezzeldin
Copy link

Ahmed-Ezzeldin commented Jul 20, 2023

I have the same issue, it is related to the Internet service provider in Egypt, Solved by using WARP
Thanks @shadyaziza

@midoalone
Copy link

midoalone commented Jul 22, 2023

@shadyaziza

Thanks bro, it works nicely
الله يبارك لك

@ranger163
Copy link

@yousefhamza, @shadyaziza
Thanks guys, that was the issue indeed, and it's now fixed.

@el3ankaboot
Copy link

Hello,
Since many VPNs are blocked in Egypt. I tried to find another solution.
This solution provided by tommeier worked fine with me.

@amorenew
Copy link

amorenew commented Aug 8, 2023

Thanks, Egypt 😭😳

@amorenew
Copy link

amorenew commented Aug 8, 2023

1- At the top of the Podfile add this line
source 'https://github.com/CocoaPods/Specs.git'
2- Remove the Podfile.lock file
3- pod repo remove trunk
4- pod install

@thtro
Copy link

thtro commented Aug 8, 2023

None of the above solutions worked for us(tried them all), not located in Egypt.
This is the only solution that worked: #11159 (comment)

@amorenew
Copy link

amorenew commented Aug 9, 2023

@thtro bad/illegal format or missing URL is not the same issue as our issue SSL connect error

@homains-ou
Copy link

homains-ou commented Aug 12, 2023

Ayman Hussein wrote an article on how to bypass this

https://www.linkedin.com/pulse/how-use-pod-install-blocked-countries-ayman-h-

@keegho
Copy link

keegho commented Aug 18, 2023

Which VPN is working?

Im using PrivateVPN in stealth mode and it is working fine

@mohamedabady
Copy link

@shadyaziza it's working with me after installing WRAP. thanks a lot man

@zeqinjie
Copy link

use vpn it work

@Hossam-Mahmoud
Copy link

jsdeliver.net is available again in Egypt:
https://twitter.com/livecodes_io/status/1704410203809063380

@jnewc
Copy link

jnewc commented Nov 28, 2023

Workaround for this if it's happening for a pod that you aren't actively using:

  1. Find one of the URLs for the error message, e.g. https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/3.2.0/AFNetworking.podspec.json
  2. Delete the relevant folder from your local trunk e.g. rm -rf ~/.cocoapods/repo/trunk/Specs/a/7/5/AFNetworking
  3. pod install

@turkcankeskin
Copy link

Workaround for this if it's happening for a pod that you aren't actively using:

  1. Find one of the URLs for the error message, e.g. https://cdn.jsdelivr.net/cocoa/Specs/a/7/5/AFNetworking/3.2.0/AFNetworking.podspec.json
  2. Delete the relevant folder from your local trunk e.g. rm -rf ~/.cocoapods/repo/trunk/Specs/a/7/5/AFNetworking
  3. pod install

thank you for your answer. It solved i problem in my case.

But is there anyone who can explain why we are experiencing this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests