6

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

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
  • Please add an [mcve](https://stackoverflow.com/help/minimal-reproducible-example) to the question. Currently, it's not clear how to reproduce the error on FLP. – Boghyon Hoffmann Apr 18 '22 at 14:29
  • 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. – Amit kumar Feb 08 '23 at 16:03
  • 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". – Axel Samyn Jul 18 '23 at 10:23

1 Answers1

0

Steps to address "sap.ushell.Container is undefined" error in an SAPUI5 app deployed on SAP BTP Cloud Foundry :

  1. Check the SAPUI5 version : Ensure that the version of SAPUI5 libraries in your application matches the version supported by SAP BTP Cloud Foundry.

  2. Verify the resource path : Make sure that the path to the SAPUI5 libraries in your application is correct and points to the correct location in SAP BTP Cloud Foundry.

  3. Check the bootstrap configuration : Ensure that the bootstrap configuration in your index.html file is correct and matches the SAP BTP Cloud Foundry environment.

  4. Clear the browser cache : Clearing the browser cache can sometimes resolve the issue as it may have stale resources.

  5. Test with a different browser : If the issue still persists, try accessing your application using a different browser to eliminate any browser-specific issues.

Amit kumar
  • 2,169
  • 10
  • 25
  • 36