cancel
Showing results for 
Search instead for 
Did you mean: 

Issues faced in the Building Side-by-Side Extensions on SAP BTP

Elroy
Associate
Associate
0 Kudos
397

Hi All,

I have implemented the Side by Side Extension on SAP BTP using CAP (https://learning.sap.com/learning-journeys/build-side-by-side-extensions-on-sap-btp) and I am currently facing 3 issues as follows:
1. When I run my Risk Management App locally, I get the below error:

Elroy_0-1714026227170.png

I would like to know which Auth aspect would I need to check to resolve this. This was working fine before but have started to face this after I made the changes to deploy the app in Cloud Foundry.

 

2. I have deployed the app in Cloud Foundry, but get the below message when I run the app in CF:

Elroy_1-1714026377243.png

 

Logs:
{"written_at":"2024-04-25T06:25:42.949Z","written_ts":1714026342949000000,"csn_component":"-","correlation_id":"e068b7c6-eae8-497b-5b67-fd6a35c4e48f","type":"log","logger":"nodejs-logger","layer":"/Handler","level":"error","container_id":"10.32.3.5","component_type":"application","component_id":"5e07e58f-51c7-4412-b094-f1c3faadf443","component_name":"risk-management","component_instance":-1,"source_instance":-1,"organization_id":"5345543f-4ece-41a5-8d90-102a920f6be9","organization_name":"cbca00ddtrial","space_id":"ab716db3-0b31-4224-85eb-ea9432035ed3","space_name":"dev","request_id":"e068b7c6-eae8-497b-5b67-fd6a35c4e48f","msg":"GET request to launchpad.htm/launchpad.html completed with status 404 ENOENT: no such file or directory, stat '/home/vcap/app/launchpad.html'"}

3. While running the CI/CD pipeline, the Release stage faced the below error:

[2024-04-25T05:17:30.379Z] ***
[2024-04-25T05:17:30.379Z] hudson.AbortException: [cloudFoundryDeploy] Step execution failed (category: undefined). Error: running command 'cf' failed: cmd.Run() failed: exit status 1
[2024-04-25T05:17:30.379Z] ***

My project is in the below links:
https://github.com/ElAfc/RiskManagement.git

 

Happy to share any other info that is needed.

Any help on this would be appreciated.

 

 

View Entire Topic
Olexandra
Newcomer
0 Kudos

Hello  @Elroy , @Ivan-Mirisola,

could you please help me to find a solution within the same context: I am implementing Side-by-Side Extension on SAP BTP using CAP.

When trying to connect to the API for BusinessPartners entity I receive this error:

[cds] - Error: Request to remote service failed.
    at run (/home/user/projects/risk-management/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js:234:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RemoteService.on_handler (/home/user/projects/risk-management/node_modules/@sap/cds/libx/_runtime/remote/Service.js:265:20)
    at async next (/home/user/projects/risk-management/node_modules/@sap/cds/lib/srv/srv-dispatch.js:68:17)
    at async RemoteService.handle (/home/user/projects/risk-management/node_modules/@sap/cds/lib/srv/srv-dispatch.js:66:10)
    at async RemoteService.handle (/home/user/projects/risk-management/node_modules/@sap/cds/libx/_runtime/remote/Service.js:292:22)
    at async ApplicationService.<anonymous> (/home/user/projects/risk-management/srv/risk-service.js:59:12)
    at async next (/home/user/projects/risk-management/node_modules/@sap/cds/lib/srv/srv-dispatch.js:68:17)
    at async ApplicationService.handle (/home/user/projects/risk-management/node_modules/@sap/cds/lib/srv/srv-dispatch.js:66:10)
    at async ApplicationService.handle (/home/user/projects/risk-management/node_modules/@sap/cds/libx/_runtime/common/Service.js:87:16) {
  statusCode: 502,
  reason: AggregateError [ECONNREFUSED]: 
      at internalConnectMultiple (node:net:1116:18)
      at afterConnectMultiple (node:net:1683:7)
      at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
    code: 'ECONNREFUSED',
    errors: [ [Error], [Error] ],
    message: 'Request to remote service failed.',
    config: {
      timeout: 10000,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      proxy: false,
      method: 'get',
      baseURL: 'http://localhost:39545/odata/v4/api-business-partner',
      url: "/A_BusinessPartner?$select=BusinessPartner,BusinessPartnerFullName&$orderby=BusinessPartner%20asc&$filter=LastName%20ne%20''%20and%20FirstName%20ne%20''&$top=1000",
      data: undefined
    },
    request: {
      method: 'GET',
      url: "http://localhost:39545/odata/v4/api-business-partner/A_BusinessPartner?$select=BusinessPartner,BusinessPartnerFullName&$orderby=BusinessPartner%20asc&$filter=LastName%20ne%20''%20and%20FirstName%20ne%20''&$top=1000",
      headers: [Object]
    },
    correlationId: '0777953d-190a-4db8-b39f-3def96db2075',
    toJSON: [Function (anonymous)]
  },
  id: '1899257',
  level: 'ERROR',
  timestamp: 1718637330838
}


The strange thing is that the cds is trying to get the API using this wrong url:

[cds] - connect to API_BUSINESS_PARTNER > odata { url: 'http://localhost:39545/odata/v4/api-business-partner' }

 

When the destination in package.json is set to the correct one:

 "cds": {
    "requires": {
      "API_BUSINESS_PARTNER": {
        "kind": "odata-v2",
        "model": "srv/external/API_BUSINESS_PARTNER",
        "credentials": {
          "url": "https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER/"
        }
      }
    }
  },

Thank you in advance,

Best regards!