cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Application Error - Cannot Get /

THENNARASU
Discoverer
0 Kudos
107

Hi SAPians,

We are encountering an issue after deploying a CAP application to Cloud Foundry. Our CAP application is not bound to any database; instead, we are using OData to retrieve and post data to an on-premise HANA database. As a result, we removed all database-related configurations from the MTA.yaml file. The deployment was successful, but when we try to access the service of the application from the space, we receive the error "CANNOT GET /".

Do you have any insights on why this might be happening?

Many thanks in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

umasaral
Active Participant
0 Kudos

To resolve the issue with your deployed application accessing the OData service, check the following: 1) Ensure network access and permissions for the deployed app. 2) Verify that environment variables and destination configurations match the working freestyle app. 3) Check CORS settings on the OData service. 4) Implement detailed error logging to capture any request failures. 5) Confirm routing configurations in both package.json and manifest.json are correct. 6) Ensure version compatibility of libraries. 7) If possible, replicate the issue in a staging environment for further debugging

 

StepAction Required
Network AccessEnsure deployed app has access permissions.
Environment VariablesVerify environment settings match working freestyle app.
Destination ConfigurationCheck that destination settings are correct.
CORSEnsure CORS is configured on the OData service.
Error LoggingImplement detailed logging for request failures.
Routing ConfigurationConfirm package.json and manifest.json routing is correct.
Version CompatibilityCheck compatibility of libraries with the deployment environment.
Staging EnvironmentAttempt to replicate the issue in a staging environment.
umasaral
Active Participant
0 Kudos

The "CANNOT GET /" error typically indicates that the root path of your application is not properly configured or that the service is not responding. Since your CAP application is not bound to a database and relies on OData for data retrieval, ensure that your OData service is correctly defined and accessible. Check your `package.json` to confirm that the correct routes are set up. Additionally, verify the deployment logs for any runtime errors or issues with connectivity to the on-premise HANA database. Make sure the necessary authentication and network configurations are also in place.

please check the below link for your reference.

 

 

 

THENNARASU
Discoverer
0 Kudos
 

Hey umasaral,

We checked the OData configuration, and it is set up correctly and accessible. We can successfully fetch data from the on-premise system while running the application on localport.  However, the issue arises when we deploy the application and try to access it. We also verified the routes in the package.json file, and they are configured properly. Additionally, we didn’t find any anomalies in the deployment logs.

Moreover, we deployed a freestyle Fiori application using the same destination and OData service, and it is working fine.

Could you please provide more detailed guidance on where we might be going wrong? Your insights would be greatly appreciated.

Thank you!