AnsweredAssumed Answered

Unable to load result MapImageLayer time to time - JS API 4.6

Question asked by udayaj on Feb 6, 2018

I have geoprocessing service which produces a MapImageLayer as the result. I execute the asynchronously using the JavaScript API method  "submitJob" method.


var gpTask = new Geoprocessor(gpTaskUrl);
gpTask.outSpatialReference = {
   wkid: 102100
gpTask.submitJob(params).then(drawResultData, errBack);


It GP task is executed successfully all the time, I see it when I check the server using the job ID. But 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.



[esri.views.2d.layers.MapImageLayerView2D] e 
{ name: "dynamiclayer:image-fetch-error",
  message: "Unable to load image: https://arcgis.<domain>…at=png32&transparent=true&layers=show%3A0&f=image",
  details: {}}


The failed request is:



This request is made internally as a result of the map loading process.


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.



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.