SAP Knowledge Base Article - Preview

3685066 - No credentials configured for \"servicename\"

Symptom

  • Adding _credentials_url as mentioned https://cap.cloud.sap/docs/guides/using-services#configure-application-defined-destinations-in-node-js

    .env
    cds_requires_REVIEWS_credentials_url=http://localhost:4008/reviews

    Results error when accessing the service url:

    {"error":{"message":"No credentials configured for \"servicename\".","code":"","@Common.numericSeverity":4}}




    [error] - 500 - Error: No credentials configured for "servicename".
        at RemoteService.init (C:\CAP\namespace\serviceB\node_modules\@sap\cds\libx\_runtime\remote\Service.js:188:13)
        at exports.init (C:\CAP\namespace\serviceB\node_modules\@sap\cds\lib\srv\factory.js:76:13)
        at C:\CAP\namespace\serviceB\node_modules\@sap\cds\lib\srv\cds-connect.js:42:115
        at async CatalogService.<anonymous> (C:\CAP\namespace\serviceB\srv\cat-service.js:5:22)
        at async next (C:\CAP\namespace\serviceB\node_modules\@sap\cds\lib\srv\srv-dispatch.js:57:17)
        at async CatalogService.handle (C:\CAP\namespace\serviceB\node_modules\@sap\cds\lib\srv\srv-dispatch.js:55:10) {
      code: ''
    }

  • Changing from cds_requires_REVIEWS_credentials_url (underscore) to cds.requires.REVIEWS.credentials.url, works,
    but cloud foundry doesn't work. According to https://cap.cloud.sap/docs/guides/using-services#configure-application-defined-destinations-in-node-js


    WARNING

    For the configuration path, you must use the underscore ("_") character as delimiter. CAP supports dot (".") as well, but Cloud Foundry won't recognize variables using dots. Your service name mustn't contain underscores.


Read more...

Environment

SAP CAP – node.js runtime

Product

CP PC APM SERVICE all versions

Keywords

sap cap, node.js, application-defined destinations, namespace, cloud foundry, environment variable, underscores, dots, sap.capire.bookshop, credentials configuration, capire documentation, package.json, error message , KBA , BC-XS-CDX-NJS , SAP CAP – node.js runtime , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.