geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
515 stars 402 forks source link

Layer download fails when layer attributes are changed in feature grid #10597

Open offtherailz opened 1 month ago

offtherailz commented 1 month ago

Description

Video start at second 30 https://github.com/user-attachments/assets/1c017998-a0f4-4135-ab65-7428278b7e6e

How to reproduce

Expected Result

Browser info (use this site: https://www.whatsmybrowser.org/ for non expert users) | Browser Affected | Version | |---|---| |Internet Explorer| | |Edge| | |Chrome| | |Firefox| | |Safari| |

Other useful information

From a first impression, it looks there is a wrong format passed in case you are using property names.

Here the sequence of requests performed by the browser when errored ( I removed the autkeys from the requests):

curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'content-type: application/xml' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:dwn="http://geoserver.org/wps/download" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier>gs:DownloadEstimator</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier>layerName</ows:Identifier><wps:Data><wps:LiteralData>gs:us_states</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>filter</ows:Identifier><wps:Data><wps:ComplexData mimeType="text/xml; subtype=filter/1.1"><\u0021[CDATA[<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:And>undefined</ogc:And></ogc:Filter>]]></wps:ComplexData></wps:Data></wps:Input></wps:DataInputs></wps:Execute>' ;
curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute' \
  -H 'accept: application/xml, application/wfs-collection-1.0' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'content-type: application/xml' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:dwn="http://geoserver.org/wps/download" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier>gs:Download</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier>layerName</ows:Identifier><wps:Data><wps:LiteralData>gs:us_states</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>outputFormat</ows:Identifier><wps:Data><wps:LiteralData>application/wfs-collection-1.0</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>filter</ows:Identifier><wps:Data><wps:ComplexData mimeType="text/xml; subtype=filter/1.1"><\u0021[CDATA[<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:And>undefined</ogc:And></ogc:Filter>]]></wps:ComplexData></wps:Data></wps:Input><wps:Input><ows:Identifier>cropToROI</ows:Identifier><wps:Data><wps:LiteralData>false</wps:LiteralData></wps:Data></wps:Input></wps:DataInputs><wps:ResponseForm><wps:ResponseDocument storeExecuteResponse="true" status="true"><wps:Output mimeType="application/wfs-collection-1.0" asReference="true"><ows:Identifier>result</ows:Identifier></wps:Output></wps:ResponseDocument></wps:ResponseForm></wps:Execute>' ;
curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=GetExecutionStatus&executionId=0afb239d-8310-4243-9a3b-d0687f1cf88f' \
  -H 'accept: application/xml' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' ;
curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute' \
  -H 'accept: application/xml, application/zip' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'content-type: application/xml' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
  --data-raw '<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:dwn="http://geoserver.org/wps/download" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier>vec:Query</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier>features</ows:Identifier><wps:Reference mimeType="application/wfs-collection-1.0" xlink:href="https://gs-stable.geosolutionsgroup.com/geoserver/ows?service=WPS&amp;version=1.0.0&amp;request=GetExecutionResult&amp;executionId=0afb239d-8310-4243-9a3b-d0687f1cf88f&amp;outputId=result.xml&amp;mimetype=application%2Fwfs-collection-1.0&amp;" method="GET"/></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>the_geom</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>STATE_NAME</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>SUB_REGION</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>STATE_ABBR</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>LAND_KM</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>WATER_KM</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>PERSONS</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>FAMILIES</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>HOUSHOLD</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>MALE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>FEMALE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>WORKERS</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>DRVALONE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>CARPOOL</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>PUBTRANS</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>EMPLOYED</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>UNEMPLOY</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>SERVICE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>MANUAL</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>P_MALE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>P_FEMALE</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>attribute</ows:Identifier><wps:Data><wps:LiteralData>SAMP_POP</wps:LiteralData></wps:Data></wps:Input></wps:DataInputs><wps:ResponseForm><wps:ResponseDocument storeExecuteResponse="true" status="true"><wps:Output mimeType="application/zip" asReference="true"><ows:Identifier>result</ows:Identifier></wps:Output></wps:ResponseDocument></wps:ResponseForm></wps:Execute>'

Here the sequyence when it works

curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute' \
  -H 'accept: application/json, text/plain, */*' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'content-type: application/xml' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:dwn="http://geoserver.org/wps/download" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier>gs:DownloadEstimator</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier>layerName</ows:Identifier><wps:Data><wps:LiteralData>gs:us_states</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>filter</ows:Identifier><wps:Data><wps:ComplexData mimeType="text/xml; subtype=filter/1.1"><\u0021[CDATA[<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:And>undefined</ogc:And></ogc:Filter>]]></wps:ComplexData></wps:Data></wps:Input></wps:DataInputs></wps:Execute>' ;
curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=Execute' \
  -H 'accept: application/xml, application/zip' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'content-type: application/xml' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
  --data-raw $'<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:dwn="http://geoserver.org/wps/download" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"><ows:Identifier>gs:Download</ows:Identifier><wps:DataInputs><wps:Input><ows:Identifier>layerName</ows:Identifier><wps:Data><wps:LiteralData>gs:us_states</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>outputFormat</ows:Identifier><wps:Data><wps:LiteralData>application/zip</wps:LiteralData></wps:Data></wps:Input><wps:Input><ows:Identifier>filter</ows:Identifier><wps:Data><wps:ComplexData mimeType="text/xml; subtype=filter/1.1"><\u0021[CDATA[<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><ogc:And>undefined</ogc:And></ogc:Filter>]]></wps:ComplexData></wps:Data></wps:Input><wps:Input><ows:Identifier>cropToROI</ows:Identifier><wps:Data><wps:LiteralData>false</wps:LiteralData></wps:Data></wps:Input></wps:DataInputs><wps:ResponseForm><wps:ResponseDocument storeExecuteResponse="true" status="true"><wps:Output mimeType="application/zip" asReference="true"><ows:Identifier>result</ows:Identifier></wps:Output></wps:ResponseDocument></wps:ResponseForm></wps:Execute>' ;
curl 'https://gs-stable.geosolutionsgroup.com/geoserver/wps?service=WPS&version=1.0.0&REQUEST=GetExecutionStatus&executionId=35adf9b0-fdce-4363-8c4d-ab523207e59e' \
  -H 'accept: application/xml' \
  -H 'accept-language: en-US,en;q=0.9,it-IT;q=0.8,it;q=0.7' \
  -H 'origin: https://dev-mapstore.geosolutionsgroup.com' \
  -H 'priority: u=1, i' \
  -H 'referer: https://dev-mapstore.geosolutionsgroup.com/' \
  -H 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36'