PDA

View Full Version : Sencha App Build Production :: Touch = Application Cache Error event: Manifest fetch



YomeKitsuma
5 Oct 2012, 7:08 AM
Hi,

We try to build the sample given in the Documentation : Ext.chart.series.Line

with



sencha app build -e production

(we also test using testing ;-) )

Firstly, at the first build we got lot of "missing" sources, so we add in the app.js the required :



Creating Application Cache with manifest http://dev.tag-all.com:28880/test/production/cache.appcache
Application Cache Checking event
Application Cache Error event: Manifest fetch failed (404) http://dev.tag-all.com:28880/test/production/cache.appcache
Failed to load resource: the server responded with a status of 404 (Not Found) http://dev.tag-all.com:28880/test/production/event/publisher/Dom.js?_dc=1349449239735



requires: ['Ext.*']


After all goes well....

We redo a build removing this "all requires".

Now we got this error :



Creating Application Cache with manifest http://dev.tag-all.com:28880/test/production/cache.appcache
Application Cache Checking event
Application Cache Error event: Manifest fetch failed (404) http://dev.tag-all.com:28880/test/production/cache.appcache


GET http://dev.tag-all.com:28880/test/production/event/publisher/Dom.js?_dc=1349449413346 404 (Not Found) Dom.js:1
​Malformed delta content received for http://dev.tag-all.com:28880/test/production/app.js :28880/test/production/:56



:-?

N.B : locally (using own server - i.e localhost), here the error :



Failed to load resource: the server responded with a status of 404 (Not Found) http://192.168.1.40/Test/test/event/Dispatcher.js?_dc=1349449984496[/URL]
Failed to load resource: the server responded with a status of 404 (Not Found) http://192.168.1.40/Test/test/event/publisher/Dom.js?_dc=1349449984501[URL="http://192.168.1.40/Test/test/event/publisher/Dom.js?_dc=1349449984501"] (http://192.168.1.40/Test/test/event/Dispatcher.js?_dc=1349449984496)
Uncaught Error: [Ext.Loader] Failed loading './event/Dispatcher.js', please verify that the file existssencha-touch.js:8319
Uncaught Error: [Ext.Loader] Failed loading './event/publisher/Dom.js', please verify that the file exists sencha-touch.js:8319

(http://192.168.1.40/Library/touch/sencha-touch.js)

dongryphon
5 Oct 2012, 9:59 PM
Please specify the framework and version (e.g., "Sencha Touch 2.1 RC1") as well as the Cmd version you are using (e.g., "3.0.0.190").


Also, you can try the debug switch "sencha -debug app build production" and see if that gives you any insight.

YomeKitsuma
8 Oct 2012, 5:13 AM
Hi Dongryphon


framework = Sencha Touch 2.1.0-RC1
Cmd version = (when post this issue => 3.0.0.188)


For the first error :


Application Cache Error event: Manifest fetch failed (404)

We added the ".appcache" in our web.config file onto the server.

Actually, their is still the error saying :





Malformed delta content received for http://dev.tag-all.com:28880/test/production/app.js :28880/test/production/:56

G:28880/test/production/:56
(anonymous function):28880/test/production/:59
h.onreadystatechange:28880/test/production/:54




GET http://dev.tag-all.com:28880/test/production/event/publisher/Dom.js?_dc=1349701450670 404 (Not Found)



As you can see we also have a 404 error, asking for the Event.publisherDom.


One other thing we realized : if we clean up all the data in the LocalStorage of our testing browser (Chrome) everything works well - at the first time

but getting (at second update - i.e ftp transfert) this error :



Malformed delta content received for http://dev.tag-all.com:28880/test/production/app.js


again if we clean up the localstorage from the Console of Chrome, everything (re)goes fine...


We also facing an "localhost" error, which try to load (i.e start application on the dev folder onto our webserver - localy - apache 2 on mac osx)


event/Dispatcher.js

event/publisher/Dom.js

This error looks like the framework try to load classes as if they were from the application (not in Touch framework, but thoses classes are from Touch... clear ?!)


nb : i'll open a new BUG, since we start all from begining and a simple application (only with basic contents from sencha) IS BUGGED

ingo.hefti
8 Oct 2012, 9:40 AM
have you set the path at the beginning of your app.js?


//<debug>
Ext.Loader.setPath({
'Ext': 'touch/src'
});
//</debug>

YomeKitsuma
8 Oct 2012, 10:31 PM
Hi ingo.hefti

Not =D

But if I well understood the "meaning" of this, it just in development phasis, not in production ?!

I'll try it, and give you my feed back

Thank

ingo.hefti
8 Oct 2012, 10:53 PM
Stupid me - of course, you are right. Apologize for interfering...

YomeKitsuma
8 Oct 2012, 11:09 PM
not at all ingo !

It's good to have interest there !

I'll continu to investigate...

YomeKitsuma
9 Oct 2012, 12:05 AM
I've just "redo" the whole process :

1) generate a new application using "sencha generate app" (with good parameters)



