<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcGIS Online Service Proxy job status returning &amp;quot;Invalid or missing input parameters.&amp;quot; in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-service-proxy-job-status-returning/m-p/377133#M34979</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to set up a simple esri-leaflet web application that sends a request to the &lt;A href="https://developers.arcgis.com/rest/elevation/api-reference/summarize-elevation.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Online Summarize Elevation service&lt;/A&gt;.&amp;nbsp;In order to avoid sending my client ID and secret across the wire, I have set up a simple ArcGIS Online Hosted Proxy, following the instructions found here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/working-with-proxies/" title="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/working-with-proxies/" rel="nofollow noopener noreferrer" target="_blank"&gt;Working with Proxy Services | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esri-leaflet-gp&lt;/SPAN&gt; plugin to submit&amp;nbsp;my geoprocessing tasks and process the results. My task:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var elevationService = L.esri.GP.service({
 url: "http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation",
 async: true,
 path: 'submitJob'
});&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;I then create new tasks like so, where &lt;STRONG&gt;marker&lt;/STRONG&gt; is a standard leaflet marker and &lt;STRONG&gt;elevationTaskCallback&lt;/STRONG&gt; is a function that does stuff with the results:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var elevationTask = elevationService.createTask();
 elevationTask.setParam('DEMResolution', 'FINEST');
 elevationTask.setParam('InputFeatures', marker.toGeoJSON());
 elevationTask.setParam('IncludeSlopeAspect', false);
 elevationTask.setOutputParam('OutputSummary');
 elevationTask.run(elevationTaskCallback);&lt;/PRE&gt;&lt;P&gt;The service task then submits a geoprocessing task and polls every second for the status. Once the status is '&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esriJobSucceeded&lt;/SPAN&gt;', the resulting output is sent to my callback. The problem is, that status check is sometimes returning an error, which is weird, and breaks the &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esri-leaflet-gp&lt;/SPAN&gt; code a little.&amp;nbsp;I've isolated a few tasks and I honestly can't figure out why it produces an error so often. Here is an example job status request generated by my code that you can paste into a browser:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;A class="link-titled" href="http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation/jobs/je3cd6c1944aa423a9ec62b7dfbff91e6?f=json" title="http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation/jobs/je3cd6c1944aa423a9ec62b7dfbff91e6?f=json" rel="nofollow noopener noreferrer" target="_blank"&gt;http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation…&lt;/A&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;If you refresh a few times, you should see the 400 error return&amp;nbsp;sometimes, and a completed task message return&amp;nbsp;other times.&amp;nbsp;I would love to know how I could fix this so it returns the status consistently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;&amp;nbsp;This endpoint will eventually be locked down using an&amp;nbsp;application referrer whitelist, but I've left it open temporarily in the hopes that someone can help me debug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:23:56 GMT</pubDate>
    <dc:creator>AndyZeigert</dc:creator>
    <dc:date>2021-12-12T16:23:56Z</dc:date>
    <item>
      <title>ArcGIS Online Service Proxy job status returning "Invalid or missing input parameters."</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-service-proxy-job-status-returning/m-p/377133#M34979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been trying to set up a simple esri-leaflet web application that sends a request to the &lt;A href="https://developers.arcgis.com/rest/elevation/api-reference/summarize-elevation.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Online Summarize Elevation service&lt;/A&gt;.&amp;nbsp;In order to avoid sending my client ID and secret across the wire, I have set up a simple ArcGIS Online Hosted Proxy, following the instructions found here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/working-with-proxies/" title="https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/working-with-proxies/" rel="nofollow noopener noreferrer" target="_blank"&gt;Working with Proxy Services | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esri-leaflet-gp&lt;/SPAN&gt; plugin to submit&amp;nbsp;my geoprocessing tasks and process the results. My task:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var elevationService = L.esri.GP.service({
 url: "http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation",
 async: true,
 path: 'submitJob'
});&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;I then create new tasks like so, where &lt;STRONG&gt;marker&lt;/STRONG&gt; is a standard leaflet marker and &lt;STRONG&gt;elevationTaskCallback&lt;/STRONG&gt; is a function that does stuff with the results:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var elevationTask = elevationService.createTask();
 elevationTask.setParam('DEMResolution', 'FINEST');
 elevationTask.setParam('InputFeatures', marker.toGeoJSON());
 elevationTask.setParam('IncludeSlopeAspect', false);
 elevationTask.setOutputParam('OutputSummary');
 elevationTask.run(elevationTaskCallback);&lt;/PRE&gt;&lt;P&gt;The service task then submits a geoprocessing task and polls every second for the status. Once the status is '&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esriJobSucceeded&lt;/SPAN&gt;', the resulting output is sent to my callback. The problem is, that status check is sometimes returning an error, which is weird, and breaks the &lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;esri-leaflet-gp&lt;/SPAN&gt; code a little.&amp;nbsp;I've isolated a few tasks and I honestly can't figure out why it produces an error so often. Here is an example job status request generated by my code that you can paste into a browser:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;A class="link-titled" href="http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation/jobs/je3cd6c1944aa423a9ec62b7dfbff91e6?f=json" title="http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation/jobs/je3cd6c1944aa423a9ec62b7dfbff91e6?f=json" rel="nofollow noopener noreferrer" target="_blank"&gt;http://utility.arcgis.com/usrsvcs/appservices/tGgqVVoHpHacidEV/rest/services/Tools/Elevation/GPServer/SummarizeElevation…&lt;/A&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;If you refresh a few times, you should see the 400 error return&amp;nbsp;sometimes, and a completed task message return&amp;nbsp;other times.&amp;nbsp;I would love to know how I could fix this so it returns the status consistently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE:&lt;/STRONG&gt;&amp;nbsp;This endpoint will eventually be locked down using an&amp;nbsp;application referrer whitelist, but I've left it open temporarily in the hopes that someone can help me debug.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:23:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-online-service-proxy-job-status-returning/m-p/377133#M34979</guid>
      <dc:creator>AndyZeigert</dc:creator>
      <dc:date>2021-12-12T16:23:56Z</dc:date>
    </item>
  </channel>
</rss>

