Skip to Content
Technical Articles
Author's profile photo Michael Jess

Cloud Shipment for SAP Mobile Platform Kapsel SDK 3.1 Available

In a recent post I announced the availability for SAP’s all-new Cloud Shipment channel for the SAP Cloud Platform SDK for Android. Well, we haven’t been resting on our laurels and so it is that today I am proud to announce that we also made the Kapsel SDK available via cloud shipment, starting with version 3.1 SP02*. If you’re uncertain of what Cloud Shipment is and what its benefits are, I encourage you to take a look at the linked original post. Otherwise, if you’re just eager to get started, here is what you need to do:

  1. Follow the instructions in my original post to setup your SAP Repositories Management account** and make sure to download the “NPM Base64 Credentials” password file. You’ll need the value in that file in the next step.
  2. Run the following commands to link the @sap-kapsel npm scope to the Kapsel Cloud Shipment repository:
npm config set @sap-kapsel:registry https://73555000100900002542.npmsrv.repositories.sap.ondemand.com
npm config set _auth <authValue>

Note: The <authValue> is a Base64-encoded username:password value pair, which can be found in the password file you downloaded in step 1.

  1. You may now add Kapsel plugins to your Cordova projects as follows:
cordova plugin add @sap-kapsel/kapsel-plugin-logon

In addition, you can also now obtain and use the Kapsel CLI and the Custom Fiori Client this way:

npm install @sap-kapsel/create_fiori_client
# Create config.json based on node_modules/@sap-kapsel/create_fiori_client/config.json template
node node_modules/@sap-kapsel/create_fiori_client/create_fiori_client.js 

Of course, as with the previously enabled Cloud Shipment channel, those settings work fine both on developer workstations and Continuous Integration servers, so that building pipelines with our SDK is now easier than before. Stay tuned for an update to the SAP Cloud Platform Continuous Integration guides to leverage this feature in your projects as well!

 

*Note: The technical version identifier (e.g. used in Cordova commands) of Kapsel SDK 3.1 SP02 is 4.2.1.

**Note: The permission restrictions pointed out in my original blog apply: “Quoting the SAP support site,you can download the SAP products that are associated with your S-user ID. While every visitor can browse the list of software products without any special permissions, downloading files requires the Software Download authorization; to request it, contact a user administrator in your company.’ This restriction also applies to the cloud shipment channel. Please also note that credentials generated with this service are subject to expiry after 6 months, and hence need regenerating at least twice a year.”

(1) be part of an organization that has licensed access to this SDK.

(2) be authorized to download software from SAP in the name of your organization.

 

Edit 2019-03-04: Added version information.

Edit 2019-03-21: Adjusted repository URL

Edit 2019-08-05: Expanding on the **Note and adding a note that credentials need regenerating every 6 months.

