ui5-community / generator-ui5-ts-app

Generator for UI5 applications using TypeScript which use the official UI5 tooling. This generator was built as a plug-in for the community project Easy UI5 by SAP.
Apache License 2.0
19 stars 15 forks source link

Newly generated projects throw errors and warning #29

Open MoritzSchleySAP opened 10 months ago

MoritzSchleySAP commented 10 months ago

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 commented 10 months ago

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.