Question

I have a single page ExtJS application that was generated with Sencha Command v4.0.2.67. I am trying to build using Sencha Command v4.0.2.67 with the following command(s).

$ sencha app refresh 
$ sencha app build 

When the build moves to the step -compile-sass Sencha Cmd v4.0.2.67 fails:

Failed creating background process

Sencha Cmd v4.0.2.67 output:

[INF] -compile-sass:
[INF] writing sass content to /build/DevOps/production/DevOps-all.scss
[INF] appending sass content to /build/DevOps/production/DevOps-all.scss
[INF] appending sass content to /build/DevOps/production/DevOps-all.scss
[INF] executing compass using system installed ruby runtime
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: Failed creating background process
[ERR]
[ERR] Total time: 16 seconds
[ERR] The following error occurred while executing this line:
.sencha/app/build-impl.xml:273: The following error occurred while executing this line:
.sencha/app/sass-impl.xml:127: The following error occurred while executing this line:
.sencha/app/sass-impl.xml:138: com.sencha.exceptions.ExProcess: Failed creating background process

Environment:

  • Sencha Cmd v4.0.2.67
  • ExtJS 4.2.1
  • Ruby 1.9.3 (using RVM)
  • Sass 3.2.14 (Media Mark)
  • Compass 0.12.3 (Alnilam)

Project:

The initial project was generated with Sencha Cmd v3.1.2.342, later Sencha Cmd v4.0.2.67 was introduced. We went through the documented upgrade process to upgrade Sencha Cmd:

$ sencha upgrade --check
$ sencha upgrade

Then to bring up a new version of Sencha Cmd with our application produced by a previous version, we ran this command from inside our application directory:

$ sencha app upgrade --noframework

There were some changes, that Sencha calls merges. Mostly in the app.js and the .sencha/ folder. The output is detailed enough about how to resolve them. We did just that and everything ran fine in the application after we resolved the merges, this is where we found the build did not work. The main issue which was with SASS and COMPASS from the upgrade.

You can run the specific task by itself, in this case the sass step, with sencha -d ant sass for better error output without all the other steps:

$ sencha -d ant sass

This is where we are seeing the build error Failed creating background process.

Was it helpful?

Solution

The source of the problem is the build.properties file and changes to properties in the file between Sencha Cmd v3.1.2.342 and v4.0.2.67. The file is located in the project root:

.sencha/app/build.properties

By clearing out all of the custom properties in build.properties we were able to run the refresh and build commands successfully:

$ sencha app refresh 
$ sencha app build 

The source of the problem was our project was generated by Sencha Cmd v3.1.2.342. When we upgraded to Sencha Cmd v4.0.2.67 and the project went through the upgrade process. The format of the file and the properties changed. The legacy properties used by Sencha Cmd v3.1.2.342, and some paths, no longer existed with Sencha Cmd v4.0.2.67. The merge process during the upgrade does its best to keep your legacy properties; even if they break things. Breaking the build.

I would recommend creating a sample project with Sencha Cmd v4.0.2.67, and perform a diff of the sample project build.properties file against the project where the build is broken. We had about 70 lines of custom properties for output directories, SASS and CSS paths that were no longer valid.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top