SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

Master-Detail Template App broken #3435

Closed Jogala closed 2 years ago

Jogala commented 2 years ago

I downloaded the Master-Detail Template App from https://sapui5.hana.ondemand.com/#/demoapps

Steps to reproduce:

npm install npm run build

throws error:

#npm run build
> MasterDetail@1.0.0 build /home/jrosenberger/conovum/ui5_3Blocks/Master-Detail__
> rimraf dist && ui5 build --a

⚠️  Process Failed With Error

Error Message:
Unsupported specification version 2.4 defined for project @openui5/sap.ui.core. Your UI5 CLI installation might be outdated. For details see https://sap.github.io/ui5-tooling/pages/Configuration/#specification-versions

For details, execute the same command again with an additional '--verbose' parameter
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! MasterDetail@1.0.0 build: `rimraf dist && ui5 build --a`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the MasterDetail@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jrosenberger/.npm/_logs/2022-01-17T16_25_24_010Z-debug.log

We can get over this error message by deleting the "@ui5/cli": "^1.0.0" line from package.json and run npm install to remove thje package, s.t. a newer globally installed ui5 version is used (1.14.0 on my system).

Again run npm run build which generates:

> MasterDetail@1.0.0 build blabla/ui5_3Blocks/Master-Detail__
> rimraf dist && ui5 build --a

info builder:builder Building project MasterDetail including dependencies...
info builder:builder 🛠   (1/7) Building project sap.ui.core
info builder:builder library sap.ui.core 🔨 (1/10) Running task escapeNonAsciiCharacters...
info builder:builder library sap.ui.core 🔨 (2/10) Running task replaceCopyright...
info builder:builder library sap.ui.core 🔨 (3/10) Running task replaceVersion...
info builder:builder library sap.ui.core 🔨 (4/10) Running task replaceBuildtime...
info builder:builder library sap.ui.core 🔨 (5/10) Running task generateLibraryManifest...
info builder:builder library sap.ui.core 🔨 (6/10) Running task generateLibraryPreload...
info builder:builder library sap.ui.core 🔨 (7/10) Running task generateBundle...
info builder:builder library sap.ui.core 🔨 (8/10) Running task buildThemes...
info builder:builder library sap.ui.core 🔨 (9/10) Running task createDebugFiles...
info builder:builder library sap.ui.core 🔨 (10/10) Running task uglify...
info builder:builder 🛠   (2/7) Building project sap.ui.layout
info builder:builder library sap.ui.layout 🔨 (1/10) Running task escapeNonAsciiCharacters...
info builder:builder library sap.ui.layout 🔨 (2/10) Running task replaceCopyright...
info builder:builder library sap.ui.layout 🔨 (3/10) Running task replaceVersion...
info builder:builder library sap.ui.layout 🔨 (4/10) Running task replaceBuildtime...
info builder:builder library sap.ui.layout 🔨 (5/10) Running task generateLibraryManifest...
info builder:builder library sap.ui.layout 🔨 (6/10) Running task generateLibraryPreload...
info builder:builder library sap.ui.layout 🔨 (7/10) Running task generateBundle...
info builder:builder library sap.ui.layout 🔨 (8/10) Running task buildThemes...
info builder:builder library sap.ui.layout 🔨 (9/10) Running task createDebugFiles...
info builder:builder library sap.ui.layout 🔨 (10/10) Running task uglify...
info builder:builder 🛠   (3/7) Building project sap.ui.unified
info builder:builder library sap.ui.unified 🔨 (1/10) Running task escapeNonAsciiCharacters...
info builder:builder library sap.ui.unified 🔨 (2/10) Running task replaceCopyright...
info builder:builder library sap.ui.unified 🔨 (3/10) Running task replaceVersion...
info builder:builder library sap.ui.unified 🔨 (4/10) Running task replaceBuildtime...
info builder:builder library sap.ui.unified 🔨 (5/10) Running task generateLibraryManifest...
info builder:builder library sap.ui.unified 🔨 (6/10) Running task generateLibraryPreload...
info builder:builder library sap.ui.unified 🔨 (7/10) Running task generateBundle...
info builder:builder library sap.ui.unified 🔨 (8/10) Running task buildThemes...
info builder:builder library sap.ui.unified 🔨 (9/10) Running task createDebugFiles...
info builder:builder library sap.ui.unified 🔨 (10/10) Running task uglify...
info builder:builder 🛠   (4/7) Building project sap.m
info builder:builder library sap.m 🔨 (1/9) Running task escapeNonAsciiCharacters...
info builder:builder library sap.m 🔨 (2/9) Running task replaceCopyright...
info builder:builder library sap.m 🔨 (3/9) Running task replaceVersion...
info builder:builder library sap.m 🔨 (4/9) Running task replaceBuildtime...
info builder:builder library sap.m 🔨 (5/9) Running task generateLibraryManifest...
info builder:builder library sap.m 🔨 (6/9) Running task generateLibraryPreload...
info builder:builder library sap.m 🔨 (7/9) Running task buildThemes...
info builder:builder library sap.m 🔨 (8/9) Running task createDebugFiles...
info builder:builder library sap.m 🔨 (9/9) Running task uglify...
info builder:builder 🛠   (5/7) Building project sap.f
info builder:builder library sap.f 🔨 (1/9) Running task escapeNonAsciiCharacters...
info builder:builder library sap.f 🔨 (2/9) Running task replaceCopyright...
info builder:builder library sap.f 🔨 (3/9) Running task replaceVersion...
info builder:builder library sap.f 🔨 (4/9) Running task replaceBuildtime...
info builder:builder library sap.f 🔨 (5/9) Running task generateLibraryManifest...
info builder:builder library sap.f 🔨 (6/9) Running task generateLibraryPreload...
info builder:builder library sap.f 🔨 (7/9) Running task buildThemes...
info builder:builder library sap.f 🔨 (8/9) Running task createDebugFiles...
info builder:builder library sap.f 🔨 (9/9) Running task uglify...
info builder:builder 🛠   (6/7) Building project themelib_sap_fiori_3
info builder:builder theme-library themelib_sap_fiori_3 🔨 (1/3) Running task replaceCopyright...
info builder:builder theme-library themelib_sap_fiori_3 🔨 (2/3) Running task replaceVersion...
info builder:builder theme-library themelib_sap_fiori_3 🔨 (3/3) Running task buildThemes...
info builder:builder 🛠   (7/7) Building project MasterDetail
info builder:builder application MasterDetail 🔨 (1/8) Running task escapeNonAsciiCharacters...
info builder:builder application MasterDetail 🔨 (2/8) Running task replaceCopyright...
info builder:builder application MasterDetail 🔨 (3/8) Running task replaceVersion...
info builder:builder application MasterDetail 🔨 (4/8) Running task generateFlexChangesBundle...
info builder:builder application MasterDetail 🔨 (5/8) Running task generateComponentPreload...
info builder:builder application MasterDetail 🔨 (6/8) Running task createDebugFiles...
info builder:builder application MasterDetail 🔨 (7/8) Running task uglify...
info builder:builder application MasterDetail 🔨 (8/8) Running task generateVersionInfo...
info builder:builder Build succeeded in 4.07 min
info builder:builder Executing cleanup tasks...

