sap.ushell.Container is undefined in SAPUI5 app deployed on SAP BTP Cloud Foundry
Asked Answered
J

0

7

I am facing an issue in calling sap.ushell.Container.getServiceAsync("CrossApplicationNavigation") from a SAPUI5 application deployed in BTP Cloud Foundry and accessed through SAP BTP Launchpad service.
My understanding is: if app is launched from Fiori launchpad, it can trigger CrossApplicationNavigation.

manifest.json has the following dependencies declared:

{
  "sap.ui5": {
    "dependencies": {
      "minUI5Version": "1.52.0",
      "libs": {
        "sap.ui.core": {},
        "sap.m": {},
        "sap.ui.layout": {},
        "sap.ushell": {},
        "sap.collaboration": {},
        "sap.ui.comp": {},
        "sap.uxap": {}
      }

Error coming in console:
Error 1

Current sap.ushell:
My sap.ushell

Jilt answered 13/4, 2022 at 8:2 Comment(3)
It indicates that the SAPUI5 runtime libraries have not been loaded correctly in your application. This can occur if there is a configuration issue or if the required libraries are missing.Shangrila
I'm facing the same issue. I noticed that the sap.ushell.Container was defined once the page was loaded. I'm calling this code on button click. Once in the click handler, the sap.ushell.Container is no more defined. The handler is bound this way in the view ".onNavBack".Diggins
How are you calling it? This method returns a promise and not the CrossApplicationNavigation object itself. Also, it has recently been deprecated in 1.120Ricciardi

© 2022 - 2024 — McMap. All rights reserved.