Require doesn't resolve to success or error

300
0
09-17-2019 01:49 AM
Rupam_RanjanRana
New Contributor II

Hi,

I am using ESRI JS  API version 4.12. I'm calling require for the following classes.

require(["esri/Map",
"esri/Color",
"esri/views/MapView",
"esri/geometry/Point",
"esri/widgets/Search",
"esri/Graphic",
"esri/symbols/PictureMarkerSymbol",
"esri/geometry/Circle",
"esri/geometry/support/jsonUtils",
"esri/symbols/SimpleLineSymbol",
"esri/layers/GraphicsLayer",
"esri/widgets/Popup",
"esri/tasks/Locator",
"esri/core/watchUtils",
"esri/geometry/Extent",
"esri/geometry/geometryEngine",
"esri/symbols/SimpleFillSymbol",
"esri/Basemap"], funtion(deff) {
   //Do something
   resolve();
});

I have registered for require error as follows

require.on('error'function (error) {
   reject();
});

Once require is called it takes few seconds to rersolve. In that time gap the device lost connection, and I get the registered error callback.

Once the network is back I'm retrying the above procedure again by calling require with the array of classes. But this time it doesn't resolve at all, i.e I dont get a success or error callback. 

Is there any way around this behaviour?

0 Kudos
0 Replies