Firebug error : dojo.io.script error

3548
7
03-19-2014 10:38 AM
YvanBérard
Occasional Contributor
Hello guys,

first, thanks for helping.

Here is my problem. In firebug, with the JS API 3.8 I've started receiving some weird error...but my script is still working.

How can I make these errors disappear

Here are the errors from Firebug:


dojo.io.script error     /3.8/ (line 1416)
Error
.cache["esri/request"]/</s/e.load()/3.8/ (ligne 784)
.cache["dojo/_base/xhr"]/</b._ioSetArgs/<()/3.8/ (ligne 186)
c()/3.8/ (ligne 74)
d()/3.8/ (ligne 74)
.cache["dojo/_base/Deferred"]/</b.Deferred/this.callback()/3.8/ (ligne 75)
c()/3.8/ (ligne 74)
d()/3.8/ (ligne 74)
.cache["dojo/_base/Deferred"]/</b.Deferred/this.callback()/3.8/ (ligne 75)
.cache["dojo/io/script"]/</c.get/<()/3.8/ (ligne 1414)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
.cache["dojo/Deferred"]/</a()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</f()/3.8/ (ligne 195)
.cache["dojo/Deferred"]/</q()/3.8/ (ligne 194)
.cache["dojo/Deferred"]/</e/this.resolve()/3.8/ (ligne 196)
u()/3.8/ (ligne 1044)
.cache["dojo/request/script"]/</n/w[g.id]()/3.8/ (ligne 1045)
.cache["dojo/io/script"]/</c._jsonpCallback()/3.8/ (ligne 1418)
()MapSer...allback (ligne 1)
 

Reload the page to get source for: http://js.arcgis.com/3.8/

0 Kudos
7 Replies
JeffPace
MVP Alum
without seeing code its going to be nearly impossible to help, but it looks like maybe you have a callback that has incorrect parameters
0 Kudos
YvanBérard
Occasional Contributor
with some debugging, I've managed to find where the error occur

layer = new esri.layers.ArcGISDynamicMapServiceLayer(url+"/MapServer", {id:oParamUser.config.layer, imageParameters: imgParams});



This line seems fine....I don't know what's wrong...
0 Kudos
JeffPace
MVP Alum
make sure your requires are correct, and make sure {id:oParamUser.config.layer, imageParameters: imgParams}

oParamUser.config.layer and imgParams are not null

and that imgParams is a valid esri/layers/ImageParameters object
0 Kudos
YvanBérard
Occasional Contributor
oParamUser.config.layer and imgParams are not null

and i'm using the Legacy Module Require and it doesn't seem to need a specific "require" except the dojo.require("esri.map");
0 Kudos
YvanBérard
Occasional Contributor
imgParams is declared and modified this way:
var imgParams = new esri.layers.ImageParameters();
imgParams.format = "png32";

oParamUser.config.layer contain an id like "this_is_my_layer"
0 Kudos
JeffPace
MVP Alum
it might be my lack of sleep, but you still need

dojo.require("esri.layers.ArcGISDynamicMapServiceLayer")
dojo.require("esri.layers.ImageParameters");

etc..
0 Kudos
YvanBérard
Occasional Contributor
These are all the require declaration I use:

Note taht the esri.layers.agsdynamic and agstiled are the new "way" to call them in 3.8 with the Legacy Module

dojo.require("esri.map");
 dojo.require("esri.layers.agsdynamic");
 dojo.require("esri.layers.agstiled");
 dojo.require("esri.layers.ImageParameters");
 dojo.require("esri.dijit.Scalebar");
 dojo.require("esri.dijit.Print");
 dojo.require("esri.dijit.Measurement");
 dojo.require("esri.dijit.Legend");
 dojo.require("esri.dijit.OverviewMap");
 dojo.require("esri.toolbars.navigation");
 dojo.require("esri.toolbars.draw");
 dojo.require("esri.tasks.query");
 dojo.require("esri.tasks.find");
 dojo.require("esri.layers.osm");
0 Kudos