4

I'm trying to sencha app build with Sencha CMD 6.1.1.76 but I'm getting:

BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR]   at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )

and not much else : /

this project was previously built using 6.0.0.92

enter image description here

but I don't see that specific one on sencha's cdn http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html

I don't think I'm the only one with this issue: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708

Has anyone been able to overcome this issue ?

running sencha app upgrade is of no help, ExtJs 5.0 is using in this project.

Also I get a different exception but the same task originates it (slice-images within slice-impl.xml)

[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR]   at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR] 
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space

I have tried increasing the heap size on some configuration files but no luck.

code4jhon
  • 5,725
  • 9
  • 40
  • 60

2 Answers2

4

So this is the workaround I found in order to be able to:

a) generate the css file on the build process

b) run all the other tasks from the build process.

Ultimately I found that the line causing this issue was:

ext.dir=${workspace.dir}/ext

that was on

.sencha/workspace/sencha.cfg

After removing that line I was able to run sencha app build and generate the proper css file.

And the index and resources on the production folder looked good but I got some issues on the regular index ... wrong references etc so looks like I needed that configuration.

ext.dir=${workspace.dir}/ext

So to overcome this I just backed up my .css file and then set:

#comment out this line
#ext.dir=${workspace.dir}/ext

skip.slice=1

in .sencha/app/sencha.cfg

This is the only way I have found to:

1 build the project

2 update the .css with a different theme.

UPDATE

This is generating an 'extjs trial' water mark on the components so it is not useful ...

code4jhon
  • 5,725
  • 9
  • 40
  • 60
  • I've just spent several hours on debugging why I kept getting the java heap space error... `skip.slice=1` does indeed address the problem, but why do we have to do this? I wasn't getting this error using Ext JS 5.1.1... it only became present in 6.0.2. – incutonez Jul 19 '16 at 16:24
  • I couldn't get to the bottom of it, when I upgraded the project to 6.02 and CMD to the latest I left behind these issues. If it's possible I would recommend that. – code4jhon Jul 20 '16 at 16:50
  • That's the thing, my Sencha Cmd is on the latest (6.1.3 as of writing this)... it was failing on 6.1.2 as well, so I guess I'll have to revisit it at some other time... I've got a thread on the [Sencha forums](https://www.sencha.com/forum/showthread.php?313404), so if I get a response there, I'll update this thread. – incutonez Jul 20 '16 at 16:54
  • I meant to say that I recommend to upgrade your app as well to 6.02, I was getting this issue with ExtJs 5.1.x then I migrated to 6.02 and that fixed completely my issues. – code4jhon Jul 20 '16 at 18:08
  • Oh no, I'm on the latest of everything, including 6.0.2, and I'm still getting the error... like I said originally, it was fine in 5.1.1, but once I moved to 6, that's when it became a problem, so I've got the opposite problem of you, but your answer still helped me :) – incutonez Jul 20 '16 at 21:30
1

What I usually do in cases where I'm using an older version of the framework is install the corresponding Sencha Cmd version.

In this case the Sencha Cmd version 6.0.0.92 is probably a beta version as is seen in the release notes:

Release Notes for Sencha Cmd 6.0.0 Beta

Date: May 22, 2015

Version Number: 6.0.0.154

So this is probably going to be difficult.

Is it possible to run sencha app upgrade --noframework. I know it is a ExtJS 5 application, but this only updates the Sencha Cmd configuration files. You can merge your changes easily afterwards and with some luck it'll work with Sencha Cmd 6.1.x.

If this doesn't work, please run sencha -d app build. This will generate an enormous amount of information, but it might give some hints to the exact cause. You can use sencha -d app build >build.log to create a log file.

Good luck, Sencha Cmd problems can be difficult to debug.

  • what do you mean by "you can merge your changes" ? (I have tried 'sencha app upgrade' without the --noframework flag and it didn't help.) – code4jhon Apr 06 '16 at 18:00
  • The changes you make to your config files are merged with the new template when running `sencha app upgrade`. Have you installed the compass extension when you installed the new Sencha Cmd? Not installing this could give some problems with CSS compilation. – Niels Heisterkamp Apr 06 '16 at 18:05
  • Yes I installed Compass. – code4jhon Apr 06 '16 at 18:21
  • Could you provide a build log `sencha -d app build >build.log`? – Niels Heisterkamp Apr 06 '16 at 20:07
  • sure https://www.dropbox.com/s/lf0ovkp3oevqztu/build.log?dl=0 I didn't see any exceptions on the log but I just ran again 'sencha app build' and the issue persist. Not sure why but slice-images fails :( – code4jhon Apr 06 '16 at 20:44
  • I don't see any errors in the output, what's the problem now? – Niels Heisterkamp Apr 06 '16 at 20:53
  • the problem is the same event though sencha -d app build >build.log does not show any exceptions if I run sencha app build I do get the exception. – code4jhon Apr 06 '16 at 21:34