question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enabled "manifestFirst" doesn't load resources defined in sap.ui5

See original GitHub issue

OpenUI5 version: All

URL (minimal example if possible): https://embed.plnkr.co/4mURwe/ (Update 2017.04.22: Added mandatory attributes in the app descriptor)

Steps to reproduce the problem:

  1. Define any CSS or JS resources in the sap.ui5 namespace of app descriptor
  2. Enable manifestFirst either in the bootstrap configuration or in the component factory
  3. If available, remove manifest: "json" from the component metadata in order to avoid loading the file twice.

What is the expected result? CSS and JS files are loaded and applied.

What happens instead? Requests for those files aren’t even sent.

Any other information? (attach screenshot if possible) I couldn’t find any mention about this behavior in the documentation. The CSS and JS resources gets loaded when manifest: "json" is defined in the component metadata. But this will send another request to manifest.json even if the descriptor was loaded already through manifestFirst.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
matz3commented, Jun 1, 2018

@boghyon that’s right. We’ve optimized the manifest loading internally to share it with the ComponentMetadata class. Sorry for not updating this issue. This was done with https://github.com/SAP/openui5/commit/0e271c9db0fbbd8a04b4c5a5a0e6abad8ed11808.

If a URL is given instead (manifest: “myPath.json”), the manifest file is loaded twice again.

Yes, this is my design as the manifest loaded from a different location could have a different content than the one loaded from the default location. So we only share it in case the resulting URL would be the same.

0reactions
boghyoncommented, May 29, 2018

Just to note down for other readers what I observed: Since 1.54.0 (and without Component-preload.js), the manifest file is not loaded twice anymore but only when there was a name provided in the component creation. E.g.:

sap.ui.component({
  name: "...",
  manifest: true
})

If a URL is given instead (manifest: "myPath.json"), the manifest file is loaded twice again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Descriptor for Applications, Components, and ... - SAPUI5 SDK
When loading with manifest first (by using the property manifest ), the resourceRoots are evaluated before the component controller is loaded. Otherwise, the ......
Read more >
SAPUI5 Flexibility: Enable Your App for UI Adaptation
Use the flexEnabled flag. This flag in the manifest.json indicates that your application is enabled for UI adaptation. As of app descriptor schema...
Read more >
Failed to load resource while consuming OData service
The reason behind that is simple: your customer for sure has more than one SAP Gateway/Fiori system. So you shouldn't hard code the...
Read more >
SAP Tutorial: Complete CAP Java Part 3 | Nerd For Tech
We first start with an empty key. This tells the SAPUI5 framework that this is our default datasource, meaning that it doesn't need...
Read more >
Implementing Re-use Components in SAPUI5 libraries and ...
Inside the manifest.json file of the component it's important to set sap.app.type to component. Furthermore, we have to set the relative path to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found