Hybrid View
-
17 Oct 2012 6:10 AM #1
SenchaCmd 3.0.0.190 issues with Ext.Loader
SenchaCmd 3.0.0.190 issues with Ext.Loader
I have a Sencha Architect 2.1 (SA21) project that I am trying to compile with SenchaCmd.
The structure of the project is as following:
Code:/app /lib /extjs /ux /build /index.html /myapp-all-debug-w-comments.js /myapp-all-debug.js /myapp-all.js /bootstrap.js /app.js /app.html /index.html
Project loads fine with both app.html and index.html.
index.html uses ext-dev.js and has all the necessary directives for compiling (as app.html is reserved by SA21). See below for index.html
The problem is 2 fold.
Problem #1
---------------------------
1) When I generate bootrstrap.js and use it in index.html I get bunch of loading errors. If I comment out bootstrap.js, everything works ok. Here is the command I use to generate bootrstap.js
Th errors I get are a bunch of Ext.Loader issues with following format:Code:sencha compile -classpath=lib/extjs/src,lib/ux,app,app.js ^ meta -loader-paths -base-path . -out bootstrap.js and ^ meta -alternates -append -out bootstrap.js and ^ meta -alias -append -out bootstrap.js and ^ meta -manifest -out manifest.json and ^ meta -filenames -json -out filenames.json
Notice the path!? It does not make sense and I am not sure where it is getting this path.Code:Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MyAppControllerOne.js/model/account/Index.js', please verify that the file exists Uncaught Error: [Ext.Loader] Failed loading 'app/controller/MyAppControllerOne.js/view/account/Index.js', please verify that the file exists
The bootstrap.js file that is generated has correct paths (among many) for all files reported in the error console.
It looks proper to me:
Any idea what I am doing wrong here?Code:Ext.Loader.addClassPathMappings({ ... "MyApp.controller.MyAppControllerOne": "app/controller/MyAppControllerOne.js", ... "MyApp.model.account.Index": "app/model/account/Index.js", ... "MyApp.view.account.Index": "app/view/account/Index.js",
Problem #2
---------------------------
2) After compiling the app and using "all-in-one" generated JS file, I am still getting loader errors. I use following command to generate build files
Code:sencha compile -classpath=lib/extjs/src,lib/ux,app,app.js -ignore=./bootstrap.js ^ concat build/myapp-all-debug-w-comments.js and ^ -options debug:true concat -strip-comments build/myap-all-debug.js and ^ -options debug:false concat -yui build/myap-all.js
The problem is again related to loader. The fact is, loader is supposed to be disabled here (documentation specifies that Ext.Loader is disabled by default)! But according to messages, it is not.
I breifly modified -debug file and added
but some files still fail to load.Code:Ext.Loader.setConfig({ enabled: false });
What I don't understand is why these files are being even looked by by loader when all classes and now in single file.I included "production" index.html that I used
/index.html
Code:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MyApp</title> <link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all.css" /> <link rel="stylesheet" type="text/css" href="resources/css/app.css" /> <!-- <x-compile> --> <!-- <x-bootstrap> --> <script type="text/javascript" src="lib/extjs/ext-dev.js"></script> <script type="text/javascript" src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script type="text/javascript" src="app.js"></script> <!-- </x-compile> --> </head> <body> <div id="loading-mask"></div> <div id="loading"> <div class="loading-indicator"> Loading... </div> </div> </body> </html>
/build/index.html
Code:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>MyApp</title> <link rel="stylesheet" type="text/css" href="../lib/extjs/resources/css/ext-all.css" /> <link rel="stylesheet" type="text/css" href="../resources/css/app.css" /> <script type="text/javascript" src="myapp-all-debug.js"></script> </head> <body> <div id="loading-mask"></div> <div id="loading"> <div class="loading-indicator"> Loading... </div> </div> </body> </html>
-
17 Oct 2012 6:41 AM #2
Hi!
I have been trying to get some attention from Sencha side but no success so far...
Anyway you can find temporary fix for the bug:
http://www.sencha.com/forum/showthre...l=1#post897523
-
17 Oct 2012 7:13 AM #3
The issue you describe in your linked thread is exactly what I am experiencing as well, but your proposed fix (commenting out if statement block on line 392 of ./src/core/src/class/Loader.js) did not work for me...
BTW, I am using ext js 4.1.2a
-
17 Oct 2012 7:26 AM #4
Hi!
In case of your problem #1 you should comment it out in lib/extjs/ext-dev.js because that is the file that default index.html is using.
-
17 Oct 2012 7:31 AM #5
I did that too, and am still getting errors.
[Ext.Loader] Failed loading 'Ext/app/Application.js'
-
17 Oct 2012 7:42 AM #6
I don't use Sencha Architect so I cannot help with that. Instead I have generate app with command sencha app generate which makes little bit different directory structure.
How about if you use command sencha app refresh? That should update the bootstrap.js file.
This Sencha Cmd 3 is more or less a moving target so it is not easy to keep yourself up to date
-
9 Nov 2012 2:01 PM #7
I just tested this with SenchaCmd 3.0 GA (3.0.0.250) and with Ext JS 4.1.3.
- Problem #1 no longer occurs, so that is fixed.
- Problem #2 is still there though....
-
9 Nov 2012 2:41 PM #8
Can you run with the "-debug" switch and include the full log here? (Please include the exact command you run as well).
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote