Automated Testing with Project Piper - sap

We are currently in the process of setting up a CI/CD pipeline for our SCP CF environment based on Project Piper. After a lot of trial & error, we have made significant process, however we are still not able to run our karma tests.
We understood that we need to use the karma-webdriver-launcher, however we are not able to start/connect to Chrome in the sidecar container.
Relevant logs:
[Pipeline] sh
+ cd ./nodejs
+ npm test
> nodejs#1.0.0 test /var/jenkins_home/workspace/CICD_Multibranch_master/nodejs
> karma start ./karma.conf.js
10 07 2019 14:42:53.897:DEBUG [config]: Loading config /var/jenkins_home/workspace/CICD_Multibranch_master/nodejs/karma.conf.js
10 07 2019 14:42:53.906:DEBUG [karma-server]: Final config [{"LOG_DISABLE":"1","LOG_ERROR":"2","LOG_WARN":"3","LOG_INFO":"4","LOG_DEBUG":"5","frameworks":"6","protocol":"7","port":9876,"listenAddress":"8","hostname":"9","httpsServerConfig":"10","basePath":"11","files":"12","browserConsoleLogOptions":"13","customContextFile":null,"customDebugFile":null,"customClientContextFile":null,"exclude":"14","logLevel":"5","colors":false,"autoWatch":false,"autoWatchBatchDelay":250,"restartOnFileChange":false,"usePolling":true,"reporters":"15","singleRun":true,"browsers":"16","captureTimeout":60000,"proxies":"17","proxyValidateSSL":true,"preprocessors":"18","urlRoot":"19","reportSlowerThan":0,"loggers":"20","transports":"21","forceJSONP":false,"plugins":"22","client":"23","defaultClient":"23","browserDisconnectTimeout":2000,"browserDisconnectTolerance":0,"browserNoActivityTimeout":30000,"processKillTimeout":2000,"concurrency":null,"failOnEmptyTestSuite":true,"retryLimit":2,"detached":false,"crossOriginAttribute":true,"browserSocketTimeout":20000,"cmd":"24","configFile":"25","customLaunchers":"26","junitReporter":"27"},"OFF","ERROR","WARN","INFO","DEBUG",["28"],"http:","0.0.0.0","localhost",{},"/var/jenkins_home/workspace/CICD_Multibranch_master/nodejs",["29","30"],{"level":"31","format":"32","terminal":true},["25"],["33"],["34"],{},{},"/",["35"],["36","37"],["38","39","40","41","42"],{"args":"43","useIframe":true,"runInParent":false,"captureConsole":true,"clearContext":true},"start","/var/jenkins_home/workspace/CICD_Multibranch_master/nodejs/karma.conf.js",{"chromeSel":"44"},{"outputFile":"45","suite":"46"},"qunit",{"pattern":"47","served":true,"included":true,"watched":true,"nocache":false,"weight":"48"},{"pattern":"49","served":true,"included":true,"watched":true,"nocache":false,"weight":"50"},"debug","%b %T: %m","junit","chromeSel",{"type":"51","layout":"52"},"polling","websocket","karma-qunit","karma-junit-reporter","karma-chrome-launcher","karma-webdriver-launcher",{"launcher:chromeSel":"53"},[],{"base":"54","config":"55","browserName":"56"},"test-results-karma.xml","","/var/jenkins_home/workspace/CICD_Multibranch_master/nodejs/server.js",[1,0,0,0,0,0],"/var/jenkins_home/workspace/CICD_Multibranch_master/nodejs/tests/sampleTest.spec.js",[1,0,0,0,0,0],"console",{"type":"57","pattern":"58"},["59",null],"WebDriver",{"hostname":"60","port":4444},"chrome","pattern","%d{DATE}:%p [%c]: %m","factory","selenium"]
10 07 2019 14:42:53.907:DEBUG [plugin]: Loading plugin karma-qunit.
10 07 2019 14:42:53.908:DEBUG [plugin]: Loading plugin karma-junit-reporter.
10 07 2019 14:42:53.923:DEBUG [plugin]: Loading plugin karma-chrome-launcher.
10 07 2019 14:42:53.931:DEBUG [plugin]: Loading plugin karma-webdriver-launcher.
10 07 2019 14:42:54.179:DEBUG [plugin]: Loading inlined plugin (defining launcher:chromeSel).
10 07 2019 14:42:54.193:DEBUG [web-server]: Instantiating middleware
10 07 2019 14:42:54.194:DEBUG [reporter]: Trying to load reporter: junit
10 07 2019 14:42:54.195:DEBUG [reporter]: Trying to load color-version of reporter: junit (junit_color)
10 07 2019 14:42:54.195:DEBUG [reporter]: Couldn't load color-version.
10 07 2019 14:42:54.224:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/
10 07 2019 14:42:54.225:INFO [launcher]: Launching browsers chromeSel with concurrency unlimited
10 07 2019 14:42:54.231:INFO [launcher]: Starting browser chrome via Remote WebDriver
10 07 2019 14:42:54.232:DEBUG [launcher]: null -> BEING_CAPTURED
10 07 2019 14:42:54.232:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-89562642
10 07 2019 14:42:54.235:DEBUG [WebDriver]: WebDriver config: {"hostname":"selenium","port":4444}
10 07 2019 14:42:54.235:DEBUG [WebDriver]: Browser capabilities: {"platform":"ANY","testName":"Karma test","tags":[],"version":"","base":"WebDriver","browserName":"chrome"}
10 07 2019 14:43:54.281:WARN [launcher]: chrome via Remote WebDriver have not captured in 60000 ms, killing.
10 07 2019 14:43:54.286:DEBUG [launcher]: BEING_CAPTURED -> BEING_KILLED
10 07 2019 14:43:54.355:INFO [WebDriver]: Killed Karma test.
10 07 2019 14:43:54.355:DEBUG [launcher]: Process chrome via Remote WebDriver exited with code -1 and signal timeout
10 07 2019 14:43:54.356:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-89562642
10 07 2019 14:43:54.358:INFO [launcher]: Trying to start chrome via Remote WebDriver again (1/2).
karma.conf.js:
// Karma configuration
module.exports = function(config) {
var webdriverConfig = {
hostname: 'selenium',
port: 4444
}
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['qunit'],
plugins: ['karma-qunit','karma-junit-reporter','karma-chrome-launcher', 'karma-webdriver-launcher'],
// list of files / patterns to load in the browser
files: [
'server.js',
'tests/sampleTest.spec.js'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['junit'],
// web server port
//port: 9876,
//hostname: localhost,
// enable / disable colors in the output (reporters and logs)
colors: false,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
customLaunchers: {
'chromeSel': {
base: 'WebDriver',
config: webdriverConfig,
browserName: 'chrome'
}
},
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['chromeSel'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
junitReporter: {
outputFile: 'test-results-karma.xml',
suite: ''
}
});
};
Jenkinsfile:
#!groovy
#Library('piper-lib-os') _
node(){
stage('Prepare') {
deleteDir()
checkout scm
setupCommonPipelineEnvironment
}
stage('Build') {
karmaExecuteTests script: this, modules: ['./nodejs'],
installCommand: "npm install karma karma-qunit karma-junit-reporter karma-chrome-launcher qunit karma-webdriver-launcher",
runCommand: 'npm test'
mtaBuild script:this, buildTarget: 'CF', applicationName: 'appLibrary'
}
stage('Deploy to QA') {
testsPublishResults script: this, junit: [updateResults: true, archive: true]
cloudFoundryDeploy(
script: this,
cloudFoundry: [apiEndpoint: 'https://api.cf.eu10.hana.ondemand.com', manifest: 'manifest.yml', org:'xxx', space:'xxx', credentialsId: 'xxx'],
deployTool: 'mtaDeployPlugin'
)
}
}
Thanks a lot,
Nico

