on 2021 Mar 02 11:11 AM
Tutorials: https://developers.sap.com/tutorials/appstudio-fioriapps-create.html
--------------------------
Hey guys,
I did the tutorial on creating an Fiori Freestyle App with BAS and ES5 OData-Serivce and I did everything like described in the tutorial, but when I start the App and open it in a new Tab The App can not load the data from the Es5 OData-Service because the browser blocks the load of the metadata due to cors-policy.
Any hints what I might have forgotten?
Error in Console:
Access to XMLHttpRequest at 'https://sapes5.sapdevcenter.com/sap/opu/odata/iwbep/GWSAMPLE_BASIC/$metadata?sap-language=DE' (redirected from 'https://workspaces-ws-8bb28-app1.eu10.trial.applicationstudio.cloud.sap/nsBusinessPartners/sap/opu/odata/iwbep/GWSAMPLE_BASIC/$metadata?sap-language=DE') from origin 'https://workspaces-ws-8bb28-app1.eu10.trial.applicationstudio.cloud.sap' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Log-dbg.js:456 2021-03-02 12:05:57.709054 [ODataMetadata] initial loading of metadata failed -
f @ Log-dbg.js:456
Log-dbg.js:456 2021-03-02 12:05:57.709129 Error: HTTP request failed -
f @ Log-dbg.js:456
sapes5.sapdevcenter.com/sap/opu/odata/iwbep/GWSAMPLE_BASIC/$metadata?sap-language=DE:1
Problems in BAS Debug Console:
#2.0#2021 03 02 11:05:35:779#+00:00#INFO#/approuter#####klrwndag##########klrwndag#PLAIN##Application router is listening on port: 6004#
#2.0#2021 03 02 11:05:55:908#+00:00#INFO#/Auth/OAuth2#####3316d19b-d86f-42e3-a6c4-5e4013366bb4####zNPz3mUir7BjHW4nZuIR2OGVbujGxXO4######3316d19b-d86f-42e3-a6c4-5e4013366bb4#PLAIN##req.url: /nsBusinessPartners/index.html#
#2.0#2021 03 02 11:05:55:910#+00:00#INFO#/Auth/OAuth2#####3316d19b-d86f-42e3-a6c4-5e4013366bb4####zNPz3mUir7BjHW4nZuIR2OGVbujGxXO4######3316d19b-d86f-42e3-a6c4-5e4013366bb4#PLAIN##sending page with client-side redirect to https://54f34bdetrial.authentication.eu10.hana.ondemand.com/oauth/authorize?response_type=code&clien...
#2.0#2021 03 02 11:05:55:912#+00:00#INFO#/Auth/OAuth2#####3316d19b-d86f-42e3-a6c4-5e4013366bb4####zNPz3mUir7BjHW4nZuIR2OGVbujGxXO4######3316d19b-d86f-42e3-a6c4-5e4013366bb4#PLAIN##x-forwarded-path header: undefined#
Application 'login' not found in local html5-apps-repo and there is no binding to remote html5-apps-repo (x-correlationid: undefined)
Request clarification before answering.
Have you configured the destination as described in the prerequisites?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Gregor,
yes i followed the exact instructions as you can see here:
In the wizzard I can see all the services from the es5 backend. Its only when I open the app after creating a run configuration.
Can it be that I used the deprecated Fiori Freestyle Wizzard? I also tried to use Abap as landscape option but I got the same CORS error.
Hi domae-swm ,
I think gregorw refers to the destination configuration in SAP BTP cockpit. There's a tutorial on how to create it.
Regards - Raz
Hi dominik.espitalier ,
I pushed the project to git. It is working well for me.
If it does not work for you, then there's probably a specific setup issue that needs to be resolved.
Regards - Raz
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.