Closed MdImamHasan closed 6 months ago
I think the root cause is rather
Refused to execute script from '.../Component-preload.js' because its MIME type ('application/json') is not executable and strict MIME type checking is enabled."
I am wondering why a .js
file gets application/json
as MIME type. It should rather get text/javascript
. This seems also to be the case for the provided webapps in the sample and their Component.js
file.
What's the content of this file? Are you on the main branch version of the sample otherwise?
Yes. I am on the main branch of the sample app. I am unsure about the MIME type and unable to see the file content.
During further investigation, it is clear that the issue is with the URI in the data sources section of the manifest.json
file. if we changed it from "uri": "/odata/v4/browse/"
, to "uri": "/api/browse/"
, then the preview works. I can see a similar issue reported here https://github.tools.sap/cap/issues/issues/15092 Maybe a similar fix is needed again. Thanks
Our sample application reconfigures the default base path from /odata/v4 to /api. It might very well be that the Fiori generator doesn't take this configuration into account. As you noted there was a fix in the past already in that area. So please make sure the Fiori generator you are running is using @sap/cds >= 7.6.0.
Hi, After generating a sample app on the provided cloud cap samples service (e.g. authors) and starting a preview via
mvn spring-boot:run
, we are running into issues with the empty preview. It is showing the following error in the console: My assumptionS/CUBE is not supported
is causing this error. Could you please check and verify that the preview is working fine? Thanks