<?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 Unable to load result MapImageLayer time to time - JS API 4.6 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-load-result-mapimagelayer-time-to-time/m-p/713051#M66256</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I have geoprocessing service which produces a MapImageLayer as the result. I&amp;nbsp;execute the asynchronously using the JavaScript API method&amp;nbsp; "submitJob" method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;var&lt;/SPAN&gt; gpTask &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0077aa;"&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;Geoprocessor&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;gpTaskUrl&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;
gpTask&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;outSpatialReference &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999;"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; wkid&lt;SPAN class="" style="color: #999999;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #990000;"&gt;102100&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #999999;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;
gpTask&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;submitJob&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;params&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;then&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;drawResultData&lt;SPAN class="" style="color: #999999;"&gt;,&lt;/SPAN&gt; errBack&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It&amp;nbsp;GP task is executed successfully all the time, I see it when I check the server using the job ID. But&amp;nbsp;the resulting map image layer is loaded only in some cases, otherwise I see an error. Specially when the layer is loaded successfully, if I zoom into a specific area there is an increase probability to see the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;views&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;2d&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapImageLayerView2D&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; e 
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"dynamiclayer:image-fetch-error"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&amp;nbsp; message&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;"Unable to load image: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Farcgis" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&amp;lt;domain&amp;gt;…at=png32&amp;amp;transparent=true&amp;amp;layers=show%3A0&amp;amp;f=image"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&amp;nbsp; details&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;…&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The failed request is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;https://arcgis.&amp;lt;domain&amp;gt;/arcsrv/rest/services/&amp;lt;ResultMapServiceName&amp;gt;/MapServer/jobs/je13d9121d0ee4270894ebd01f66758a1/export?bbox=-14177540.562098123%2C1761435.9140478536%2C-4784958.526418162%2C6990951.641205082&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=1920%2C1069&amp;amp;dpi=96&amp;amp;format=png32&amp;amp;transparent=true&amp;amp;layers=show%3A0&amp;amp;f=image‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This request is made internally as a result of the map loading process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found another interesting thing here. If I go to the GP job using the browser and refresh it, then it starts working even in the web app. This is the way I check the job inside the server.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;https://arcgis.&amp;lt;domain&amp;gt;/arcsrv/rest/services/&amp;lt;GPServiceName&amp;gt;/GPServer/&amp;lt;GPTaskName&amp;gt;/jobs/je13d9121d0ee4270894ebd01f66758a1‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the timeout/clean up rules applicable in this GP scenario, it seems they have no impact in this case. I use JS API 4.6, appreciate any help here.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 06:32:45 GMT</pubDate>
    <dc:creator>UdayaJayawardhana</dc:creator>
    <dc:date>2021-12-12T06:32:45Z</dc:date>
    <item>
      <title>Unable to load result MapImageLayer time to time - JS API 4.6</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-load-result-mapimagelayer-time-to-time/m-p/713051#M66256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I have geoprocessing service which produces a MapImageLayer as the result. I&amp;nbsp;execute the asynchronously using the JavaScript API method&amp;nbsp; "submitJob" method.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #0077aa;"&gt;var&lt;/SPAN&gt; gpTask &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0077aa;"&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;Geoprocessor&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;gpTaskUrl&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;
gpTask&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;outSpatialReference &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5);"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999;"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; wkid&lt;SPAN class="" style="color: #999999;"&gt;:&lt;/SPAN&gt; &lt;SPAN class="" style="color: #990000;"&gt;102100&lt;/SPAN&gt;
&lt;SPAN class="" style="color: #999999;"&gt;}&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;
gpTask&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;submitJob&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;params&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #d74444;"&gt;then&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;(&lt;/SPAN&gt;drawResultData&lt;SPAN class="" style="color: #999999;"&gt;,&lt;/SPAN&gt; errBack&lt;SPAN class="" style="color: #999999;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999;"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It&amp;nbsp;GP task is executed successfully all the time, I see it when I check the server using the job ID. But&amp;nbsp;the resulting map image layer is loaded only in some cases, otherwise I see an error. Specially when the layer is loaded successfully, if I zoom into a specific area there is an increase probability to see the same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;esri&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;views&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;2d&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapImageLayerView2D&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; e 
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"dynamiclayer:image-fetch-error"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&amp;nbsp; message&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;&lt;SPAN&gt;"Unable to load image: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Farcgis" target="_blank"&gt;https://arcgis&lt;/A&gt;&lt;SPAN&gt;.&amp;lt;domain&amp;gt;…at=png32&amp;amp;transparent=true&amp;amp;layers=show%3A0&amp;amp;f=image"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
&amp;nbsp; details&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;…&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The failed request is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;https://arcgis.&amp;lt;domain&amp;gt;/arcsrv/rest/services/&amp;lt;ResultMapServiceName&amp;gt;/MapServer/jobs/je13d9121d0ee4270894ebd01f66758a1/export?bbox=-14177540.562098123%2C1761435.9140478536%2C-4784958.526418162%2C6990951.641205082&amp;amp;bboxSR=102100&amp;amp;imageSR=102100&amp;amp;size=1920%2C1069&amp;amp;dpi=96&amp;amp;format=png32&amp;amp;transparent=true&amp;amp;layers=show%3A0&amp;amp;f=image‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;This request is made internally as a result of the map loading process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found another interesting thing here. If I go to the GP job using the browser and refresh it, then it starts working even in the web app. This is the way I check the job inside the server.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;https://arcgis.&amp;lt;domain&amp;gt;/arcsrv/rest/services/&amp;lt;GPServiceName&amp;gt;/GPServer/&amp;lt;GPTaskName&amp;gt;/jobs/je13d9121d0ee4270894ebd01f66758a1‍‍&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already checked the timeout/clean up rules applicable in this GP scenario, it seems they have no impact in this case. I use JS API 4.6, appreciate any help here.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:32:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/unable-to-load-result-mapimagelayer-time-to-time/m-p/713051#M66256</guid>
      <dc:creator>UdayaJayawardhana</dc:creator>
      <dc:date>2021-12-12T06:32:45Z</dc:date>
    </item>
  </channel>
</rss>

