4

I'm trying to add the sencha cmd production package into my build process. But the final step when I need to package the app fails with the above error.

What I don't understand is this is a newly built application fresh from the SVN repo. The sencha cmd is the latest as I've just upgraded. So my question is when it states that the app was last modified by a newer version of sencha cmd is it lying to me?

2 things which aren't correct:

  1. The app can't have been modified by a newer version because I've just upgraded the build machine version of sencha cmd to the newest version.
  2. The app has been created by Sencha cmd in the past, but this would have been older than the current one on the build machine.

So I'm left baffled how to resolve this. How does Sencha Cmd 'know' that the app was last modified by a different version anyway? Is there some file within my \app folder which can be fudged so that it thinks the version is the latest? And what has the Sencha Cmd got to do with my application code-base anyway?

jaffa
  • 26,770
  • 50
  • 178
  • 289

4 Answers4

4

You can run the new Cmd version in update mode. I think this is really intended to update the Sencha Touch version, but if you just point it at the current version (2.1) then it will just update itself.

So, for example, run the line below with the latest Cmd:

sencha app upgrade [directory where 2.1 is]

Make sure you take a copy of your app.js first though, as the new version mangles this - just put your old one back after update. Also be aware that it will update your "Touch" directory, so make sure this is backed up as well.

Once the update has been run and you've put the app.js file back, your project should now build with the latest cmd.

Steve Roberts
  • 2,701
  • 1
  • 15
  • 9
  • This wasn't the route I took exactly, but I scaffolded a new app and then merged the changes back into my app. I suspect this is the same thing but more automatic. – jaffa Apr 29 '13 at 16:31
1

If you have created/build your app using Sencha Cmd you will have related information (workspace.cmd.version, app.cmd.version) in following files:

PROJECT_ROOT/touch/cmd/sencha.cfg // This is SDK requirements
PROJECT_ROOT/.sencha/workspace/sencha.cfg // This is workspace build config
PROJECT_ROOT/.sencha/app/sencha.cfg  // This is app build config

You can try fudging Cmd version in these files and let us know if it works :)

ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
  • What is the reason for the version number being stored? Is there a reason that the Sencha Cmd might be tied to an app? I got round it by re-scaffolding the app and then merging by code back in which seemed a little OTT considering all I was doing was updating the cmd. Not sure if your suggestion would work. – jaffa Apr 25 '13 at 14:47
  • not all versions of SDK & Cmd are compatible so once you start using one version of sdk & Cmd its very risky to change. Blame it on poor compatibility consideration from Sencha side because most of their releases are not fully backward compatible – ThinkFloyd Apr 26 '13 at 05:53
  • I just tried updating and I would suggest checking those for the version and changing them. Most were updated but 1 was not. I manually changed and it worked after that. – Kalel Wade Dec 03 '13 at 18:10
  • Hello Guys , I am stuck with a problem while using sencha touch and phoneGap . Please care to help, Would really appreciate it. My question is [HERE](http://stackoverflow.com/questions/22457136/sencha-touch-with-phonegap-using-sencha-cmd-and-phonegap-build-causes-error) . Am I missing something in the build process ? – hussainb Mar 17 '14 at 17:44
1

After doing sencha app upgrade --noframework, make sure to also run "sencha app refresh" to update .sencha metadata.

vLamp
  • 59
  • 1
  • 5
0

This misleading error message refers to a version change of Sencha's Cmd tool on the machine you are using. You can upgrade the Cmd scaffolding with the following command:

sencha app upgrade --noframework

From: 'sencha help app upgrade'

Options
  * --noframework, -no - Upgrade only the Sencha Cmd scaffolding and not the SDK

Definitely back up your app before upgrading. The upgrade command will warn you about conflicts that need to be resolved (such as custom changes to app.js). When you open those files the differences will be noted in a standard diff format:

<<<<<<< Generated
/*
This file is generated and updated by Sencha Cmd. You can edit this file as
needed for your application, but these edits will have to be merged by
Sencha Cmd when it performs code generation tasks such as generating new
models, controllers or views and when running "sencha app upgrade".

Ideally changes to this file would be limited and most work would be done
in other places (such as Controllers). If Sencha Cmd cannot merge your
changes and its generated code, it will produce a "merge conflict" that you
will need to resolve manually.
*/
...
>>>>>>> Custom
...

Resolve the conflicts (remove the >>>>>> X lines and make sure the right lines are included in your file) and you should be all set. The most likely file to have a conflict is app.js - it'd be a good idea to compare your backed up version of that file with your modified version to be confident of the changes.

This seems to mean that all developers working on the application need to run the same Cmd version, so keep that in mind as well.

pherris
  • 17,195
  • 8
  • 42
  • 58