View Full Version : Can't update a production build

12 Apr 2012, 5:38 AM
I'm struggling to update my app once it has been deployed as a production build configured for full updates. The only way I found to refresh my deployed app was to change the application-id in the app.json, which is obviously not good.

Can anyone explain why the following steps fail to refresh a deployed app when using 2.0.1-rc:
create a template app through the sdk: sencha app create mytest /mydir/myapp
change the update configuration in /mydir/myapp/app.json from 'delta' to 'full''
generate the production build: cd /mydir/myapp; sencha app build production
deploy the build/production folder on my server
load the app on Chrome
make a change to the app.js file (add a console.log cmd), regenerate the production build (same as step 3) and redeploy (same as step 4)
reload the app on Chrome (refresh)
the app is not refreshed
I've checked that:
- the app.json file is properly served to the browser (i.e. not cached)
- the app.json includes the updated version id of the app.js file

Initial build/production/app.json:

New build/production/app.json:

- the app.js file is sent with the valid version in comment.


What am I missing?

12 Apr 2012, 6:02 AM
Your app won't show the updated version right away. It should execute onUpdated method in the Ext.application and you should then prompt the user if they want to reload the page and if so then reload the page:


onUpdated: function() {
"Application Update",
"This application has just successfully been updated to the latest version. Reload now?",
function() {

12 Apr 2012, 12:12 PM
Indeed, but for some reason the onUpdated event doesn't kick off and I'm not prompted to reload.

I've been trying with my own app first which includes the onUpdated function but never managed to receive the event until I discovered I cannot even make it work with the app skeleton generated by the sdk itself.

I simply don't understand what I'm doing wrong.

Jacky Nguyen
13 Apr 2012, 1:02 AM
There's a bug with the production microloader that prevents full updates to be performed properly. The fix is in place for 2.0.1 release, which will be coming out shortly.

Meanwhile, you can grab a copy of its latest code from here (http://dl.dropbox.com/u/4494139/sencha-touch-2.0.1/microloader/production.js.zip). Unzip and replace /path/to/you/app/sdk/microloader/production.js with this, then rebuild your app.

13 Apr 2012, 1:36 AM
Thx Jacky! This now works as expected.

Jacky Nguyen
13 Apr 2012, 1:36 AM
Glad to know that you can confirm the fix ;)

13 May 2012, 3:01 AM
Thanks. It works!

19 Jun 2012, 7:22 AM
Old or new Issue?
After updating my Development System to:
SDK Tools -2.0.0 beta3 and Sencha Touch 2 SDK - ..
.. i have the same problem like rando. Once i deploy my App as a production build .. 'onUpdated' does not get triggered.

To be more exact:
Safari under iOS (actual Version )does not trigger 'onUpdated' anymore and i'm not prompted to reload the App.
I checked my "build/production url" in Chrome and it works!

Jacky described in this thread a known bug with the production microloader.
Am i facing the same (old) Issue again here or am i missing something?

20 Jun 2012, 7:18 AM
We have also ran into problems where the app would no longer update itself. We have seen this in multiple projects and have went from production build to package build for now. I'll probably try to go back to production since we have a while before the next release goes to production.

Once the app no longer updates you need to delete all site data associated with it. Deleting cookies alone isn't enough.

22 Jul 2012, 8:00 PM
I have run into the same problem with the same config as Air41. Fails to ever call update in iOS or android, but does in Chrome on desktop (XP). Same URL is used for both.

23 Jul 2012, 9:21 AM
Created a bug report:


Note that I found the auto-update still worked in Chrome on android. Just not the stock browser or Dolphin. Haven't tried Chrome on iOS.

29 Jul 2012, 11:01 AM
Same issue here :(

17 Oct 2012, 5:15 AM
Same issue here... on my PC I get the prompt and new ver... on android I get no prompt and no updated app.

Has anyone got anything new to ad to this?


23 Oct 2012, 10:11 AM
Is this fixed? Had to clear my cache on a app to get the latest version of my app.

4 Feb 2013, 1:52 PM
Hi guys,

I'm using Sencha Touch 2.1.0-gpl and facing exactly the same issues...can anyone confirm this?
And does anyone have a workaround or even a solution for this?

Best regards,

12 Feb 2013, 2:15 AM
i'm using Sencha Touch 2.1.1-gpl, and i have the same problem.

With IOS it works good, and refreshes new version app.
With android nothing happens and always shows old webapp version

Anyone has solved ?

13 Feb 2013, 12:57 AM
Applying Jackie patch from from here (http://dl.dropbox.com/u/4494139/sencha-touch-2.0.1/microloader/production.js.zip). In my app with Sencha Touch 2.1.1 and Sencha command (windows 7 32 bits), the situation is that this patch repairs the problem in Android 4 , but now the problem appears in IOS 6.
I mean with the patch Android (good) IOS (fails), without the patch Android (fails) IOS (good)


King Daddy
19 Mar 2013, 7:43 AM
Same issue, using 2.1.1 and Sencha Cmd v3.0.2.288

Any resolution??

29 Sep 2013, 11:21 PM
Issue present in ST 2.2 as well. I can confirm that Jackie's production.js fixes it on iOS 6 safari and desktop chrome.

27 Feb 2014, 4:10 AM
Jacky's fix was working well till we were on sencha touch 2.2 and sencha cmd 3.1. But after upgrading to sencha touch 2.3 and sencha cmd, with or without Jacky's fix the issue exists. The app.js and other app files in browser local storage just don't update when a new version of the app is pushed. Any ideas?

2 Apr 2014, 2:23 AM
I am just now trying to debug the microloader.

Debugging someone else's code is not as easy as it sounds... even more so as I have not a single grain of experience in appcache, localstorage etc.

10 Oct 2014, 6:34 AM
Disturbing that Sencha are ignoring this problem.

1 Jul 2015, 10:26 AM
I am with ST 2.4 and finds that IE never calls the onUpdated function (Chrome does).Still no fix for this?

15 Mar 2018, 6:49 PM
I am facing the same issue u have fix for v2.4.1 ?