Select to view content in your preferred language

Error in javascript console, ConfigManager.js & XHR2 (Chrome, FF, IE 10+)

2210
4
08-19-2014 06:12 AM
AlvaroMartin
Deactivated User

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);

            }));

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Alvaro,

   Have you submitted this on the Beta Site as a bug? What versions of Chrome and FireFox are you using?

0 Kudos
AlvaroMartin
Deactivated User

Robert, yep, it is already posted as a bug on the Beta Site.

Browser versions:

     Chrome: 36.0.1985.143

     Firefox: 29.0

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
AlvaroMartin
Deactivated User

Sure, no problem. For now we can use the workaround.

0 Kudos