Skip to Content

TypeError: Cannot read property 'pages' of undefined

I've created a new List Report Fiori app that has a CDS OData data source.

In SAP Cloud Platform the app works fine for testing in the sandbox.

I've now deployed the app to our local ABAP repository setup the tile and the app won't launch.

This is the full error I get in the web developer console:

routingHelper-dbg.js:346 Uncaught (in promise) TypeError: Cannot read property 'pages' of undefined
  at m (eval at evalModuleStr (jquery.sap.global-dbg.js:3318), <anonymous>:712:126)
  at D (eval at evalModuleStr (jquery.sap.global-dbg.js:3318), <anonymous>:710:29)
  at eval (eval at evalModuleStr (jquery.sap.global-dbg.js:3318), <anonymous>:713:3177)

This is the line of javascript that is throwing this error:

// if page exists, but for the current mode is replaced by external navigation, internal navigation is not allowed
if (oNavigationControllerProxy.oAppComponent.getManifestEntry("sap.ui.generic.app").pages[0].pages[0].navigation && oNavigationControllerProxy.oAppComponent.getManifestEntry("sap.ui.generic.app").pages[0].pages[0].navigation[oMode.mode]) {
          return {};
}

The manifest.json file has this 'pages' content though so I'm not sure why it is not able to read that resource.

Anyone have any ideas on how to successfully deploy a List Report templated Fiori app to the ABAP repository easily?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Feb 14, 2019 at 07:00 AM

    Hi Andrew Dobson

    can you check the UI5 version in your ABAP system, which might probably be the cause of the issue.

    when you are running the app in the webide, you can change the version of the UI5 in the project settings to the ABAP version(so when we deploy to the backend we can ensure that it will not cause any issues)

    BR,

    Mahesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14, 2019 at 06:56 PM

    Ah yes that looks to be the issue.

    I ended up recreating another project with the correct matching version to ours for SAPUI5 and then noticed the manifest.json generated was different.

    I updated new one with the problem to the new one and rebuilt and deployed and now it is working!

    Thanks again for the help :)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 14, 2019 at 07:27 PM

    Old version of 'pages' section:

            "pages": {
                "ListReport|ztest_storeinventorySet": {
                    "entitySet": "ztest_storeinventorySet",
                    "component": {
                        "name": "sap.suite.ui.generic.template.ListReport",
                        "list": true,
                        "settings": {
                            "smartVariantManagement": true
                        }
                    },
                    "pages": {
                        "ObjectPage|ztest_storeinventorySet": {
                            "entitySet": "ztest_storeinventorySet",
                            "component": {
                                "name": "sap.suite.ui.generic.template.ObjectPage"
                            }
                        }
                    }
                }

    New Version of 'pages' section:

            "pages": [
                {
                    "entitySet": "ztest_storeinventory",
                    "component": {
                        "name": "sap.suite.ui.generic.template.ListReport",
                        "list": true
                    },
                    "pages": [
                        {
                            "entitySet": "ztest_storeinventory",
                            "component": {
                                "name": "sap.suite.ui.generic.template.ObjectPage"
                            }
                        }
                    ]
                }
            ]
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.