on ‎2023 Apr 04 5:00 PM
I am trying to run my newly created Fiori app in BAS connecting to our on-premise gateway. When I do a preview in BAS (or do $npm run start) I'm getting this error in the console:

The application seems to run fine, but I still get that error. Everything in the app is pretty much as created by the template wizard, I didn't change anything in the manifest or component.js.
There seem to be other questions here about the same error message, but those scenarios are completely different from mine.
Any help would be appreciated.
Thanks in advance.
Request clarification before answering.
Hi Ramin,
I can't give you an answer on why the template created in BAS tries to call the component-preload.js. I retested it with an freestyle template and it didn't get this error. Guess there would be more info needed on your specific scenario, which template, migration from webide/neo(?) etc.
Usually this component-preload.js file is generated on building the app to improve performance of deployed apps. If your app is deployed and you don't get an error, this means your component-preload.js file gets consumed as it should be, so everything is fine.
When running locally or in debug, the component.js file will be retrieved in most cases and not the component-preload.js. As i said, why your application tries to request that preload file in local/debug mode, I can't answer because I don't have access to all the info. But if you say that the application still runs fine in preview, even with the error, I wouldn't personally mind too much. It seems that in this case it tries to load the preload file, fails, but then still gets the component.js file to make the app work. Otherwise your app wouldn't run.
In preview you could try amending sap-ui-xx-componentPreload=off to the URL to deactivate loading component-preload.js. Then you could see if you still get that error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.