kontaktio / kontakt-ios-sdk

This SDK makes it easy for you to configure, monitor, and securely update Kontakt.io Beacons through our Kontakt.io API.
http://developer.kontakt.io
Other
48 stars 9 forks source link

pod install error: During installing the S3 bucket returns HTTP 403 error #88

Open dulvui opened 1 year ago

dulvui commented 1 year ago

When running bundle exec pod install to install the pods it fails, because the S3 bucket gives HTTP 403 access denied.

Here the link that gives 403 https://kontakt-mobile.s3.amazonaws.com/kontakt-ios-sdk-2.0.1.zip

Here a extract of the log:


INFO [2023-05-31 11:36:20.73]: ▸ Installing KontaktSDK (2.0.1)
INFO [2023-05-31 11:36:21.35]: ▸ [!] Error installing KontaktSDK
INFO [2023-05-31 11:36:21.35]: ▸ [!] /usr/local/opt/curl/bin/curl -f -L -o /var/folders/4_/s6tlbqz52vgf905c2l3hntcc0000gn/T/d20230531-5471-12tp8yg/file.zip https://kontakt-mobile.s3.amazonaws.com/kontakt-ios-sdk-2.0.1.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.9.3 cocoapods-downloader/1.4.0'
INFO [2023-05-31 11:36:21.35]: ▸ % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
INFO [2023-05-31 11:36:21.35]: ▸ Dload  Upload   Total   Spent    Left  Speed
INFO [2023-05-31 11:36:21.35]: ▸   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
INFO [2023-05-31 11:36:21.35]: ▸ curl: (22) The requested URL returned error: 403
ERROR [2023-05-31 11:36:21.39]: Exit status of command 'cd '.' && bundle exec pod install --repo-update' was 1 instead of 0.`
``
AntonioFM92 commented 1 year ago

Same error here...

Any solutions?? @dulvui

dulvui commented 1 year ago

@AntonioFM92 It seems that on version 2.x the S3 bucket name, from where cocoapods downloads the sdk, has been changed, and then changed again to the previous bucket name in version 3.x and later.

So a solution is upgrading to version 3.x or later. Version 2.x can be used by defining the github repo directly in your Podfile as dependency

pod KontaktSDK, :git => 'https://github.com/kontaktio/kontakt-ios-sdk', :tag => '2.0.1'

Or you can put the specific commit hash of thr version by replacing tag with commit.

medlay commented 1 year ago

@dulvui [!] Error installing KontaktSDK [!] /usr/bin/curl -f -L -o /var/folders/dd/znrv94g54cv3s_hd59xx_vm80000gn/T/d20231016-18249-lroxza/file.zip http://omg.kontakt.io.s3.amazonaws.com/ios/builds/kontakt-ios-sdk-3.0.25.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.13.0 cocoapods-downloader/1.6.3'

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (22) The requested URL returned error: 404

for pod 'KontaktSDK', '~> 3.0'

dulvui commented 1 year ago

@medlay Version 3.x S3 buckets are now also unreachable. Luckily we had the dependency in the local CocoaPods Cache so we are still able to build. You can check in Library/Caches/CocoaPods directory of your Mac if you have some cached KontaktSDK dependency.

medlay commented 1 year ago

@dulvui but how I can build on the Circle CI? They don’t have any cache. 😐

dulvui commented 1 year ago

@medlay Well we were able to recreate the cache in a Github Action, I don't know if this works also for Circle CI.

- name: Artificially inject KontaktSDK cache
  run: |
     mkdir -p /Users/runner/Library/Caches/CocoaPods
     unzip CocoaPods.zip -d /Users/runner/Library/Caches/

We simply zipped the whole Library/Caches/CocoaPods directory of the mac and added it to the repo. Then you unpack the zip into the Cirlce CI machines cache directory directory.

medlay commented 1 year ago

No, it doesn't work. And I'm a little bit frustrated. How it's possible to use cocoapods now for Kontakt — it's a big question.