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

Unable to load load OData metadata with UI5 CLI v4 and SAPUI5 1.71 #988

Open
marianfoo opened this issue Jul 24, 2024 · 8 comments
Open
Labels
invalid This doesn't seem right

Comments

@marianfoo
Copy link

marianfoo commented Jul 24, 2024

Expected Behavior

Starting Fiori elements App with Fiori Tooling and UI5 CLI v4 and SAPUI5 Version 1.71

Current Behavior

Unable to load metadata from OData Service provided by CAP

image

Steps to Reproduce the Issue

  1. git clone https://github.com/marianfoo/ui5cliv4-v71
  2. cd ui5cliv4-v71
  3. npm i
  4. npm start

It works with either UI5 CLI v3 and SAPUI5 1.71 or with UI5 CLI v4 and SAPUI5 1.84 or above.

It did work with a freshly generated Fiori elements application, but i can´t tell what the difference was to make it work.

Context

  • UI5 Module Version : 4.0.0
  • Node.js Version: 20.14.0
  • npm Version: 10.3.0
  • OS/Platform: mac
  • Browser (if relevant): Chrome

Log Output / Stack Trace

➜  ui5cliv4-test-71 git:(main) ✗ npm start              

> ordersv2fenondraft71@0.0.1 start
> fiori run -p 8080 --open "index.html?sap-ui-xx-viewCache=false&sap-language=EN"

info fiori-tools-proxy Using UI5 version 1.71.67 based on manifest.json
info fiori-tools-proxy Starting fiori-tools-proxy using following configuration:
info fiori-tools-proxy proxy: 'undefined'
info fiori-tools-proxy ignoreCertError: 'false'
info fiori-tools-proxy backend: [{"path":"/odata/v2/orders","url":"https://livedemo.spreadsheet-importer.com"}]
info fiori-tools-proxy ui5: [{"path":"/resources","url":"https://ui5.sap.com","version":"1.71.67"},{"path":"/test-resources","url":"https://ui5.sap.com","version":"1.71.67"}]
info fiori-tools-proxy debug: 'false'
info backend-proxy-middleware Backend proxy created for https://livedemo.spreadsheet-importer.com /odata/v2/orders
info fiori-tools-appreload Livereload middleware started for port 35732 and path /Users/marianzeis/DEV/ui5cliv4-test-71/webapp
info fiori-tools-preview Initialized for app ui.v2.ordersv2fenondraft
Server started
URL: http://localhost:8080
info backend-proxy-middleware /odata/v2/orders/$metadata?sap-value-list=none&sap-language=EN
@marianfoo marianfoo added bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 24, 2024
@codeworrior
Copy link
Member

This is caused by a mismatch of your manifest version wrt. the UI5 version.

The UI5 tooling 4.0 enhances the manifest, json with information about the supportedLocales. But in UI5 1.71, this was not supported yet. The tooling uses the manifest's _version property to decide whether the supportedLocales can be generated or not. Your manifest has version 1.48 which is only supported since UI5 1.108.

When I reduce the version to 1.17 (which was the manifest version supported by UI5 1.71), then the app starts again.

@codeworrior codeworrior added invalid This doesn't seem right and removed bug Something isn't working needs triage Needs to be investigated and confirmed as a valid issue that is not a duplicate labels Jul 24, 2024
@codeworrior
Copy link
Member

You can find the mapping between manifest versions and UI5 versions here

@marianfoo
Copy link
Author

Thank you @codeworrior for the quick explanation.
But shouldn't there be a 'warn' or something to indicate that you can do the adjustment yourself?
I had already suspected the manifest as the cause of the error, but I would not have found the loading of the metadata that was the cause right away in a more complicated app.

@codeworrior
Copy link
Member

codeworrior commented Jul 24, 2024

I just said to @RandomByte that I would expect this as the next question :-)

Sure, a warning would be nice. For some historic reasons, the runtime does not check the manifest version, but that would be one option. For the tooling, it can be rather difficult to know what version is used at runtime (e.g .when not the local server is used). But the (invalid) combination of _version and minUI5Version in the Manifest could be detected, maybe that's an option.

We'll discuss this internally.

@codeworrior
Copy link
Member

BTW: thank's for the fast and easy to reproduce feedback reg. tooling 4.0 :-)

@marianfoo
Copy link
Author

BTW: thank's for the fast and easy to reproduce feedback reg. tooling 4.0 :-)

You´re welcome, the investment in my CI Pipeline pays off

I just said to @RandomByte that I would expect this as the next question :-)

Then I'll ask the right questions :)

In the UI5 development there are enough errors anyway that you have to interpret correctly, it would be nice if this can be checked as well as possible so that you can solve it yourself.

You can either close this if you create a new issue or leave it open as reference, up to you

RandomByte added a commit that referenced this issue Jul 24, 2024
RandomByte added a commit that referenced this issue Jul 24, 2024
RandomByte added a commit that referenced this issue Jul 25, 2024
…ible manifest versions (#990)

Related: #988

---------

Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
@NAVI-91
Copy link

NAVI-91 commented Sep 13, 2024

Hello,

I have a same issue after trying to run new fresh app. I create project by using reentranceTicket authentication. Metadata is not loaded, browser says "file NOT found"

image

Odata service works fine on browser.

image

image

@RandomByte
Copy link
Member

RandomByte commented Sep 16, 2024

@NAVI-91 based on your description, I don't think this is the same issue. Please raise a dedicated issue or SAP support incident

The issue discussed in this incident has been documented here: https://sap.github.io/ui5-tooling/stable/updates/migrate-v4/#app-stops-working-with-ui5-171

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants