Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly generated projects throw errors and warning #29

Open
MoritzSchleySAP opened this issue Sep 8, 2023 · 1 comment
Open

Newly generated projects throw errors and warning #29

MoritzSchleySAP opened this issue Sep 8, 2023 · 1 comment

Comments

@MoritzSchleySAP
Copy link

Using the latest version of the generator results in some warnings and errors in the console.

Element sap.m.App#__component0---app--app: page stack is empty but should have been initialized - application failed to provide a page to display -  
Element sap.m.App#__component0---app--app: page stack is empty but should have been initialized - application failed to provide a page to display -  
Element sap.m.App#__component0---app--app: page stack is empty but should have been initialized - application failed to provide a page to display -

GET http://localhost:8080/resources/sap/m/manifest.json 404 (Not Found)

Did place the view target 'sap.m.demo.view.Main' with the id '__component0---main' into the aggregation 'pages' of a control with the id '__component0---app--app' - EventProvider sap.m.routing.Target

GET http://localhost:8080/resources/sap/ui/core/manifest.json 404 (Not Found)

navigation to view with id: __component0---main is skipped since it already is displayed by its targetControl - sap.m.routing.TargetHandler 

The route named 'main' did match with its pattern - EventProvider sap.ui.core.routing.Route

The 404 errors should probably be addressed, as they can have an impact on performance (isn't manifest.json essential for ui5 projects? Why does the app work even with the 404 error here). Furthermore there seems to be something wrong with the initial routing (Page stack is empty, navigation skipped). The messages come up multiple times during the loading process. Any ideas?

@akudev
Copy link
Collaborator

akudev commented Sep 8, 2023

The 404 errors are related to the UI5 dev server using the not-built UI5 sources by default. The manifest.json files are only created when building the UI5 runtime (which is then distributed to the places from where it is normally used) - or when in this project doing npm run build:opt, which in turn does a ui5 build --all (this also builds UI5 itself). It's also mentioned during that build in the console:

info sap.m › Running task generateLibraryManifest...

So even though it indeed looks irritating, it is at least not an issue of this template, but generally happening with the UI5 dev server.
Also performance-wise, while there probably is some impact, this impact is way smaller than the impact of using the non-built UI5 sources (not minified, many single requests, no preloads).
All of this is gone once using a real (built) UI5 version, e.g. after the mentioned "opt" build, or also when using index-cdn.html instead of index.html, because this one does not use the local UI5 sources, but the Akamai content delivery network. (That' faster anyway than using the UI5 sources.)

Not sure about which of the other messages are actually warnings... seems like the initialization order is not as expected by the App control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants