Cannot registerToken second times in ArcGIS JS 3.28

515
1
04-22-2019 03:33 AM
SupakornAngaumnuaysiri1
New Contributor II

Dear everyone

   I found the problem in ArcGIS JS API V.3.28. I need to register tokens of 2 servers when I run page, found error message in init.js. But I dont found this error in ArcGIS JS API V 4.x.

   Anybody help me or esri support please reply this issue. how do i solve?

Thank.

Supakorn

0 Kudos
1 Reply
SupakornAngaumnuaysiri1
New Contributor II

I already found cause and solution. There is an incorrect config in property "corsEnabledServers" of esriConfig.default.io. I must pop error config out of array.

esriId.registerToken({
server: "https://mapdynamic.nostramap.com/arcgis/rest/services",
token: "<token>"
});
console.log("bb 2", esriConfig.defaults.io.corsEnabledServers);
esriConfig.defaults.io.corsEnabledServers.pop();

#arcgis-js-3.28‌ , #developer subscription

0 Kudos