After the build is completed, we now run npm run start which shows:

> MasterDetail@1.0.0 start blabla/ui5_3Blocks/Master-Detail__
> ui5 serve

Server started
URL: http://localhost:8080

AND NOTHING HAPPENS, and it is not an issue of the port, I tried different ones by modifying the ui5.yaml file.

server:
  settings:
    httpPort: 1337

There is not error message thrown, just nothing. Also directly opening the e.g. dist/test.html does not work. The sap UI5 modules are not found! (security disabled flags set)

I can however open dist/test.html in the browser, getting the example kind of running by using the online sapUI5 resources:

in index.html
src="../../../../../../resources/sap-ui-core.js" -> src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
in test.html
href="../../../../../../resources/sap/ui/core/themes/sap_fiori_3/library.css" -> href="https://openui5.hana.ondemand.com/resources/sap/ui/core/themes/sap_fiori_3/library.css"

It seems like the local paths are completely off.

Would you please fix your template app? It is completely broken.

Also, would you please include a README.md file?!!!

PS: Link to documentation is also broken!!! linkBroken

JumpNRun commented 2 years ago

Thank you for sharing this finding. I've created an internal incident 2280023771. The status of the issue will be updated here in GitHub.

RandomByte commented 2 years ago

Dear @Jogala, Thank you for bringing this to our attention!

We updated the UI5 CLI version in the template apps to the latest v2.14.4 release. You can already download the updated templates from https://openui5nightly.hana.ondemand.com/demoapps

To test the setup, in the updated Master-Detail template please execute:

  1. npm install
  2. npm start
  3. Open this URL in your browser: http://localhost:8080/test/mockServer.html

The application should come up, showing a list of mocked data entries. Please let us know in case you are running into any other issues. Thanks!

flovogt commented 2 years ago

Fixed by 9c849307d36fc36a4b51eeeea6915f4a2d4a98db