Openui5: Missing sap-ui-version.json in Bower installation

Created on 27 Jan 2016  路  10Comments  路  Source: SAP/openui5

Inspired by this sample app, I have installed OpenUI5 with Bower.

Everything seems to work fine, except that I get two failing requests to resources/sap-ui-version.json.
While this is not critical, it does bother me to have errors while developing.

The dependencies in bower.json look like this:

  "dependencies": {
    "openui5-sap.ui.core": "openui5/packaged-sap.ui.core#~1.36.0",
    "openui5-sap.ui.layout": "openui5/packaged-sap.ui.layout#~1.36.0",
    "openui5-sap.m": "openui5/packaged-sap.m#~1.36.0",
    "openui5-themelib_sap_bluecrystal": "openui5/packaged-themelib_sap_bluecrystal#~1.36.0"
  }
enhancement wontfix

Most helpful comment

My guess would be

myFirstApp/WebContent/resources/sap-ui-version.json

All 10 comments

The sap-ui-version.json file is currently not part of the openui5 delivery via bower.
As the file is optional it should usually not get loaded by default. I just tried the mentioned sample app with version 1.36.0 and it worked fine without any request.

Can you please share an example on how to reproduce this?
E.g. some HTML snippet and exact openui5 version?

You are right, it is not requested by SAPUI5.

I have the UI5 Inspector installed which requests this file (several times).

Alright that's true.

As there is already a sap-ui-version.json file in the openui5 testsuite (https://github.com/SAP/openui5/blob/master/src/testsuite/src/main/webapp/resources/sap-ui-version.json) for development puroses I think we should also create it for the bower release and replace the placeholders with the actual values.

@petermuessig @codeworrior what do you think?

@Hirse I had a discussion with @codeworrior about this and we came to the conclusion that it wouldn't be correct to put a sap-ui-version.json into the openui5 bower delivery.
As the file is meant to describe a complete distribution of libraries, there is currently no place where we could put it in. The set of libraries depends on your dependencies, so we can't provide it statically.
For now I would suggest you to just create a file within your project and maintain it by yourself if you want to get rid of the ugly 404 error caused by the Chrome extension.

Hi,
@matz3
I get the same error, so I have a question:
I found the file: sap-ui-version.json at https://github.com/brakmic/OpenUI5_Table_Demo/blob/master/Scripts/vendor/sap/resources/sap-ui-version.json
However, where in my project structure should I put ?

Thanks!

@doniaZaela the file seems to come from a downloaded OpenUI5 package (from http://openui5.org/download.html) and is expected to be top-level in the resources folder (next to the sap-ui-core.js file.

@matz3 Thanks for your response. Yes, I found it as you described when I downloaded openui5 sdk. However, I am not sure where to put it in my project in eclipse. I have created a the folder "resources" at two spots as shown here:
screen shot 2018-03-15 at 10 25 06 am
However, I still get the error:
screen shot 2018-03-15 at 10 26 19 am
I am still very new with SAPUI5, so Thanks for your help.

Best Wishes

My guess would be

myFirstApp/WebContent/resources/sap-ui-version.json

@codeworrior
Yes right! Vielen Dank!

@doniaZaela FYI, the UI5 Tooling will create a sap-ui-version.json when building a self-contained application.

Was this page helpful?
0 / 5 - 0 ratings