Hi there,We are customizing a webapp generated with the Web App Builder and we are getting the following error in the console whenever the application starts:
Object {url: "config.json", options: a, getHeader: function, xhr: XMLHttpRequest, loaded: 5805…} "
The error happens only in Chrome & Firefox, not in IE 9.
We tracked it down to jimu/ConfigManager.js, line 120 in the loadConfig function:
...
}), lang.hitch(this, function (err) {
console.error(err);
configDef.reject(err);
//}));
}), lang.hitch(this, function (err) {
console.error(err);
configDef.reject(err);
}));
This excerpt corresponds with the end of a xhr.then dojo call. According the dojo docs, the last argument of the then function is a callback which will handle the progress event on browsers that support XHR2. As we can se here the code in ConfigManager.js rejects the deferred on the progress event and writes the request object to the console. I think the progress event shouldn't cause a reject of the Deferred.
XHR2 is supported in Chrome, Firefox & IE 10+, so this error will be shown on this platforms.
To mitigate the error I just changed de above code to the followin excerpt, which fixed the issue.
...
}), lang.hitch(this, function (err) {
console.error(err);
configDef.reject(err);
//}));
}), lang.hitch(this, function (err) {
console.info(err);
}));
Alvaro,
Have you submitted this on the Beta Site as a bug? What versions of Chrome and FireFox are you using?
Robert, yep, it is already posted as a bug on the Beta Site.
Browser versions:
Chrome: 36.0.1985.143
Firefox: 29.0
Alvaro,
Because WAB is still in Beta you will have to wait for the dev team to address this issue. I do not have this issue and have not seen this issue before.
Sure, no problem. For now we can use the workaround.