cancel
Showing results for 
Search instead for 
Did you mean: 

Multitenant MTA with Portal service UI gets 500 error upon redirect

mattredfig
Participant

Hi all,

Having trouble with my multitenant Portal cloud foundry app.

Basically, I have everything working with a static ("/index.html") approuter in a CAP project using cds-mtx library (like Andrew Lunde's blog.

I tried to add a fiori launchpad per the easy-ui5 yeoman generator, and I am getting a 500 error (that is really a hidden 401) when accessing the approuter from a subscribed subaccount.

I confirmed that my setup works when deployed as single-tenant.

When I access the URL from the subscriber, I get a 500 error, similar what is outlined here:

Which I traced to this request in @sap/xssec with options:

and error:

I can share code as needed, any guidance is appreciated!

mattredfig
Participant
0 Kudos

The images wouldn't load, so i'll try again

mattredfig
Participant
0 Kudos

second photo

mattredfig
Participant
0 Kudos

third image

Accepted Solutions (1)

Accepted Solutions (1)

bmcdonn2
Participant

Matt,

It looks like you might need to update the response of the getDependencies call in the SAAS registry to include an entry for your portal-service.

Details can be found in this link: Develop the Multitenant Application. This is the relevant section:

  • If your application consumes any reuse services provided by SAP, you must implement the getDependencies callback to return the service dependencies of the application. The callback must return a 200 response code and a JSON file with the dependent services appName and appId, or just the xsappname.
[ 
   {
      "xsappname" : "<value>"   # The xsappname of the reuse service which the application consumes.
                                # Can be found in the environment variables of the application:
                                # VCAP_SERVICES.<service>.credentials.xsappname
   }
] 

In terms of actually implementing this I'd recommend binding the relevant services to the app that handles the getDependencies request such that you can easily load the xsappname from the environment.

Hope this helps you solve the problem.

Thanks,

Brian

mattredfig
Participant
0 Kudos

Thanks Brian, that fixed it! It was never clear to me what "getDependencies" was for, but it makes (enough) sense now.

former_member748
Participant
0 Kudos

Hello mattredfig brian.mcdonnell

I'm also trying to implement the getDependencies() callback now and have a concern.

It seems to me that for appId I have to use from the Portal credentials uaa.xsappname and I'm now wandering if my service is created correctly or not. The same for UI Theme Designer and UI5 Flexibility Service with uaa.xsappname. Is this correct?

And for appName in case of these 3 services it's up to me how to name them or we have to have a certain name for each one?

Looking forward to your answers,

Kind regards,

Stefania

Answers (0)