cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Freestyle Application - UI5 Destination Route Issue

rgadirov
Participant
0 Kudos
573

Dear SAPUI5 experts,

I have created a SAPUI5 basic freestyle project with standalone router module. In the past, some of the files looked differently, so I guess that changes were implemented.

The generated xs-app.json creates now a destination with

The mta.yaml file has a destination service with ui5 and its url as destination.

This seems to me pretty new and unfortunately, after deployment when trying to access the app via standalone router, it produces a 500 issue:

"GET request to /sapcpfsmdemoname/index.html completed with status 500 xs-app.json/routes/0: Format validation failed (Route references unknown destination \"ui5\")"}".

I wonder why we need the ui5 destination from now on and if it is actually required? Any ideas on how to solve this issue?

I open the app via the concatenation of approuter url and /sapcpfsmdemoname/index.html as a whole. But I get a 500 error as mentioned. Via npm start in BAS the app views are being opened without any issues.

Thank you in advance.

BR
Rufat

Accepted Solutions (0)

Answers (1)

Answers (1)

martinfrick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi rufat,

I assume, the src property for the UI5 resources is either incorrect in your UI5 app or your app is missing a respective route in its own xs-app.json file. When using the HTML5 Apps Repo, please load the UI5 resources as follows (without a slash in the beginning).

src="resources/sap-ui-core.js"

and add a respective route to your application's xs-app.json!

{
   "source": "^/resources/(.*)$",
   "authenticationType": "none",
   "destination": "ui5"
}

Feel free to check out our SAP-samples GitHub repository to see a similar setup!

https://github.com/SAP-samples/btp-cf-cap-multitenant-susaas/tree/basic/app/ui-admin-projectsCheers!

Martin