Macintosh-00224130e982-3:touch tag-all$ sencha generate app myTouch ~/Workspace/myTouch
Sencha Cmd v3.0.0.190
[INFO ] init-properties:
[INFO ] init-sencha-command:
[INFO ] init:
[INFO ] -before-generate-app:
[INFO ] generate-app-impl:
[INFO ] [mkdir] Created dir: /Users/tag-all/Workspace/myTouch/app/model
[INFO ] [mkdir] Created dir: /Users/tag-all/Workspace/myTouch/app/controller
[INFO ] [mkdir] Created dir: /Users/tag-all/Workspace/myTouch/app/store
[INFO ] [mkdir] Created dir: /Users/tag-all/Workspace/myTouch/app/profile
[INFO ] Generating new packager.json file using native packager
[INFO ] copy-sdk:
[INFO ] [copy] Copying 1 file to /Users/tag-all/Workspace/myTouch/resources/css
[INFO ] -after-generate-app:
[INFO ] generate-app:


2) i've built the application for production using "sencha ant build"



Macintosh-00224130e982-3:myTouch tag-all$ sencha ant build
Sencha Cmd v3.0.0.190
[INFO ] -before-init-local:
[INFO ] -init-local:
[INFO ] -after-init-local:
[INFO ] init-local:
[INFO ] find-cmd:
[INFO ] -before-init:
[INFO ] -init:
[INFO ] -after-init:
[INFO ] init:
[INFO ] -before-build:
[INFO ] page:
[INFO ] -before-page:
[INFO ] -page:
[INFO ] init-properties:
[INFO ] init-sencha-command:
[INFO ] init:
[INFO ] -before-app-build:
[INFO ] app-build-impl:
[INFO ] building application
[INFO ] Deploying your application to /Users/tag-all/Workspace/build/myTouch/production
[INFO ] Copied app.js
[INFO ] Copied resources/css/app.css
[INFO ] Copied /Users/tag-all/Workspace/myTouch/resources/icons
[INFO ] Copied /Users/tag-all/Workspace/myTouch/resources/startup
[INFO ] Resolving your application dependencies (file:////Users/tag-all/Workspace/myTouch/index.html)
[INFO ] Compiling app.js and dependencies
[INFO ] Processing classPath entry : /Users/tag-all/Workspace/myTouch/sencha-compile-temp-dir
[INFO ] Processing classPath entry : /Users/tag-all/Workspace/Library/touch/src
[INFO ] Processing classPath entry : /Users/tag-all/Workspace/Library/tall/src
[INFO ] Processing classPath entry : /Users/tag-all/Workspace/myTouch/app.js
[INFO ] Processing classPath entry : /Users/tag-all/Workspace/myTouch/app
[WARN ] [ [1000] : Yui Compressor Warning <> Trailing comma is not legal in an ECMA-262 object initializer => }, function() { ] :: ( /Users/tag-all/Workspace/Library/touch/src/app/Controller.js => 625 : 1 )
[INFO ] Processing class inheritance graph
[INFO ] Processing instantiation refereces to classes and aliases
[WARN ] [ [1000] : Yui Compressor Warning <> Trailing comma is not legal in an ECMA-262 object initializer => }, function() { ] :: ( /Users/tag-all/Workspace/Library/touch/src/app/Controller.js => 625 : 1 )
[INFO ] Processing source dependencies
[INFO ] Concatenating output to file /Users/tag-all/Workspace/build/myTouch/production/app.js
[INFO ] Completed compilation.
[INFO ] Processed remote file ../Library/touch/sencha-touch.js
[INFO ] Processed local file app.js
[INFO ] Minified app.js
[INFO ] Minified resources/css/app.css
[INFO ] Generated app.json
[INFO ] Embedded microloader into index.html
[INFO ] Generating appcache
[INFO ] Generating checksum for appCache item: index.html
[INFO ] -after-app-build:
[INFO ] app-build:
[INFO ] -after-page:
[INFO ] -build:
[INFO ] -after-build:
[INFO ] build:


3) i've uploaded to my test server, here the result in the chrome console :

- first start of the application :


