SAP/ui5-tooling

XSA deployment errors due to missing distribution-metadata

Closed this issue · 3 comments

Dear all,
we are trying to deploy an SAPUI5 APP generated by FIORI tools to a HANA 2 SPS 5 XSA via xs push. Unfortunately, we recieve errors during deployment related to distribution-metadata package. The app is build as self-contained with all dependencies included using ui5 tooling. The deployment is executed with the xs cli and simple manifest.json.
The target system does not have access to the internet or other registries in internal networks. Target XSA provides node 16.20 currently.
We had the problem with ui5 cli ^2.14, 3.07 and 3.6.0.

Expected Behavior

  • the build and/or deployment logs do not show errors releated to "missing" distribution-metadata and no outgoing calls to registries are neccessary

Current Behavior

In our various tests, we had errors during the deployment due to missing deployment-metadata and the resolver tried to reach npmjs.org. The distribution-metadata is present in the .ui5 and recognized during build.

Please provide detailed steps on how we can reproduce your issue.
Depending on your issue, consider forking our sample app to reproduce it here: https://github.com/SAP/openui5-sample-app

-->

  1. {generated app with FIORI TOOLS in VS Code}
  2. {npm install for ui5 tooling}
  3. {app worked locally}
  4. {adjustment of ui5.yaml due to missing libraries}
  5. {ui5 build self-contained --verbose --all --clean-dest}
  6. creation of package.json in dist directory for FE; npm install
  7. addition of ui5.yaml to dist directory
  8. xs push

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 3.6.0
  • Node.js Version: 16.20
  • npm Version: 8.19.4
  • OS/Platform: Citrix; WIN10 Enterprise LTSC; XSA Redhat 7.9
  • Browser (if relevant): not relevant
  • Other information regarding your environment (optional): behind corporate proxy; using nvm; target platform no external conn. allowed; aiming for SAPUI5 1.108

Log Output / Stack Trace

