cancel
Showing results for 
Search instead for 
Did you mean: 

I can't add my fiori-app with standalone approuter as an app to portal or launchpad on BTP

haykma
Participant
0 Kudos
2,861

Hi Community,

i developed a Fiori-app with VSC and Fiori-tools. Because we want to deliver the app to customers with SAP onPremise-Systems AND to customers who want to run the Fiori-app on BTP (CF), we actually prefer to use the standalone-approuter-approach, because then there is no need to change files of the Fiori-app itself for BTP-deployment compared to onPremise deployment (for example manifest.json needs different entries).

After deployment i have an app in my space with a route.

When clicking on the route, the app starts and works well.

So far so good.

But now i want to add this app to my launchpad (in this case based on portal subscription).

I know, that for using the central launchpad it would be better to use a managed approuter, because then you can select the app in porta-app creation directly from a HTML5-Repository of the launchpad/portal. But as discussed above, we prefered the standalone app router approach (and so with its own html5-repository).

So, i followed the blogs and documentation for adding an UI5-App to the central lauchnpad:

  • create a destination for the approuter

  • Created an app-defintion in portal/launchpad app

When i know try to launch the app i get the error, that website is rejecting the connection:

I can't really understand, that such an extra option to add a ui5-app to the launchpad is not better documented of its constraints and maybee many developer run into a trap.

I read many postings and blogs here and on other sources to understand and solve the problem. it seems, that CORS is the reason for it. Some postings say that i have to set a the 'httpHeaders' variable in my approuter with the value
X-Frame-Options: allow-from https://<url of portal>/

but my chrome-browser says that "X-Frame-Options" are not supported.
Now i used the newer "Content-Security-Option" as you can see in the screenshot.

But this also is not successfull.

Update:
Meanwhile i changed to set the httpHeaders value to:

(using 'self' in single quotes and the full path with protocol WITHOUT quotes but with ending semicolon)

When i now starting the app from portal, it seems to solve the CORS-Problem, BUT now i run into the next problem.
It seems that "someone" uses the path (/cp.portal/ui5appruntime.html) in the app-router, which is not exisitent. And maybee thats reason why i now get a http-error "503" (Service not available).
Heres the screenshot from browser network trace:

i'm running out of options. Tried different variations of the value-part of the option, but always without success. Maybee there is only a little thing missing.

A hint would be great.

kind regards
Matthias

View Entire Topic
Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi mhay,

Using a stand alone app router is the old way of developing Launchpad compliant applications.

The new central Launchpad works with a centralized content provider - which retrieves the applications from the content provider and ease the work for developers in order to add new applications - be them from on-prem, SaaS or local to BTP. Every instance of the Launchpad Service already comes with BTP as content provider, but only for apps that are deployed using the managed app router.

IMHO the manifest file "should" work with your on-prem ERP as there is just additional information there - nothing that would prevent the app from being deployed or work. Such additional info is only used by the Cloud Foundry Launchpad Service to identify the app definition and have it served by the managed app router.

If you face any issues with the manifest that was prepared for the managed app router, then I would guess it is better top open a ticket at SAP to make sure the ABAP stack is capable of parsing this file properly - maybe there is a SAP Note to apply on your system so it is compliant with the new manifest format. I am really not an expert on that particular area.

As a workaround, you may try using the dynamic destination like so:

1) Add a property on your destination.

HTML5.DynamicDestination = True

2) Then modify your App in the Content Manager with

App UI Technology = Dynamic URL

Relative Path to App = /

NOTE: The relative path to the app is the root of your app router only if the welcome page is the app itself. Otherwise, please add any paths as required for your app here. I wouldn't use the full path to your application on the destination as it could serve as entry point for more than one web module in your MTA.

Hope this helps.

Best regards,
Ivan

T1mey
Active Participant
0 Kudos

ivan.mirisola Is there any documentation how to integrate sapui5 applications which are using the standalone approuter into cFLP ?

Is there a way to bring them over the content provider (without unsing managed app router) ?

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi tim.anlauf,

AFAIK there is no integration between the FLP Service's Content provider other than managed app router for BTP apps.

This is something being requested by a lot of partners these days for subscribed apps as well. Maybe you could influence.sap.com to help this become a reality.

What may work is to create an App definition in FLP service and point it to the App Router's URL. But this means it would not open inside the launchpad itself.

Best regards,
Ivan

karthik_d
Associate
Associate
Hi Ivan, I have followed the changes suggested by you, but I am getting a blank page. The App works fine when run on CF space. Could you please help here