cancel
Showing results for 
Search instead for 
Did you mean: 

404s in "Application Best Practices"

Former Member
0 Kudos

When I download the latest 1.26.4 release of OpenUI5 http://sap.github.io/openui5/download.html and look at the "Application Best Practices" demo.  It does not entirely work due to some 404 errors when retrieving some important json data.

The Application Best Practices demo also throws 404s on SAPs own site https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/tdg/index.html?responderOn=tr...

See your console.

It finds "Product.json" but not "Products.json"... "Category.json" but not "Categories.json"... etc.

GET https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/tdg/Component-preload.js 404 (Not Found)

GET https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/tdg/model/Products.json 404 (Not Found)

GET https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/tdg/model/Categories.json 404 (Not Found)

GET https://sapui5.netweaver.ondemand.com/sdk/test-resources/sap/m/demokit/tdg/model/Suppliers.json 404 (Not Found)

Whats wrong?  How do I fix this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have noticed a pattern in a lot of the questions about 404 errors in SAPUI5 tutorials.  The answer is usually, thats not an error!  It is a feature.  Or it is supposed to do that.  I would prefer error handling, or get console messages that indicating the nature of the issue.

So, in this case... I am told this 404 error is not an error.

404 Errors in tdg demo · Issue #284 · SAP/openui5 · GitHub

My question still stands... "since there is no live service behind the app", is there a way/ are there instructions on to pull that data down and work on the data locally?


I have been working my way through this tutorial to get acquainted with UI5.


Step 8: Master View - User Interface Add-On for SAP NetWeaver - SAP Library


Any help or replies regarding my original post on how to complete a version of the "Application Best Practices" without 404 messages... would be appreciated.  Any advice at all please.


Thanks!


Joel

AndreasKunz
Advisor
Advisor
0 Kudos

Hi,

well, nobody said the error message is a feature. But those 404 errors mean nothing else than that a file is requested which does not exist on the server. This error message is automatically logged by the browser, even though it looks like real errors noticed and logged by UI5. We cannot suppress these error messages and we cannot enrich them with additional information what they are about and whether they are critical.

I'm not sure whether a log statement "if you just saw an error message above, don't worry" would be an elegant and proper solution for this issue.

Those 404 responses mainly come when the application on browser side does not know whether a certain resource exists on the server, so it has to ask. Asking whether something is there and getting the answer "no" is not a big deal in this situation, but the browser does not know that we have a proper fallback, so it logs this error.

The mock server causing the data json 404s is not in our responsibility, so I can't really say what it does, but mock servers are not what normally is used productively, is it?

The Component-preload.json is an optimization file that an application CAN provide. Again, UI5 cannot know whether YOUR application provided it, so we have to check.

Regards

Andreas

Former Member
0 Kudos

Thank you for a reply!