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 trunk push error with binary hosted on github #236

Closed
kylefleming opened this issue Jan 12, 2018 · 4 comments
Closed

pod trunk push error with binary hosted on github #236

kylefleming opened this issue Jan 12, 2018 · 4 comments

Comments

@kylefleming
Copy link

Mirroring CocoaPods/CocoaPods#7143 as per @dnkoutso's suggestion:

Report

What did you do?

$ pod trunk push --use-libraries
  • Received the following error:
[!] Source code for your Pod was not accessible to CocoaPods Trunk. Is it a private repo or behind a username/password on http?

Judging by issues CocoaPods/CocoaPods#6585 and CocoaPods/CocoaPods#5234, I would guess that calling HEAD on this url gives a 403 error and since the file is large, the fallback GET request times out.

Requesting the HEAD manually with curl returns a 403 Forbidden error:

$ curl -sLI https://github.com/kylefleming/opencv/releases/download/3.3.0/opencv-3.3.0-ios-osx-framework.zip
...
HTTP/1.1 403 Forbidden
x-amz-request-id: AEAF8AE22A6744EC
x-amz-id-2: JF/Fojo8qWbSSpCHGDStNKcsnpwgKCJHMijk3xjUxOYsCfL3w4NZHLcstGiDm8bIO6tho/JZ0tw=
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 17 Oct 2017 04:55:01 GMT
Server: AmazonS3

Interestingly, requesting HEAD manually with curl on the previous version's binary (v3.2.0) also returns the same error, so I'm guessing a regression in the trunk server has occurred since 3.2.0 was pushed to CocoaPods in April.

$ curl -sLI https://github.com/kylefleming/opencv/releases/download/3.2.0-ios-osx-fix/opencv-3.2.0-ios-osx-framework.zip
...
HTTP/1.1 403 Forbidden
x-amz-request-id: EBF2C3A50155B7DE
x-amz-id-2: qZbwGe+9DBaMai7CpjsYR3icLJwi8xg169BfqS+eQyKakiU8/9n7+yB/3bb36l5ovUDl2f9B4uw=
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 17 Oct 2017 04:58:38 GMT
Server: AmazonS3

CocoaPods Environment

Stack

   CocoaPods : 1.3.1
        Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
    RubyGems : 2.6.11
        Host : Mac OS X 10.13 (17A405)
       Xcode : 9.0 (9A235)
         Git : git version 2.14.2
Ruby lib dir : /Users/kyle/.rvm/rubies/ruby-2.4.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 65fe9de6d77d705d1c4bd2874ef431a90ac8c0ad

Installation Source

Executable Path: /Users/kyle/.rvm/gems/ruby-2.4.1@global/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0

Project that demonstrates the issue

OpenCV/3.3.0/OpenCV.podspec.json:

{
  "name": "OpenCV",
  "version": "3.3.0",
  "summary": "OpenCV (Computer Vision) for iOS and macOS",
  "homepage": "https://opencv.org/",
  "description": "OpenCV: open source computer vision library\n\n    Homepage: https://opencv.org/\n    Online docs: https://docs.opencv.org/master/\n    Q&A forum: http://answers.opencv.org/questions/\n    Dev zone: https://github.com/opencv/opencv",
  "documentation_url": "https://docs.opencv.org/master/",
  "authors": "https://github.com/opencv/opencv/graphs/contributors",
  "license": {
    "type": "3-clause BSD",
    "text": "By downloading, copying, installing or using the software you agree to this license.\nIf you do not agree to this license, do not download, install,\ncopy or use the software.\n\n\n    License Agreement\n    For Open Source Computer Vision Library\n    (3-clause BSD License)\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n    * Redistribution's of source code must retain the above copyright notice,\n    this list of conditions and the following disclaimer.\n\n    * Redistribution's in binary form must reproduce the above copyright notice,\n    this list of conditions and the following disclaimer in the documentation\n    and/or other materials provided with the distribution.\n\n    * The name of the copyright holders may not be used to endorse or promote products\n    derived from this software without specific prior written permission.\n\nThis software is provided by the copyright holders and contributors \"as is\" and\n any express or implied warranties, including, but not limited to, the implied\n warranties of merchantability and fitness for a particular purpose are disclaimed.\nIn no event shall the Intel Corporation or contributors be liable for any direct,\nindirect, incidental, special, exemplary, or consequential damages\n(including, but not limited to, procurement of substitute goods or services;\nloss of use, data, or profits; or business interruption) however caused\nand on any theory of liability, whether in contract, strict liability,\nor tort (including negligence or otherwise) arising in any way out of\nthe use of this software, even if advised of the possibility of such damage.\n\n"
  },
  "platforms": {
    "ios": "6.0",
    "osx": "10.9"
  },
  "source": {
    "http": "https://github.com/kylefleming/opencv/releases/download/3.3.0/opencv-3.3.0-ios-osx-framework.zip",
    "sha256": "55c46909bff3b0237917197c000fe16be63ead3f6de3b9f34ed6eea2a9413e99"
  },
  "prepare_command": "touch Empty.m && mv ios/opencv2.framework/Versions/A/opencv2 ios/libopencv2Static.a && mv ios/opencv2.framework/Versions/A/Headers ios/include && mv osx/opencv2.framework/Versions/A/opencv2 osx/libopencv2Static.a && mv osx/opencv2.framework/Versions/A/Headers osx/include",
  "ios": {
    "source_files": [
      "Empty.m",
      "ios/include/**/*.{h,hpp}"
    ],
    "public_header_files": "ios/include/**/*.{h,hpp}",
    "header_mappings_dir": "ios/include",
    "vendored_libraries": "ios/libopencv2Static.a",
    "frameworks": [
      "AssetsLibrary",
      "AVFoundation",
      "CoreGraphics",
      "CoreMedia",
      "CoreVideo",
      "Foundation",
      "QuartzCore",
      "UIKit"
    ],
    "pod_target_xcconfig": {
      "OTHER_LDFLAGS": "-force_load \"${PODS_ROOT}/OpenCV/ios/libopencv2Static.a\""
    }
  },
  "osx": {
    "source_files": [
      "Empty.m",
      "osx/include/**/*.{h,hpp}"
    ],
    "public_header_files": "osx/include/**/*.{h,hpp}",
    "header_mappings_dir": "osx/include",
    "vendored_libraries": "osx/libopencv2Static.a",
    "frameworks": [
      "Accelerate",
      "AppKit",
      "AVFoundation",
      "CoreMedia",
      "CoreVideo",
      "Foundation",
      "OpenCL"
    ],
    "pod_target_xcconfig": {
      "OTHER_LDFLAGS": "-force_load \"${PODS_ROOT}/OpenCV/osx/libopencv2Static.a\""
    }
  },
  "header_dir": "opencv2",
  "libraries": "c++",
  "user_target_xcconfig": {
    "CLANG_WARN_DOCUMENTATION_COMMENTS": "NO"
  },
  "requires_arc": false
}
@Coeur
Copy link

Coeur commented May 2, 2018

@dnkoutso any update on this? We can't push to trunk anymore.

@kylefleming
Copy link
Author

I'm still having issues with this. Can you verify that the update of cocoapods-core to v1.5.0 in trunk.cocoapods.org (af8bc91) has been deployed to production?

@segiddins
Copy link
Member

Deploying it right now

@kylefleming
Copy link
Author

Resolved. Thank you!

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

3 participants