CocoaPods / cocoapods-downloader

A small library that provides downloaders for various source types (HTTP/SVN/Git/Mercurial)
MIT License
84 stars 72 forks source link

[Downloader::Http::UnsupportedFileTypeError] Failed to download the source file with the http parameterized uri #42

Closed benedict-lee closed 9 years ago

benedict-lee commented 9 years ago

source uri in podspec

http://our_sonatype_nexus_repo/path/redirect?r=#{repository}&g=#{groupId}&a=#{artifactId}&v=#{version}&c=#{classfier}&e=#{extension}

Report

from : 0.34.1 to : 0.35.0

   CocoaPods : 0.35.0
        Ruby : ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]
    RubyGems : 2.0.14
        Host : Mac OS X 10.9.4 (13E28)
       Xcode : 6.0 (6A313)
         Git : git version 1.9.3 (Apple Git-50)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : daumkakao-privatepods - git@github.daumkakao.com:benedict-lee/PrivatePods.git @ e7f7f1e6085a2c0348644b227930a88a9759bd95
               master - https://github.com/CocoaPods/Specs.git @ 30027a3f7f7d82660859d032171aad331266348a

Plugins

cocoapods-plugins : 0.3.2
cocoapods-trunk   : 0.2.0
cocoapods-try     : 0.4.2

Podfile

platform :ios, '6.0'
pod 'MobileLibraryIphone', '2.0.0'
pod 'MobileTiaraLibraryIphone', '2.0.1'
pod 'MobileLoginLibraryIphone', '2.2.3'
pod 'MobileReportLibraryIphone', '1.4.0'
pod 'MobileUploaderLibraryIphone', '1.3.0'
target 'iCafe-cal', :exclusive => false do
  pod 'Calabash', '0.9.168'
end

post_install do |r|
  r.project.targets.each do |target|
    target.frameworks_build_phase.files.each do |f|
      target.build_configuration_list.set_setting('VALID_ARCHS', 'armv7s armv7 i386 arm64')
      target.build_configuration_list.set_setting('ONLY_ACTIVE_ARCH', 'NO')
    end
  end
end

Error

Pod::Downloader::Http::UnsupportedFileTypeError - Unsupported file type:
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.8.1/lib/cocoapods-downloader/http.rb:83:in `filename_with_type'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.8.1/lib/cocoapods-downloader/http.rb:21:in `download!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.8.1/lib/cocoapods-downloader/base.rb:80:in `block in download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/downloader.rb:29:in `block in ui_action'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/downloader.rb:28:in `ui_action'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-downloader-0.8.1/lib/cocoapods-downloader/base.rb:78:in `download'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/pod_source_installer.rb:98:in `download_source'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer/pod_source_installer.rb:45:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:298:in `install_source_of_pod'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:273:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:70:in `titled_section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:272:in `block in install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:264:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:264:in `install_pod_sources'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:116:in `block in download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/user_interface.rb:49:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:114:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/installer.rb:91:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command/project.rb:101:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.7.0/lib/claide/command.rb:271:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/lib/cocoapods/command.rb:45:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.35.0/bin/pod:43:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
segiddins commented 9 years ago

Please fill out the entire error report, namely why what happened is different from what you expected.

benedict-lee commented 9 years ago

@segiddins Hi segiddins, Updated the error report.

segiddins commented 9 years ago

It's hard to debug this without seeing the actual URIS that lead to the error.

benedict-lee commented 9 years ago

You can test using the following URI that has the same uri pattern. http://search.maven.org/remotecontent?filepath=tomcat/apache-tomcat/5.5.23/apache-tomcat-5.5.23.distribution-zip

I think this issue related to the following PRs. https://github.com/CocoaPods/cocoapods-downloader/pull/40

kylef commented 9 years ago

The URL doesn't have a file extension and the resulted file doesn't either, so CocoaPods doesn't know what file type it is to extract. You can define that it's returning zip by specifying the type in your podspec as follows:

spec.source = { :http => 'myurl', :type => 'zip' }
benedict-lee commented 9 years ago

@kylef Thanks. It's working :)