3

My OpenUI5 page is not loading, then everything seems to be OK, and then suddenly the page is not loading again.

Yesterday morning did not work.
Yesterday evening worked without any change.
Today it does not work again.

You find the code at: https://github.com/SAP-samples/sap-tech-bytes/tree/2-minutes-of-sapui5/episode3/webapp

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170

1 Answers1

2

Cause

I see that the app bootstraps OpenUI5 from the CDN without specifying a concrete framework version aka. "default version". E.g. in index.html:

<script
 id="sap-ui-bootstrap"
 src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
 ...>
</script>

There have been indeed cache related issues when SAP delivered a new OpenUI5 version (1.107.0) to CDN as the default version a few days ago. This is a recurring problem with the default version of the framework's CDN URL as highlighted in the documentation topic Variant for Bootstrapping from Content Delivery Network:

Default Version

⚠ Caution

The default version is constantly being upgraded and this might have an impact on the stability of your application. Use this version for testing purposes only.

Resolution

  • When using OpenUI5 from the CDN, add a specific "<major>.<minor>.<patch>" version, that is still maintained, to the bootstrap URL:

    <script id="sap-ui-bootstrap"
      src="https://sdk.openui5.org/1.107.1/resources/sap-ui-core.js"
      data-sap-ui-async="true"
      data-sap-ui-...="..."
    ></script>
    
  • If the app is supposed to run with one of the long-term maintenance versions, bootstrap OpenUI5 with the patch-level independent "<major>.<minor>" variant aka. "evergreen" version:

    <script id="sap-ui-bootstrap"
      src="https://sdk.openui5.org/1.108/resources/sap-ui-core.js"
      data-sap-ui-async="true"
      data-sap-ui-onInit="module:sap/ui/core/ComponentSupport"
      data-sap-ui-...="..."
    ></script>
    

I highly recommend going through the Read Me First topics.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
  • I made what you said , I changed to this line src="https://sdk.openui5.org/1.107.1/resources/sap-ui-core.js" and I also changed the version (1.107.1) and I made what is in this article patch-level independent, but nothing is changed, the problem is still here. – Mahmood Hammood Oct 07 '22 at 11:12
  • @MahmoodHammood I did clone the repository and ran the app successfully. I just tested it again today but the problem is still **not** reproducible. Could you please describe the steps you took to start the app after cloning the repository? – Boghyon Hoffmann Oct 07 '22 at 11:26
  • I wrote the code myself step by step with the course videos in Youtube and I run the code when they run it in Video, sometimes it works, sometimes no, before two days everything was ok, yesterday morning it did not work and the page is white, I just made shut down for laptop!! – Mahmood Hammood Oct 07 '22 at 11:44
  • @MahmoodHammood So the code in your case is not same as the code from the linked GH repository? Is your code involving UI5 Tooling (`ui5.yaml`) at all? Or how are you starting the app? Please elaborate how we can reproduce the issue. Without a detailed set of steps, it's difficult to analyze the issue since the issue description is too vague. – Boghyon Hoffmann Oct 07 '22 at 11:52