Creating Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache Downloading event
Application Cache Progress event (0 of 1) http://dev.tag-all.com:28880/myTouch/index.html
Application Cache Progress event (1 of 1)
Application Cache Cached event
Failed to load resource: the server responded with a status of 404 (Not Found) http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349768473714






- Second load (after refresh) :


Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event


GET http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349769662683 404 (Not Found)



- and after updating (juste change the title in the Main.js)



Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event


GET http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349771343152 404 (Not Found) Dom.js:1 (http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349771343152)



Malformed delta content received for http://dev.tag-all.com:28880/myTouch/app.js :28880/myTouch/:56 (http://dev.tag-all.com:28880/myTouch/)



Any idea ?
(actually i've to go back to sencha tool v2 to build my webapplication... :s

YomeKitsuma
9 Oct 2012, 12:58 AM
does this post is related to this issue ?!


http://www.sencha.com/forum/showthread.php?244827-Production-Build-Malformed-delta-content-error


(http://www.sencha.com/forum/showthread.php?244827-Production-Build-Malformed-delta-content-error)i've removed the last comma in "deltas", and the "malformed error" gone away,

Before


["/*907435fdf5c2d9381fed6fb8e69a750d93fecc8c",42,295618," 2",295660,1031,]


After


["/*907435fdf5c2d9381fed6fb8e69a750d93fecc8c",42,295618," 2",295660,1031]


But I keep having the error :



Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event


GET http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349773232271 404 (Not Found) Dom.js:1 (http://dev.tag-all.com:28880/myTouch/event/publisher/Dom.js?_dc=1349773232271)

Ext.apply.injectScriptElement
Ext.apply.loadScriptFile
Ext.apply.require
Ext.Function.alias
Ext.apply.factoryConfig
b
Ext.apply.factoryConfig
b
Ext.apply.factoryConfig
(anonymous function)
Ext.apply.triggerReady
Ext.apply.onDocumentReady
Ext.apply.setup
Ext.apply.application
(anonymous function)
c:28880/myTouch/:57 (http://dev.tag-all.com:28880/myTouch/)
b:28880/myTouch/:57 (http://dev.tag-all.com:28880/myTouch/)
(anonymous function):28880/myTouch/:60 (http://dev.tag-all.com:28880/myTouch/)
w:28880/myTouch/:60 (http://dev.tag-all.com:28880/myTouch/)
(anonymous function):28880/myTouch/:61 (http://dev.tag-all.com:28880/myTouch/)

YomeKitsuma
9 Oct 2012, 1:09 AM
So more informations/investigate :

I've just adding "Ext.event.publisher.Dom" as require in the app.js,

I've cleaning up the new "deltas" (removing the last coma)

and now i've got a new "error"



Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event


GET http://dev.tag-all.com:28880/myTouch/event/publisher/TouchGesture.js?_dc=1349773652329 404 (Not Found)



Now, this is the "Ext.event.publisher.TouchGesture" which is missing !!!

~o)


So, adding as require "Ext.event.*", clean up all the deltas (and fix the new brand one), gives :



Document was loaded from Application Cache with manifest http://dev.tag-all.com:28880/myTouch/cache.appcache
Application Cache Checking event
Application Cache NoUpdate event

GET http://dev.tag-all.com:28880/myTouch/chart/series/ItemPublisher.js?_dc=1349774214743 404 (Not Found) ItemPublisher.js:1 (http://dev.tag-all.com:28880/myTouch/chart/series/ItemPublisher.js?_dc=1349774214743)




OK OK...but this is the "basic" application skelton done by "sencha generate app", why there is a "chart.series.itempublisher" here ??!!!!!



WORKARROUND ==>

Just add :



Ext.application({
name: 'myTouch',


requires: [
'Ext.MessageBox',
'Ext.*'
],


views: ['Main'],


And now everything works fine (also change and fix the extra Deltas "coma" !!)

But now i've got a BIG HUGE application : 879ko for app.js (with no Ext.* => 297ko)


And....

Unfortunately, here is what i've got when just trying to start my application from my "dev folder"



[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.component' of: 'Ext.dataview.DataView' with: 'Ext.Component'. Be sure it's intentional. sencha-touch.js:600 (http://localhost:8888/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.mask' of: 'Ext.LoadMask' with: 'Ext.Mask'. Be sure it's intentional. sencha-touch.js:600 (http://localhost:8888/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.container' of: 'Ext.dataview.DataView' with: 'Ext.Container'. Be sure it's intentional. sencha-touch.js:600 (http://localhost:8888/Library/touch/sencha-touch.js)
[INFO] [Ext.ClassManager] Overriding existing alias: 'widget.viewport' of: 'Ext.viewport.Android' with: 'Ext.viewport.Default'. Be sure it's intentional. sencha-touch.js:600 (http://localhost:8888/Library/touch/sencha-touch.js)
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/Library/touch/src/ux/auth/model/Session.js?_dc=1349778611975
Uncaught Error: [Ext.Loader] Failed loading '../Library/touch/src/ux/auth/model/Session.js', please verify that the file exists sencha-touch.js:8319 (http://localhost:8888/Library/touch/sencha-touch.js)
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/Library/touch/src/device/Purchases/Purchase.js?_dc=1349778611982
Uncaught Error: [Ext.Loader] Failed loading '../Library/touch/src/device/Purchases/Purchase.js', please verify that the file exists sencha-touch.js:8319 (http://localhost:8888/Library/touch/sencha-touch.js)
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/Library/touch/src/device/Purchases/Product.js?_dc=1349778611995
Uncaught Error: [Ext.Loader] Failed loading '../Library/touch/src/device/Purchases/Product.js', please verify that the file exists sencha-touch.js:8319 (http://localhost:8888/Library/touch/sencha-touch.js)
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8888/Library/touch/src/draw/engine/SvgContext/Gradient.js?_dc=1349778612015
Uncaught Error: [Ext.Loader] Failed loading '../Library/touch/src/draw/engine/SvgContext/Gradient.js', please verify that the file exists sencha-touch.js:8319 (http://localhost:8888/Library/touch/sencha-touch.js)


Finally (???) removing the 'Ext.*',



requires: [
'Ext.MessageBox'/*,
'Ext.*'*/
],


in dev all goes fine...

intellix
25 Oct 2012, 6:45 AM
Versions: 2.1.0RC1 and Sencha Command 3.0.0.190

I'm getting some crazy funk as well.

Got all the comma stuff everyone is talking about.
The hash key in all of my files is: 68cba197012d982c95ed7198730181ed37132f25 except for one where it was misssing the last 5 like: 68cba197012d982c95ed7198730181ed37132f2
Got 16 delta files for my app.js, not sure if that's normal or not as this is my first time doing this.

Inside my index.html I was getting a console error where one of the lines was broken like so:



?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=
!0


All that bottom 'line' is pushed across 9 lines rather than 1.

Thanks, Dom

dongryphon
25 Oct 2012, 10:41 PM
Can't say this looks very familiar, but have you tried the latest build?

http://www.sencha.com/forum/showthread.php?247193-Sencha-Cmd-V3-Beta-3.0.0.230-Now-Available

dongryphon
25 Oct 2012, 10:44 PM
Sorry for that last post there - I just saw the thread above ... which was page 2. Still would be good to check the current version and I will see if we can reproduce with the steps from posts on page 1. ;)

intellix
26 Oct 2012, 12:28 AM
I'm getting an infinite loop of this:



// sencha app build production
Sencha Cmd v3.0.0.230
[INFO ] init-properties:
[INFO ] init-sencha-command:
[INFO ] init:
[INFO ] -before-app-build:
[INFO ] app-build-impl:
[INFO ] production:
[INFO ] -before-init-local:
[INFO ] -init-local:
[INFO ] -after-init-local:
[INFO ] init-local:
[INFO ] find-cmd:
[INFO ] -before-init:
[INFO ] -init:
[INFO ] -after-init:
[INFO ] init:
[INFO ] -before-build:
[INFO ] page:
[INFO ] -before-page:
[INFO ] -page:


Do I need to upgrade something?

Edit: Created a new app and copied in the changed files from inside /.sencha

Everything seemed to work straight away BUT I still get the microloader on multiple lines like so:



?(n.removeItem(j),l=!0,f--):e++;l&&t(a,b)}}}function u(a){try{return n.getItem(a)}catch(d){return null}}function M(){H||(H=!0

dongryphon
26 Oct 2012, 1:32 AM
I'm getting an infinite loop of this:


That is a different bug (see http://www.sencha.com/forum/showthread.php?246265) and will be fixed ASAP. Sorry about that.

dongryphon
26 Oct 2012, 9:26 AM
I'm getting an infinite loop of this:


This is looking less like a bug and more like an issue created by how folks are upgrading their app. Please see the other thread for the latest on that issue.

Nigel Severing
19 Nov 2012, 4:16 AM
Is this issue solved yet?

I'm also getting an 404 error:
Application Cache Error event: Manifest fetch failed (404)

Nigel Severing
19 Nov 2012, 4:22 AM
Solved for windows server using IIS:
Add mime type: text/cache-manifest, extension: .appcache