Edit 2021-03-03: As of SMP/Kapsel SDK release 4.6.1 (Kapsel SDK 3.2 SP03 PL00), the namespace was changed from @sap to @sap-kapsel to avoid clashes with other products. The content has been changed to reflect that, but keep in mind that for older versions of Kapsel, you want to use the @sap namespace instead.

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Marc Antoine Forand
      Marc Antoine Forand

      Hi Michael,

      This seems very promising!

      I'm having issues when trying to add any Kapsel plugins to my Cordova project, seems the registry is not accessible.  nslookup to 73555000100900002542.npm.repositories.sapcdn.io also fails..

      See below npm stack trace :

      11 verbose stack FetchError: request to https://73555000100900002542.npm.repositories.sapcdn.io/@sap%2fkapsel-plugin-logon failed, reason: getaddrinfo ENOTFOUND 73555000100900002542.npm.repositories.sapcdn.io 73555000100900002542.npm.repositories.sapcdn.io:443
      11 verbose stack at ClientRequest.req.on.err (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
      11 verbose stack at emitOne (events.js:116:13)
      11 verbose stack at ClientRequest.emit (events.js:211:7)
      11 verbose stack at TLSSocket.socketErrorListener (_http_client.js:392:9)
      11 verbose stack at emitOne (events.js:116:13)
      11 verbose stack at TLSSocket.emit (events.js:211:7)
      11 verbose stack at emitErrorNT (internal/streams/destroy.js:66:8)
      11 verbose stack at _combinedTickCallback (internal/process/next_tick.js:139:11)
      11 verbose stack at process._tickCallback (internal/process/next_tick.js:181:9)

       

      Do you have any suggestions?

      thanks

      Author's profile photo Michael Jess
      Michael Jess
      Blog Post Author

      Hey Marc,

       

      My bad, I guess I had a copy-paste error from another blog where I was referring to our Maven CDN... Thanks for pointing that out! The updated link should work now. Would you mind giving it another shot?

       

      Cheers,

      Michael

      Author's profile photo Marc-Antoine Forand
      Marc-Antoine Forand

      Hi Michael,

      Thank you, registry URL works now.

      I managed to install the plugins, but had to specify the exact version #, like so:

      cordova plugin add @sap/kapsel-plugin-logon@4.2.1

       

      Without specifying the version, it was trying to load version 4.2.2 which does not seem available:

      7 http fetch GET 200 https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-logon 512ms
      8 silly registry:manifest no matching version for @sap/kapsel-plugin-logon@~4.2.2 in the cache. Forcing revalidation
      9 http fetch GET 200 https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-logon 120ms
      10 silly fetchPackageMetaData error for @sap/kapsel-plugin-logon@~4.2.2 No matching version found for @sap/kapsel-plugin-logon@~4.2.2
      11 timing stage:rollbackFailedOptional Completed in 1ms
      12 timing stage:runTopLevelLifecycles Completed in 799ms
      13 verbose type range
      14 verbose stack @sap/kapsel-plugin-logon: No matching version found for @sap/kapsel-plugin-logon@~4.2.2
      14 verbose stack at pickManifest (/usr/local/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:65:11)
      14 verbose stack at fetchPackument.then.packument (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:52:18)
      14 verbose stack at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
      14 verbose stack at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
      14 verbose stack at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
      14 verbose stack at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
      14 verbose stack at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
      14 verbose stack at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
      14 verbose stack at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
      14 verbose stack at Immediate.Async.drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
      14 verbose stack at runCallback (timers.js:810:20)
      14 verbose stack at tryOnImmediate (timers.js:768:5)
      14 verbose stack at processImmediate [as _immediateCallback] (timers.js:745:5)
      16 verbose Darwin 18.2.0
      17 verbose argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “@sap/kapsel-plugin-logon@~4.2.2” “–production” “–save”
      18 verbose node v8.13.0
      19 verbose npm v6.4.1
      20 error code ETARGET
      21 error notarget No matching version found for @sap/kapsel-plugin-logon@~4.2.2
      22 error notarget In most cases you or one of your dependencies are requesting
      22 error notarget a package version that doesn’t exist.
      23 verbose exit [ 1, true ]

      Looking forward to creating my builds via this method!

      thanks again,

      Marc

      Author's profile photo Michael Jess
      Michael Jess
      Blog Post Author

      Hi Marc,

       

      Interesting... Well I guess that needs looking into. Thanks for coming back and sharing the feedback, I'll ask what might have gone wrong here. Clearly if 4.2.2 metadata is found you should also be able to download it.

       

      Cheers,

      Michael

      Author's profile photo Michael Jess
      Michael Jess
      Blog Post Author

      Hi Marc,

       

      4.2.2 should be available now as well.

       

      Cheers,

      Michael

      Author's profile photo Marc-Antoine Forand
      Marc-Antoine Forand

      Great!

      Seems I still need to specify the plugin version when installing, for example:

      cordova plugin add @sap/kapsel-plugin-authproxy@4.2.2

      Now without specifying the version, I am getting a 401.

      Might be related but I also get a 401 when trying to view the package info via cli, for example:

      npm view @sap/kapsel-plugin-authproxy 

      See below stacktrace:

      0 info it worked if it ends with ok
      1 verbose cli [ '/usr/local/bin/node',
      1 verbose cli '/usr/local/bin/npm',
      1 verbose cli 'view',
      1 verbose cli '@sap/kapsel-plugin-authproxy',
      1 verbose cli '--json' ]
      2 info using npm@6.4.1
      3 info using node@v8.13.0
      4 silly mapToRegistry name @sap/kapsel-plugin-authproxy
      5 silly mapToRegistry scope (from package name) @sap
      6 silly mapToRegistry registry https://73555000100900002542.npmsrv.repositories.sap.ondemand.com
      7 silly mapToRegistry data { type: 'tag',
      7 silly mapToRegistry registry: true,
      7 silly mapToRegistry where: undefined,
      7 silly mapToRegistry raw: '@sap/kapsel-plugin-authproxy',
      7 silly mapToRegistry name: '@sap/kapsel-plugin-authproxy',
      7 silly mapToRegistry escapedName: '@sap%2fkapsel-plugin-authproxy',
      7 silly mapToRegistry scope: '@sap',
      7 silly mapToRegistry rawSpec: '',
      7 silly mapToRegistry saveSpec: null,
      7 silly mapToRegistry fetchSpec: 'latest',
      7 silly mapToRegistry gitRange: undefined,
      7 silly mapToRegistry gitCommittish: undefined,
      7 silly mapToRegistry hosted: undefined }
      8 silly mapToRegistry uri https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-authproxy
      9 verbose request uri https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-authproxy
      10 verbose request no auth needed
      11 info attempt registry request try #1 at 08:03:08
      12 verbose request id 9aa483e9a3b874c2
      13 http request GET https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-authproxy
      14 http 401 https://73555000100900002542.npmsrv.repositories.sap.ondemand.com/@sap%2fkapsel-plugin-authproxy
      15 verbose headers { date: 'Fri, 22 Mar 2019 12:03:08 GMT',
      15 verbose headers 'content-length': '0',
      15 verbose headers connection: 'keep-alive',
      15 verbose headers 'keep-alive': 'timeout=5',
      15 verbose headers 'x-content-type-options': 'nosniff',
      15 verbose headers 'content-security-policy': 'sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation',
      15 verbose headers 'www-authenticate': 'BASIC realm="Sonatype Nexus Repository Manager"' }
      16 verbose stack Error: 401 Unauthorized
      16 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:329:12)
      16 verbose stack at RegClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:9)
      16 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:216:14)
      16 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:185:22)
      16 verbose stack at emitTwo (events.js:126:13)
      16 verbose stack at Request.emit (events.js:214:7)
      16 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1161:10)
      16 verbose stack at emitOne (events.js:116:13)
      16 verbose stack at Request.emit (events.js:211:7)
      16 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1083:12)
      16 verbose stack at Object.onceWrapper (events.js:313:30)
      16 verbose stack at emitNone (events.js:111:20)
      16 verbose stack at IncomingMessage.emit (events.js:208:7)
      16 verbose stack at endReadableNT (_stream_readable.js:1064:12)
      16 verbose stack at _combinedTickCallback (internal/process/next_tick.js:139:11)
      16 verbose stack at process._tickCallback (internal/process/next_tick.js:181:9)
      17 verbose statusCode 401
      18 verbose cwd /Users/maforand/Kapsel/TestApp
      19 verbose Darwin 18.2.0
      20 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "view" "@sap/kapsel-plugin-authproxy" "--json"
      21 verbose node v8.13.0
      22 verbose npm v6.4.1
      23 error code E401
      24 error 401 Unauthorized
      25 verbose exit [ 1, true ]

      I don't mind specifying the versions when adding the plugins, but would be great if we can automatically pull the latest versions from the repository.

      Thanks again,

      Marc

      Author's profile photo Sreedhar Gunda
      Sreedhar Gunda

      Nice Blog Mike. Thank you for sharing.

      After going through your Blog, I feel you are my go to guy for one the issue we are facing is: the user is challenged with credentials whenever he closes and reopen the custom fiori client  app. The custom Fiori client is developed to support iOS13 version and we have used kapsel-sdk-3.1SP02 PL10.  The authentication is happening using IAM IDP with SAML 2. and the user can login by providing the credentials but the field users always close the app and reopen whenever they need it .

      The previous custom Fiori client  developed  using kapsel-sdk-3.1SP02 PL08 did not have any login challenges.

      The custom Fiori client  app developed  using kapsel-sdk-3.1SP02 PL08 is crashing on iOS13 is known issue from SAP  i.e new  custom fiori client has been redeveloped to support iOS13 and iOS12 & iOS11 also..

      Any help in resolving the authentication/SSO issue would be greatly appreciated.

       

      Regards,

      Sreedhar

       

       

      Author's profile photo Michael Jess
      Michael Jess
      Blog Post Author

      Hi Sreedhar,

       

      Thanks for your reply! I am sorry to hear that you are experiencing issues with our recent SMP SDK release. Alas, this platform is not the right place to help you in support cases - if you already created a ticket, please send me the ticket ID via mail and I'll see what I can do. Otherwise I must ask you to create a ticket first (component MOB-SDK-IOS), which our development team can then look into.

       

      Cheers,

      Michael

      Author's profile photo Sreedhar Gunda
      Sreedhar Gunda

      Thank you Mike. I have raised a ticket and emailed you the ticket number . Please let me know if you have received my email or not?