cancel
Showing results for 
Search instead for 
Did you mean: 

XSA Cross-MTA Dependency with UAA

brad_smith5
Active Participant
1,181

I have been having an issue with my Launchpad implementation when enabling UAA in my UI5 app. I hoping I could get some advice on the correct configuration?

The configuration is XSA Fiori Launchpad, Cross MTA, UAA Auth. The UI5 app is referenced by destination as it is hosted in a separate MTA.

All of the source is available on github under the UAA branch: https://github.com/bigsmity/xsalaunchpaddemo/tree/uaa

When I enable UAA authentication on my UI5 application the demo UI5 app runs when launched directly https://xxxx-xxxx-launchpaddemoapp.sap-xxx-db.xxxxxx.xxx.xx:33033/webapp/index.html but I am unable to navigate to the application from Fiori Launchpad.

The error in the console when clicking the tile is:

Error: found in negative cache: 'launchpaddemoapp/launchpaddemoapp/Component.js' from /launchpaddemoapp_dest/Component.js: Unexpected token '<' at makeNestedError (https://xxxx-sap-sapui5-fesv5.sap-xxx-db.xxxxx.xxx.xx:33033/resources/sap/fiori/core-min-0.js:70:6831) at requireModule (https://xxxx-sap-sapui5-fesv5.sap-xxx-db.xxxxx.xxx.xx:33033/resources/sap/fiori/core-min-0.js:70:12446) at requireAll (https://xxxx-sap-sapui5-fesv5.sap-xxx-db.xxxxx.xxx.xx:33033/resources/sap/fiori/core-min-0.js:70:16395) at Object.r [as require] (https://xxxx-sap-sapui5-fesv5.sap-xxx-db.xxxxx.xxx.xx:33033/resources/sap/fiori/core-min-0.js:70:20091) at https://xxxx-sap-sapui5-fesv5.sap-xxx-db.xxxxx.xxx.xx:33033/resources/sap/fiori/core-min-2.js:65:278... at new Promise (<anonymous>)

When loading the component.js, the following html is returned in place of the component.js content. This looks to contain some redirect code but obviously cannot run in this context:


<html><head><link rel="shortcut icon" href="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" /><script>document.cookie="fragmentAfterLogin="+encodeURIComponent(location.hash)+";path=/";document.cookie="locationAfterLogin="+encodeURIComponent(location.href.split('#')[0].split(location.host)[1])+";path=/";document.cookie="signature=SS6p9Zjvm68tnTr0cos3BNf0phE%3D;path=/";location="https://uaa-server.sap-xxx-db.xxxxx.xxx.xx:33033/uaa-security/oauth/authorize?response_type=code&client_id=sb-launchpaddemoapp-xxx!i2&redirect_uri=https%3A%2F%2Fxxxx-xxx-launchpaddemo-launchpaddemo.sap-xxx-db.xxxxx.xxx.xx%3A33033%2Flaunchpaddemoap%2Flogin%2Fcallback"</script></head></html>

I have also noticed that the callback address in the script is incorrect:


https%3A%2F%2Fxxxx-xxx-launchpaddemo-launchpaddemo.sap-xxx-db.xxxx.xxx.xx%3A33033%2Flaunchpaddemoap%2Flogin%2Fcallback

https://xxxx-xxx-launchpaddemo-launchpaddemo.sap-xxx-db.xxxxx.xxx.xx:33033/launchpaddemoap/login/cal...

The actual address using destination is:


https://xxxx-xxx-launchpaddemo-launchpaddemo.sap-xxx-db.xxxxx.xxx.xx:33033/launchpaddemoapp_dest/Com...

The last 6 characters are cut off from the destination name.

I have also experienced this when calling a javascript service from a UI5 application when both are hosted in separate MTA's.

Any and all help is appreciated, Thanks,

Bradley.

Accepted Solutions (1)

Accepted Solutions (1)

brad_smith5
Active Participant
0 Kudos

I have made some progress on this issue today by switching the @sap/approuter to @sap/site-app-server. The launchpad scenario appears to be solved, I will continue to test my remaining scenarios. As this has been a difficult configuration I will make sure to document my solution in the near future.

I am still unsure weather I will need to get the scenario using the approuter working

Thanks,

Bradley.

**EDIT: My latest configuration https://blogs.sap.com/2020/04/03/xsa-fiori-launchpad-on-premise-configuration-with-cross-mta-depende...

**EDIT: I have moved the example branch from the question to the following location https://github.com/bigsmity/xsalaunchpaddemo/tree/approuter-uaa-failure-cross-mta

Answers (1)

Answers (1)

great work Bigsmity! You've helped me find the right information on setting up and slitting out my MTA files to a more manageable structure.