Closed leodompr closed 2 months ago
Hi @leodompr, CI/CD tests indicate that using Swift Package Manager to download SAP BTP SDK for iOS 10.0.1 works with proper configuration. Please check the validity of your credentials.
Or it might be a license issue. The download of the SAP BTP SDK for iOS binary frameworks is powered by SAP's Repository-Based Shipment Channel. RBSC grants access to these repositories based on a license check. License information is based on the purchased software and is attached to your S-user account. So you might want to check your current licenses as described here to ensure that your user has a license for the proper product version.
Issue is still happening even with proper licensing. (tried both 10.0.1 and 24.4.0)
Hi @ravitejabb,
can you please provide me the output for the below command from your terminal:
Alongside this, please check if the user has been expired or not which you can do by logging on Technical Users' UI Home Page.
Thanks, Marco
GET /nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip HTTP/1.1 Host: rbsc.repositories.cloud.sap Authorization: Basic XXXXXXXXX User-Agent: curl/8.4.0 Accept: /
< HTTP/1.1 200 OK < Date: Mon, 15 Apr 2024 06:26:14 GMT < Content-Type: application/zip < Content-Length: 2477025 < Connection: keep-alive < Strict-Transport-Security: max-age=7776000 < X-Content-Type-Options: nosniff < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation < X-XSS-Protection: 1; mode=block < Last-Modified: Wed, 10 Apr 2024 15:51:39 GMT < ETag: "{SHA1{xyz}}" < Content-Disposition: inline < X-Content-Type-Options: nosniff < X-XSS-Protection: 1; mode=block < X-Robots-Tag: none < X-Download-Options: noopen < X-Permitted-Cross-Domain-Policies: none < { [3584 bytes data]
It's downloading a zip file around 2.5MB
Thank you, @ravitejabb, for providing the information that you could download the SAPCommon.xcframework.zip
from the command-line tool. This tells me that your user 'abc-xyz’ (you probably replaced the actual user name for privacy reasons) has the correct permission and that your .netrc
file is correct. Otherwise, the download would have failed with HTTP 401
The Swift Package Manager uses the same URL for downloading the binary framework. FYI that you can see all download URLs in https://github.com/SAP/cloud-sdk-ios/blob/main/Package.swift.
The Swift Package Manager also evaluates your .netrc
file and adds the required Authorization header when attempting to download the binary framework.
So in your case, it's not a permission issue but I don't think it's a checksum issue or others because the CI/CD job tests the download of the binary frameworks by using swift package resolve
for this package
Please provide the full logs so that we can determine why you receive "invalid archive returned from" messages in Xcode. I cannot determine the root cause merely on the screenshot snippet you provided.
Cheers, Marco
XCode logs
Showing All Errors Only invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPCommon'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFiori/24.4.0/SAPFiori-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFiori'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFoundation/24.4.0/SAPFoundation-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFoundation'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOData/24.4.0/SAPOData-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPOData'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFioriFlows/24.4.0/SAPFioriFlows-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFioriFlows'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPML/24.4.0/SAPML-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPML'
invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOfflineOData/24.4.0/SAPOfflineOData-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPOfflineOData'
fatalError
Resolving Package Graph Failed 15/04/24, 10:59 PM 6.1 seconds
@ravitejabb which Xcode version are using? And do you get any failures when cloning this repository and run swift package resolve
? The downloaded artifacts should be visible then in .buid/artifacts/cloud-sdk-ios-main
XCode 15.3, Yes, when i clone the repo and run swift package resolve it's failing and giving the cached data.
Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip from cache Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFiori/24.4.0/SAPFiori-24.4.0-Release.xcframework.zip from cache Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFioriFlows/24.4.0/SAPFioriFlows-24.4.0-Release.xcframework.zip from cache error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPCommon' error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFiori/24.4.0/SAPFiori-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFiori' Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFoundation/24.4.0/SAPFoundation-24.4.0-Release.xcframework.zip from cache error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFioriFlows/24.4.0/SAPFioriFlows-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFioriFlows' Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOData/24.4.0/SAPOData-24.4.0-Release.xcframework.zip from cache Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOfflineOData/24.4.0/SAPOfflineOData-24.4.0-Release.xcframework.zip from cache Fetching binary artifact https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPML/24.4.0/SAPML-24.4.0-Release.xcframework.zip from cache error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPFoundation/24.4.0/SAPFoundation-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPFoundation' error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOData/24.4.0/SAPOData-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPOData' error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPOfflineOData/24.4.0/SAPOfflineOData-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPOfflineOData' error: invalid archive returned from 'https://rbsc.repositories.cloud.sap/nexus3/repository/maven73554900100900008403/ios/SAPML/24.4.0/SAPML-24.4.0-Release.xcframework.zip' which is required by binary target 'SAPML' error: fatalError
@ravitejabb looking at a similar https://github.com/apple/swift-package-manager/issues/6635 it is suggested that this might be either a caching or a keychain issue.
to clear the caches please run
rm -rf $HOME/Library/Caches/org.swift.swiftpm/ rm -rf $HOME/Library/org.swift.swiftpm Try to resolve packages again.
For keychain issue please open Keychain Access and search for github on Passwords. Check and, if required, remove it.
Try to resolve packages again.
Looks like it's cache issue, It worked after running above commands, Thanks.
@leodompr please check if the following tips help you as well. If not please come back and provide more information. I'll leave this issue open for another week.
Hi Do you have any suggestion for this log. I'm sure that login/password are correct in .netrc file. I'm using XCode 15.3.
GET /nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip HTTP/1.1 Host: rbsc.repositories.cloud.sap User-Agent: curl/8.4.0 Accept: /
< HTTP/1.1 401 Unauthorized < Date: Wed, 24 Apr 2024 13:45:12 GMT < Transfer-Encoding: chunked < Connection: keep-alive < Strict-Transport-Security: max-age=7776000 < X-Content-Type-Options: nosniff < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation < X-XSS-Protection: 1; mode=block < WWW-Authenticate: BASIC realm="Sonatype Nexus Repository Manager"
Hi @mateuszbo, in your logs I see Couldn't find host rbsc.repositories.cloud.sap in the .netrc file; using defaults
Please check your .netrc
file if it contains a such an entry:
machine rbsc.repositories.cloud.sap login yourusername password yourpassword
Hi @MarcoEidinger
Ok in my case .netrc was in the wrong location. But still can't download the package in XCode.
_* Trying 3.123.237.30:443...
GET /nexus3/repository/maven73554900100900008403/ios/SAPCommon/24.4.0/SAPCommon-24.4.0-Release.xcframework.zip HTTP/1.1 Host: rbsc.repositories.cloud.sap Authorization: Basic MDXX.. User-Agent: curl/8.4.0 Accept: /
< HTTP/1.1 200 OK < Date: Thu, 25 Apr 2024 07:35:53 GMT < Content-Type: application/zip < Content-Length: 2477025 < Connection: keep-alive < Strict-Transport-Security: max-age=7776000 < X-Content-Type-Options: nosniff < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation < X-XSS-Protection: 1; mode=block < Last-Modified: Wed, 10 Apr 2024 15:51:39 GMT < ETag: "{SHA1{047768ba1f27386e874c59d5a6657cafe64483f7}}" < Content-Disposition: inline < X-Content-Type-Options: nosniff < X-XSS-Protection: 1; mode=block < X-Robots-Tag: none < X-Download-Options: noopen < X-Permitted-Cross-Domain-Policies: none < { [3584 bytes data]
P.S I was able to resolve this after restart and: rm -rf $HOME/Library/Caches/org.swift.swiftpm/ rm -rf $HOME/Library/org.swift.swiftpm
Happy to hear that @mateuszbo was able to resolve the issue.
Didn't hear back from @leodompr. If the tips in this thread don't help then please open a new issue.
Whenever I try to add dependencies to my project, I receive this error. How to fix?