To run the karmaExecuteTests step on your Jenkins, you need a Docker deamon installed. I assume this is the case.
In the Docker sidecar pattern the containers can talk to each other using their container names (karma & selenium). So for the browser (config.customLaunchers.chromeSel.config.hostname) you set the hostname correctly to selenium but you also need to set config.hostname to karma.

Related

"ChromeHeadless have not captured in 60000 ms, killing." occuring only in Gitlab hosted CI/CD pipeline

When running a CI/CD pipeline on Gitlab, my Karma tests are timing out with the error:
ℹ 「wdm」: Compiled successfully.
05 08 2019 22:25:31.483:INFO [karma-server]: Karma v4.2.0 server started at http://0.0.0.0:9222/
05 08 2019 22:25:31.485:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency 1
05 08 2019 22:25:31.488:INFO [launcher]: Starting browser ChromeHeadless
05 08 2019 22:26:31.506:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing.
05 08 2019 22:26:31.529:INFO [launcher]: Trying to start ChromeHeadless again (1/2).
05 08 2019 22:27:31.580:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing.
05 08 2019 22:27:31.600:INFO [launcher]: Trying to start ChromeHeadless again (2/2).
05 08 2019 22:28:31.659:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing.
05 08 2019 22:28:31.689:ERROR [launcher]: ChromeHeadless failed 2 times (timeout). Giving up.
npm ERR! Test failed. See above for more details.
This problem does not occur when running tests locally, and it does not occur when running the tests using the same Docker image with Gitlab Runner locally.
I feel like I have tried every possible configuration with karma.conf.js. I have Googled this issue relentlessly and have tried every suggestion from proxy servers, to environment variables, to flags... but alas, no luck. I have tried multiple Docker images as this was initially failing on local Gitlab Runner but I have found that the Docker image selenium/standalone-chrome:latest works fine in local Gitlab Runner.
Here is my karma.conf.js file:
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath();
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
frameworks: [ 'jasmine' ],
// list of files / patterns to load in the browser
files: [
'src/**/*.spec.js'
],
// list of files / patterns to exclude
exclude: [],
// preprocess matching files before serving them to the browser
preprocessors: {
'src/**/*.spec.js': [ 'webpack' ]
},
webpack: {
// webpack configuration
mode: 'development',
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['env']
}
}
]
},
stats: {
colors: true
}
},
// test results reporter to use
reporters: [ 'spec' ],
// web server port
port: 9222,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// plugins for karma
plugins: [
'karma-chrome-launcher',
'karma-webpack',
'karma-jasmine',
'karma-spec-reporter'
],
// start these browsers
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: [
'--headless',
'--no-sandbox',
'--disable-gpu'
]
}
},
captureTimeout: 60000,
browserDisconnectTolerance: 5,
browserDisconnectTimeout : 30000,
browserNoActivityTimeout : 30000,
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
// Concurrency level
// how many browser should be started simultaneous
concurrency: 1
})
}
And here is my .gitlab-ci.yml file:
.prereq_scripts: &prereq_scripts |
sudo apt -y update && sudo curl -sL https://deb.nodesource.com/setup_10.x | sudo bash && sudo apt -y install nodejs
image: 'selenium/standalone-chrome:latest'
stages:
- test
test:
stage: test
script:
- *prereq_scripts
- npm install
- npm test
I am expecting the tests to run successfully in all three instances (local npm, local Gitlab Runner and remote Gitlab CI/CD pipeline). Currently it only runs in successfully in the first two.
In your karma.conf.js file you need to declare the CHROME_BIN variable inside the module.exports function:
module.exports = function(config) {
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath();
config.set({
...
Currently, Puppeteer has an issue with Karma on Linux machines, see GitHub issue
There are plenty of solutions on how to make it works without Puppeteer if you use it just to install Headless Chromium.
I have installed it on my Jenkins Alpine machine using only two bash lines:
apk add chromium
export CHROME_BIN=/usr/bin/chromium-browser
Alternatively, you can use Docker with the same setup. One of the examples is here
Docker image with chromeheadless
for example, use a docker image of angular/ngcontainer with chrome headless for testing UI apps.
image: 'angular/ngcontainer:latest'
Also, I created one docker image with the latest chrome
image: 'anulals/angular'
https://hub.docker.com/r/angular/ngcontainer
https://hub.docker.com/r/anulals/angular

Karma not running tests. Executed 0 of 0 ERROR

I am trying to test in karma, yet every time I run Karma I get the same error:
$ karma start karma.conf.js --single-run
31 07 2018 12:56:48.134:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
31 07 2018 12:56:48.138:INFO [launcher]: Launching browser Chrome with unlimited concurrency
31 07 2018 12:56:48.144:INFO [launcher]: Starting browser Chrome
31 07 2018 12:56:49.890:INFO [Chrome 67.0.3396 (Windows 10.0.0)]: Connected on socket 2we1ypnXUlTXv5IRAAAA with id 14298953
Chrome 67.0.3396 (Windows 10.0.0): Executed 0 of 0 ERROR (0.006 secs / 0 secs)
my (mostly) auto-generated karma.conf.js
located one level above the tests at: C:\Users\king\Desktop\_REPOS\inventivangular\src
// Karma configuration
// Generated on Tue Jul 31 2018 12:30:22 GMT-0400 (Eastern Daylight Time)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: 'C:/Users/king/Desktop/_REPOS/inventivangular/src/',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'./app/*.component.ts',
'./app/*spec.ts'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
File path of files to test: C:\Users\king\Desktop\_REPOS\inventivangular\src\app
Wound up just running ng test from C:\Users\king\Desktop\_REPOS\inventivangular which generated its own karma.conf.js and everything worked.
If you are using auto-generated tests you may need to:
import { HttpClientTestingModule } from '#angular/common/http/testing'
and
imports: [HttpClientTestingModule]

Web Component Tester- Not finding chrome locally

Title saids it all:
one#localhost ~/github/my-el $ polymer test -l chrome
step: loadPlugins
step: configure
hook: configure
Error: The following browsers were not found: chrome. (All installed browsers found: )
one#localhost ~/github/my-el $ which chrome
/usr/bin/chrome
one#localhost ~/github/my-el $ lr /usr/bin/chrome
lrwxrwxrwx 1 root root 29 Jul 8 21:25 /usr/bin/chrome -> /usr/bin/google-chrome-stable
Reference https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities and
https://github.com/Polymer/web-component-tester/blob/master/runner/config.ts#L127
one#localhost ~/github/my-el $ cat wct.conf.json
{
"verbose": true,
"plugins": {
"local": {
"browsers": ["chrome"],
"browserOptions": {
"browserName": "/usr/bin/chrome",
"platform": "LINUX"
}
}
}
}
I found the answer here https://github.com/Polymer/web-component-tester/issues/222
place this in the shell for good times export LAUNCHPAD_CHROME=/usr/bin/google-chrome-stable
I was going to delete this post but I will leave it up for easy reference for other good souls searching for answer.

Karma-Coverage always outputs 100%

I'm having really hard time starting to write unit tests for my app.
My coverage always reports 100%. I did simple test adn the result should be 50% but karma-coverage doesn't think so. How ever karma progress reports right results but i need to make coverage work.
This is my karma.conf.coffee:
module.exports = (config) ->
config.set
basePath: ""
frameworks: ["jasmine"]
files: [
#"server/*_spec.js",
#"server/*.js",
#"client/app/final/.js"
#"client/*_spec.js"
"test.js"
"test_spec.js"
]
exclude: []
preprocessors: {}
reporters: ["progress", "coverage"]
preprocessors:
"test.js": ["coverage"]
coverageReporter:
type : "html",
dir : "coverage/"
port: 9876
colors: true
logLevel: config.LOG_INFO
autoWatch: false
browsers: [
"Chrome"
#"Firefox" add to package.json::devDependencies:["karma-firefox-launcher"]
#"PhantomJS" add to package.json::dependencies:["phantomjs"] and package.json::devDependencies["karma-phantomjs-launcher"]
]
singleRun: true
concurrency: Infinity
And this is test.js:
function test(a) {
return a
}
function ivo() {
return "ivo"
}
And finally test_spec.js
describe("test", function() {
it("it tests", function() {
expect(test(3)).toEqual(3);
});
});
describe("ivo", function() {
it("it ivos", function() {
expect(ivo()).toEqual("ovi");
});
});
Karma progress result:
karma start
31 12 2015 17:12:48.598:INFO [karma]: Karma v0.13.16 server started at http://localhost:9876/
31 12 2015 17:12:48.610:INFO [launcher]: Starting browser Chrome
31 12 2015 17:12:50.007:INFO [Chrome 47.0.2526 (Linux 0.0.0)]: Connected on socket q97o45wS4ctU_z4DAAAA with id 35753464
Chrome 47.0.2526 (Linux 0.0.0) ivo it ivos FAILED
Expected 'ivo' to equal 'ivo1'.
at Object.<anonymous> (/home/ivo/ivo/diplomna3/test_spec.js:9:19)
Chrome 47.0.2526 (Linux 0.0.0): Executed 2 of 2 (1 FAILED) (0.004 secs / 0.01 secs)
Test coverage indicates the percentage of the source that is tested, not the percentage of tests that pass.
Because you have two functions in test.js and there is a test for each function, the coverage is 100%.
However, only one test actually passes. So your success rate is 50%.
This are the errors
karma start --log-level=DEBUG
31 12 2015 18:24:29.017:DEBUG [plugin]: Loading plugin karma-spec-reporter.
31 12 2015 18:24:29.024:DEBUG [plugin]: Loading plugin karma-coverage.
/home/ivo/ivo/diplomna3/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)
at error (/home/ivo/ivo/diplomna3/node_modules/di/lib/injector.js:22:12)
at Object.parent.get (/home/ivo/ivo/diplomna3/node_modules/di/lib/injector.js:9:13)
at [object Object].get (/home/ivo/ivo/diplomna3/node_modules/di/lib/injector.js:54:19)
at /home/ivo/ivo/diplomna3/node_modules/karma/lib/server.js:137:20
at Array.forEach (native)
at [object Object].Server._start (/home/ivo/ivo/diplomna3/node_modules/karma/lib/server.js:136:21)
at [object Object].invoke (/home/ivo/ivo/diplomna3/node_modules/di/lib/injector.js:75:15)
at [object Object].Server.start (/home/ivo/ivo/diplomna3/node_modules/karma/lib/server.js:101:18)
at Object.exports.run (/home/ivo/ivo/diplomna3/node_modules/karma/lib/cli.js:231:26)
at requireCliAndRun (/usr/local/lib/node_modules/karma-cli/bin/karma:44:16)
at /usr/local/lib/node_modules/karma-cli/bin/karma:54:12
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:44:21
at ondir (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:187:31)
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:153:39
at onex (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:93:22)
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:24:18
at FSReqWrap.oncomplete (fs.js:83:15)
This is what i changed in the config:
reporters: ["spec", "coverage"]
plugins: ["karma-spec-reporter", "karma-coverage"]
preprocessors:
"test.js": ["coverage"]
specReporter: {}

Application Installer abnormal process termination. Process exit value was 1

at the time of running titanium application i am getting error, i have tried all the solutions suggested by google, but problem still remains, please help if anyone can understand the error log i pasted below. Thanks.
Appcelerator Command-Line Interface, version 4.1.2
Copyright (c) 2014-2015, Appcelerator, Inc. All Rights Reserved.
TRACE | __command__ search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
DEBUG | [PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
DEBUG | [PLUGIN-LOAD] 623ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
DEBUG | [PLUGIN-LOAD] 2ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
log level set to "trace"
executing command "run"
set environment to {"registry":"https://software.appcelerator.com","security":"https://security.appcelerator.com","baseurl":"https://platform.appcelerator.com"}
checking credentials for existing session
Attempting to load session info from config file
check if session is invalidated
session expiry 1439531789135 false
+---------------------------------------------------------------------------------------+
+ This is a Developer trial account. You may use this software for evaluation purposes. +
+ Once you are ready to go to production, upgrade at https://billing.appcelerator.com +
+---------------------------------------------------------------------------------------+
Arrow Cloud config file: C:\Users\acer\.acs
found Arrow Cloud login { mid: 'dfa5b79881cc650462ff93ae5df5f65d5760e1cd',
publishPort: 443,
publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
username: 'mymail',
cookie: [ 'connect.sid=s%3Ab9eP%2F3NylwuSkAqEtFC3La1k.RDNuz84uHznd9QjZUQ9Rm6UxHfan0GZcGKug2GtaQjg; Path=/; Expires=Fri, 14 Aug 2015 05:56:35 GMT; HttpOnly' ],
defaultEP:
{ publishHost: 'https://admin.cloudapp-enterprise.appcelerator.com',
publishPort: 443 } } , checking nodeACSEndpoint= https://admin.cloudapp-enterprise.appcelerator.com
Arrow Cloud cookie expiry [ 1439531795000 ]
session already loaded in opts.session
getCredentials() session:
{
"ipaddress": "192.168.1.13",
"username": "mymail",
"password": "<OMITTED>",
"session": "<OMITTED>",
"nonce": "<OMITTED>",
"environment": {
"name": "production",
"isProduction": true,
"acsBaseUrl": "https://api.cloud.appcelerator.com",
"acsAuthBaseUrl": "https://secure-identity.cloud.appcelerator.com",
"nodeACSEndpoint": "https://admin.cloudapp-enterprise.appcelerator.com"
},
"token": "<OMITTED>",
"fingerprint": "dfa5b79881cc650462ff93ae5df5f65d5760e1cd",
"fingerprint_description": "Windows Machine ID: bcd68e35-cc53-4567-ab68-66246b73cc67",
"org_id": 100057656,
"expiry": 1439531789135
}
loading plugins for command "run"
run search paths:
[
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package",
"C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules",
"C:\\Users\\acer\\Desktop\\node_modules",
"C:\\Users\\acer\\node_modules",
"C:\\Users\\node_modules",
"C:\\node_modules",
"C:\\Users\\acer\\.appcelerator\\.npm\\lib\\node_modules"
]
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\appc.js
[PLUGIN-LOAD] 251ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium
[PLUGIN-LOAD] 0ms C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow\appc.js
run plugin: C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\arrow
plugin "arrow" failed its "when" function check, skipping...
loading plugin "titanium" for command "run" CLI options via function
loading plugin "titanium" for command "run" CLI options via array
Duplicate option "colors" for command "run", removing...
executing command "run" with the following plugins:
["titanium"]
TRACE | Attempting to load session info from config file
TRACE | check if session is invalidated
TRACE | session expiry 1439531789135 false
TRACE | session already loaded in opts.session
DEBUG | Titanium Downloads Last Checked: 1439447168501
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" config -o json-object
TRACE | "C:\Program Files\nodejs\node.exe" "C:\Users\acer\.appcelerator\install\4.1.2\package\node_modules\appc-cli-titanium\node_modules\titanium\bin\titanium" sdk -o json
TRACE | checking for titanium, result:
{ activeSDK: '4.1.0.GA',
defaultInstallLocation: 'C:\\ProgramData\\Titanium',
installLocations:
[ 'C:\\ProgramData\\Titanium',
'C:\\Users\\acer\\AppData\\Roaming\\Titanium',
'C:\\ProgramData\\Application Data\\Titanium' ],
installed: { '4.1.0.GA': 'C:\\ProgramData\\Titanium\\mobilesdk\\win32\\4.1.0.GA' } }
TRACE | C:\Program Files\nodejs\node.exe [ 'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules\\appc-cli-titanium\\node_modules\\titanium\\bin\\titanium',
'build',
'--platform',
'android',
'--log-level',
'trace',
'--sdk',
'4.1.0.GA',
'--project-dir',
'D:\\Titanium WS\\ex',
'--target',
'emulator',
'--android-sdk',
'C:\\android-sdk-win',
'--device-id',
'Appp',
'--skip-js-minify',
'--no-colors',
'--no-progress-bars',
'--no-prompt',
'--prompt-type',
'socket-bundle',
'--prompt-port',
'62727',
'--plugin-paths',
'C:\\Users\\acer\\.appcelerator\\install\\4.1.2\\package\\node_modules',
'--config-file',
'C:\\Users\\acer\\AppData\\Local\\Temp\\build-1439448105417.json',
'--no-banner' ]
[WARN] :
TRACE | titanium exited with exit code 1
[ERROR] Application Installer abnormal process termination. Process exit value was 1
After 24 hours i get my project installing on my device. i am unable to get the exact problem but i want to share my tried steps to solve the problem.
I installed all sdk's one by one.
I switched my current work space and created new one. (old work space still gives error)
Now my project is installing fine, every time.
Thanks.