cancel
Showing results for 
Search instead for 
Did you mean: 

OData services stopped working after deployment of attachments plugin

naveenvishal
Contributor

Hi,

I have deployed a CAP application on production with reads data from SuccessFactors and it works fine.

Additionally, I have to use Attachment plugin (cap-js/attachments (github.com)) for file upload. The attachment plugin works fine on development without breaking anything.

The issue occurred when I deployed the attachment changes to production, where attachment plugin is working fine but it has causes SuccessFactors OData calls to stop working. 

The changes that I did for adding attachments plugin is 1. CDS changes to include attachment plugin and 2. including it in package.json.

Please suggest where else I need to adjust so that this plugin does not conflict with the OData calls.  

naveenvishal_0-1715996972205.png

Thanks and Regards,

Naveen

MioYasutake
Active Contributor
0 Kudos

@naveenvishal

Let me confirm the following points:

  • Is it only the /User API that fails to connect out of the two APIs (/User, /Background_SpecialAssign)?
  • You mentioned that errors occur in the "production" environment. By "production," do you mean the Cloud Foundry Runtime, or do you mean that it only fails in the prod environment among multiple Cloud Foundry Runtime environments (dev, qas, prod)?
  • Do you see any error logs in the backend ? (by command `cf logs <your-service-name> --recent')
naveenvishal
Contributor
0 Kudos

Hi @MioYasutake ,

Please find the details:

Is it only the /User API that fails to connect out of the two APIs (/User, /Background_SpecialAssign)? The other API I cannot check until we bypass User API call. User API call is before we save to pull SF data and /Background_SpecialAssign when we save the data.

You mentioned that errors occur in the "production" environment. By "production," do you mean the Cloud Foundry Runtime, or do you mean that it only fails in the prod environment among multiple Cloud Foundry Runtime environments (dev, qas, prod)? I meant CF Runtime as we have only 1 (Dev) environment where I am test-building the application.

Do you see any error logs in the backend ? (by command `cf logs <your-service-name> --recent') -> Please find attached below the file with errors.

Thank you,

Naveen Vishal

View Entire Topic
MioYasutake
Active Contributor
0 Kudos

@naveenvishal 

Can you reproduce the issue locally by the method described in the document below?

https://cap.cloud.sap/docs/guides/using-services#mock-remote-service-as-odata-service-node-js

If you can reproduce the issue, then you can provide your project as a reference in the issue you raised.

https://github.com/cap-js/attachments/issues/50

 

naveenvishal
Contributor
0 Kudos

Hi Mio,

I tried to replicate the issue again locally but strangely its working on locally but not on deployment.

naveenvishal
Contributor
0 Kudos

Hi @MioYasutake,

The only this additionally I have observed is that, strangely, only by the inclusion of attachments with statement 'using { Attachments } from '@cap-js/attachments';' is causing the OData service to stop on deployment.