PDA

View Full Version : [INFOREQ] [4.1.1] ExtJS is complaining about missing files that aren't missing



BillHubbard
13 Feb 2013, 3:46 PM
I occasionally get an error in the console:

Error: The following classes are not declared even if their files have been loaded: ''. Please check the source code of their corresponding files for possible typos: '

When I am able to catch the condition (which is intermittent), I see the following code in ext-dev.js for an onFileLoaded method:



if (missingClasses.length < 1) {
return;
}

missingClasses = Ext.Array.filter(Ext.Array.unique(missingClasses), function(item) {
return !requiresMap.hasOwnProperty(item);
}, Loader);

// HERE!

for (i = 0,ln = missingClasses.length; i < ln; i++) {
missingPaths.push(classNameToFilePathMap[missingClasses[i]]);
}

throw new Error("The following classes are not declared even if their files have been " +
"loaded: '" + missingClasses.join("', '") + "'. Please check the source code of their " +
"corresponding files for possible typos: '" + missingPaths.join("', '"));
}

At the point marked "HERE!", missingClasses.length is zero, whereas prior to the assignment immediately above it, it was 2.
Apparently, there needs to be a check in here to return if missingClasses.length is zero, just as there is before missingClasses got redefined.

mitchellsimoens
13 Feb 2013, 8:30 PM
Is there a way I can reproduce this?

BillHubbard
14 Feb 2013, 10:29 AM
I wish I knew.

BillHubbard
17 Apr 2013, 5:11 PM
It may be related to http://www.sencha.com/forum/showthread.php?232229-ExtJS-4.1.1-Ext.require-does-not-call-callback-if-provided