CORS Error Survey123 website

987
4
01-17-2022 07:42 AM
vijaybadugu
Occasional Contributor II

I am getting CORS error . I am using ArcGIS Enterprise 10.9.1 

 

vijaybadugu_0-1642434124546.png

 

0 Kudos
4 Replies
ZacharySutherby
Esri Regular Contributor

Hello @vijaybadugu

Can you please explain the workflow where you're seeing this issue? I tested on my end with a 10.9.1 IWA ArcGIS Enterprise Portal and I did not see the same behavior. 

I would also suggest checking to see if there is anything set in the Allow origins section of the Portals Security settings as that may be playing a role: 

ZacharySutherby_0-1643759746366.png

 

Thank you,
Zach
0 Kudos
GianniCampanile2
New Contributor III

Hi Zachary,

I don't know if the problem we are experiencing is similar to the one of vijaybadugu but ghere is the problem: we published a Survey that is perfectly working when accessed via mobile app.

When we try to use it from the Survey123 website, sometimes (not always!) we get a CORS error (sometimes more than one):

GianniCampanile2_0-1668438787485.png

(translation:

Multi-origin request blocked (cross-origin): the source match policy does not allow reading of the remote resource from https://sinacloud.isprambiente.it/arcgisadv/rest/services/Hosted/service_79182d0128094781841256da6fc3d3ed/FeatureServer/6?f= json&token=Bo3F

And of course the survey is not accessible:

GianniCampanile2_1-1668438831691.png

The weird thing is that if we refresh the page, sometimes it works perfectly, and up to now we cold not tell the reason.

The Enterprise we are using is a 10.9.1 version, the feature service is hosted. The survey website was added on the trusted sited of the portal, no CORS policy is present on any webserver or on the portal.

Thanks

Gianni

 

 

 

0 Kudos
GianniCampanile2
New Contributor III

Just an update on this problem: using Chrome with CORS disabled (--disable-web-security --disable-gpu --user-data-dir=~/chromeTemp) everything works. This cannot be a workaround for users, just a try to verify that CORS is the problem.

We also tried to add the survey site on the portal security/origin section, even if no option is set on the webserver(s), but with no effect.

Any suggestion ?

Thanks

Gianni

0 Kudos
HanineSerhan_el07
Esri Contributor

hello

any updates on this issue?

0 Kudos