30.01.24 14:06:55.856 [APP/1-0] ERR verb graph:projectGraphBuilder Module @ui5/logger neither provides a project nor an extension. Skipping dependency resolution 30.01.24 14:06:55.856 [APP/1-0] ERR verb graph:projectGraphBuilder Module keytar neither provides a project nor an extension. Skipping dependency resolution 30.01.24 14:06:55.856 [APP/1-0] ERR verb graph:ProjectGraph Skipping resolution of optional dependencies since none have been declared 30.01.24 14:06:55.892 [APP/1-0] ERR info graph:helpers:ui5Framework Using SAPUI5 version: 1.108.4 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:npm:Installer Installing to: /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/.ui5/framework/packages 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.m 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.ui.dt 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.ui.core 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.ui.rta 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.ushell 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.ui.generic.template 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.suite.ui.generic.template 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing sap.fe.templates 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:AbstractResolver Processing themelib_sap_horizon 30.01.24 14:06:55.892 [APP/1-0] ERR verb ui5Framework:Sapui5Resolver Installing @sapui5/distribution-metadata in version 1.108.4... 30.01.24 14:06:55.896 [APP/1-0] ERR verb ui5Framework:Installer Locking /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/.ui5/framework/locks/package-@sapui5-distribution-metadata@1.108.4.lock 30.01.24 14:06:55.896 [APP/1-0] ERR info ui5Framework:npm:Installer Installing missing package @sapui5/distribution-metadata... 30.01.24 14:06:55.897 [APP/1-0] ERR verb ui5Framework:npm:Installer Installing @sapui5/distribution-metadata in version 1.108.4 to /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/.ui5/framework/staging/@sapui5-distribution-metadata-1.108.4... 30.01.24 14:06:56.112 [APP/1-0] ERR verb ui5Framework:npm:Registry Using npm configuration (extract): 30.01.24 14:06:56.112 [APP/1-0] ERR verb ui5Framework:npm:Registry registry: https://registry.npmjs.org/ 30.01.24 14:06:56.112 [APP/1-0] ERR verb ui5Framework:npm:Registry globalconfig: /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/vendor/node16.20/etc/npmrc 30.01.24 14:06:56.112 [APP/1-0] ERR verb ui5Framework:npm:Registry cache: /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/.ui5/framework/cacache 30.01.24 14:08:06.209 [APP/1-0] ERR verb ui5Framework:Installer Unlocking /hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/.ui5/framework/locks/package-@sapui5-distribution-metadata@1.108.4.lock 30.01.24 14:08:06.210 [APP/1-0] ERR verb ui5Framework:AbstractResolver Failed to process library sap.m 30.01.24 14:08:06.210 [APP/1-0] ERR verb ui5Framework:AbstractResolver Error: Failed to extract package @sapui5/distribution-metadata@1.108.4: request to https://registry.npmjs.org/@sapui5%2fdistribution-metadata failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 30.01.24 14:08:06.210 [APP/1-0] ERR verb ui5Framework:AbstractResolver Call stack: Error: Failed to extract package @sapui5/distribution-metadata@1.108.4: request to https://registry.npmjs.org/@sapui5%2fdistribution-metadata failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 30.01.24 14:08:06.210 [APP/1-0] ERR at Registry.extractPackage (file:///hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/node_modules/@ui5/cli/node_modules/@ui5/project/lib/ui5Framework/npm/Registry.js:41:10) 30.01.24 14:08:06.210 [APP/1-0] ERR at processTicksAndRejections (node:internal/process/task_queues:96:5) 30.01.24 14:08:06.210 [APP/1-0] ERR at async file:///hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/node_modules/@ui5/cli/node_modules/@ui5/project/lib/ui5Framework/npm/Installer.js:115:6 30.01.24 14:08:06.210 [APP/1-0] ERR at async Installer._synchronize (file:///hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/node_modules/@ui5/cli/node_modules/@ui5/project/lib/ui5Framework/AbstractInstaller.js:43:16) 30.01.24 14:08:06.210 [APP/1-0] ERR at async Installer.installPackage (file:///hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/node_modules/@ui5/cli/node_modules/@ui5/project/lib/ui5Framework/npm/Installer.js:92:4) 30.01.24 14:08:06.210 [APP/1-0] ERR at async file:///hana/shared/D6E/xs/app_working/redactedhost/executionroot/b7e4bbf7-7a5f-41e4-ab43-fbec807700ba/app/node_modules/@ui5/cli/node_modules/@ui5/project/lib/ui5Framework/Sapui5Resolver.js:48:23 30.01.24 14:08:06.211 [APP/1-0] OUT 30.01.24 14:08:06.211 [APP/1-0] OUT ?? Process Failed With Error 30.01.24 14:08:06.211 [APP/1-0] OUT 30.01.24 14:08:06.211 [APP/1-0] OUT Error Message: 30.01.24 14:08:06.211 [APP/1-0] OUT Resolution of framework libraries failed with errors: 30.01.24 14:08:06.211 [APP/1-0] OUT 1. Failed to resolve library sap.m: Failed to extract package @sapui5/distribution-metadata@1.108.4: request to https://registry.npmjs.org/@sapui5%2fdistribution-metadata failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 30.01.24 14:08:06.211 [APP/1-0] OUT 2. Failed to resolve library sap.ui.dt: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 3. Failed to resolve library sap.ui.core: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 4. Failed to resolve library sap.ui.rta: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 5. Failed to resolve library sap.ushell: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 6. Failed to resolve library sap.ui.generic.template: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 7. Failed to resolve library sap.suite.ui.generic.template: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 8. Failed to resolve library sap.fe.templates: Error already logged 30.01.24 14:08:06.211 [APP/1-0] OUT 9. Failed to resolve library themelib_sap_horizon: Error already logged

Hi @kommissarg,

thanks a lot for opening this issue.
I had a look at the description. I guess, without having access to your landscape this will be quite hard to reproduce this on our side. If you wish this, please create SAP support incident on https://support.sap.com/en/index.html.

Some thoughts from my side:
According to the provided log output I guess the npm registry is not reachable by your landscape.

Error: Failed to extract package @sapui5/distribution-metadata@1.108.4: request to https://registry.npmjs.org/@sapui5%2fdistribution-metadata failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 

Please ensure access to https://registry.npmjs.org.

And by the way 1.108.4 is a really outdated UI5 version. Please use the latest one 1.108.27

Hi flovogt,
thank you for your quick response. We will create a SAP Support ticket today.
Kind regards
Alex

Hi @kommissarg ,

Did you open a ticket in the SAP system?
Closing this one here as we don't have many options to support rather than guess.
Please, reopen/write a comment in here it if you think we can be helpful and continue the discussion here.

Best Regards