Query Widget Fail!

09-06-2017 10:50 PM
New Contributor II

Hello. I've been trying for 3 days to get the query widget to do a simple spatial query (return points in a polygon), and can't for the life of me figure out why it's not working (Query Fail! error every time). We are using Portal 10.3 with web authentication. I am not an administrator, but do have a publisher role. 

Both the point layer and the polygon layer are within my organizational services. I've tried small datasets against small datasets, copying the data to the server, merging the polygon into one shape...etc. I can't figure out why this is so difficult. Anybody have any ideas?

Tags (1)
0 Kudos
3 Replies
Occasional Contributor III


If you open the Developer console on your browser (in Chrome hit F12, then select Console), then run the failing Query what is the output?

0 Kudos
New Contributor II


Thanks for replying. It looks like it's giving me a CORS error. 

And then ultimately fails to load layers (I *believe* that's what's happening).

0 Kudos
Esri Community Moderator

Hi Joel,

Ask your ArcGIS Server admin to check if they have enabled Cross Origin Resource Sharing (CORS) on the web server. Please see the Web AppBuilder FAQ topic,

FAQs—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

(specifically, this question: Why can't my deployed app access cross-domain resources?)

And the fix: Use proxy—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers 

Hope this helps,

0 Kudos