Problem: "Error capturing theme" while building Sencha CMD workspace application for sub-project A (has source files), but sub-project B (no source files) builds fine.
Scenario:
Created new Sencha workspace (CMD 5.1.0.26) and added a new project A.
Project A builds fine (sencha app build -c production)
I add a main view and reference a module contained in a common folder (/project/common/js/).
sencha app watch works fine however sencha app build -c production now fails on Project A.
To sanity check, I generate a new application inside my framework folder, referencing the same ExtJS version (5.1.0.107), let's call it project B, and it builds just fine.
Project A is still failing with this error:
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.json
[INF] Writing content to /MyWorkspace/ProjectA/sass/example/bootstrap.js
[INF] Capturing theme image
[ERR] loading page /MyWorkspace/ProjectA/sass/example/theme.html
== Unhandled Error ==
TypeError: '''undefined''' is not a function (evaluating '''Ext.require([
'''Ext.layout.Context'''
])''')
file:///MyWorkspace/ext/packages/ext-theme-base/sass/example/render.js:7
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR]
[ERR] Total time: 46 seconds
[ERR] The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:306: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:307: The following error occurred while executing this line:
/MyWorkspace/ProjectA/.sencha/app/slice-impl.xml:163: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
Workaround:
I've prevented the error for now by editing sencha.cfg and adding the line:
skip.slice=1
However files in /MyWorkspace/ProjectA/sass/ are the same between the failing Project A and Project B with the exception that the content differs slightly in files that reference the application names, but that is all.
The ExtJS files are few enough that I've done a manual walk through of the differences, with the exception of bootstrap.json which didn't lend itself to anymore than a visual skim.
I'd be most interested if anyone has pointers as to what is likely missing or different between these projects that appears to be causing part of my framework to be missing when it's needed in evaluating line 7 of render.js.
Let me know if you need more supporting information. Thanks!
While building extjs application we have got this error
com.sencha.exceptions.ExProcess: phantomjs process exited with code 1
Solution:
We downloaded the latest version of phantomjs from here and replaced the phantomjs.exe file with cmd
phantomjs.exe "cmd/bin.windows/phantomjs/phantomjs.exe"
It worked for us.
Related
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
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.
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 ...
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.
I am new to sencha cmd as per the documentation I am able to generate the application structure but when i start to build the app using sencha app build, Iam facing the following excpetion.
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: Failed creating background process
[ERR] onDevelopments\ExtJsProjects\Test\build\temp\production\Test\sass"): Creat
eProcess error=2, The system cannot find the file specified
[ERR]
[ERR] Total time: 19 seconds
[ERR] The following error occurred while executing this line:
E:\Softwares & Frameworks\MyApplicationDevelopments\ExtJsProjects\Test\.sencha\a
pp\build-impl.xml:284: The following error occurred while executing this line:
E:\Softwares & Frameworks\MyApplicationDevelopments\ExtJsProjects\Test\.sencha\a
pp\sass-impl.xml:155: The following error occurred while executing this line:
E:\Softwares & Frameworks\MyApplicationDevelopments\ExtJsProjects\Test\.sencha\a
pp\sass-impl.xml:176: com.sencha.exceptions.ExProcess: Failed creating backgroun
d process
I am able to find the file in specified loacation. Kindly help me ..
This is probably because Ruby and Compass are not installed on the system. I used steps described in the following link to fix this issue on my Linux RHEL:
https://www.rosehosting.com/blog/install-ruby-sass-and-compass/
Hope it helps.
i got this error after using sencha generate commande
C:\Users\usr\bin\Sencha\Cmd\3.1.2.342>sencha generate app senchapp "C:\Users\usr\Desktop\senchaapps"
error after creating senchaapps directory :
[INF] generate-workspace:
[INF]
[INF] -after-generate-workspace:
[ERR] Unable to locate 'framework.dir' property from sencha.cfg
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] Non-framework directory
actually, the sencha command should be run from the framework directory (touch-x.x.x folder) rather than the cmd directory. With your terminal, go inside this framework folder and then run this command:
$ sencha generate app nameOfYourApp ../Path/or/your/app
hope this will work.
Maybe the problem could be that you not set the SDK path:
sencha -sdk ../bin/Sencha/touch-2.3.1/ generate app App .
After running sencha generated app Practise '../www/Practise' it showed some errors. Here the error message:
[ERR] BUILD FAILED
[ERR] java.lang.NullPointerException
[ERR]
[ERR] Total time :4 seconds
[ERR] com.sencha.exceptions.BasicException
I dont know if this is the same issue you were having but this is why I got that error:
I tried to generate the app unsuccessfully
This created a directory for my app and put some files in it but the app was incomplete
I fixed the original issue and ran the
command again.
I got the error you were receiving.
This was because the folder in www/yourproject already existed. I deleted this folder and ran the command successfully.
Hope this helps!!
When I follow the steps on the Sencha Docs URL:
http://docs.sencha.com/extjs/4.2.1/#!/guide/theming
I get to the step titled "Generating an Application for Testing the Theme" and I do a sencha app build
I get the following error:
[INF] Capture complete
[INF] [echo] Slicing theme images to C:\codebase\ExtJSTemplate\my-workspace
/build/ThemeDemoApp/production/resources
[INF] Including theme package my-custom-theme for app.theme=my-custom-theme buil
d
[INF] Slicing images...
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Unknown image type 0
[ERR]
[ERR] Total time: 1 minute 2 seconds
[ERR] The following error occurred while executing this line:
C:\codebase\ExtJSTemplate\my-workspace\theme-demo-app\.sencha\app\build-impl.xml
:478: com.sencha.exceptions.BasicException: Unknown image type 0
This is on a Windows XP machine. I did the same exact setup steps on my Macbook Pro and it works with no problems. For some reason on my Windows machine, I am stuck on this error.
I verified that I have the same JAVA, Ruby, and Sencha CMD versions installed on both machines.
Any ideas?
I am using:
java version "1.6.0_11"
Sencha Cmd v3.1.2.342
ruby 1.8.7 (2013-06-27 patchlevel 374) [i386-mingw32]