Jhipster 2.27 : can't create an entity - jhipster
I have forked Jhipster 2.27 and tried to add an entity with
yo jhipster:entity car
I got this error :
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'endsWith' of undefined
at Generator.getAngularAppName (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/generator-base.js:1223:67)
at module.exports.EntityGenerator.extend.initializing.getConfig (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/entity/index.js:116:40)
at Object.<anonymous> (/home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:436:25)
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/node_modules/run-async/index.js:24:25
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:448:8
at processImmediate [as _immediateCallback] (timers.js:383:17)
.yo-rc.json file :
GNU nano 2.4.2 FichierĀ : .yo-rc.json
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myApp.testapp",
"packageFolder": "com/myApp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "c959bf1efd5c74e68c9700e2ad012ff595ed52ec",
"useSass": false,
"languages": [
"fr",
"ca"
]
},
"testapp": {
"jhipsterVersion": "2.27.0",
"applicationType": "monolith",
"baseName": "jhipster",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Any idea of what's going wrong here?
Thank you.
[UPDATE]
This is what I did :
Welcome to the JHipster Generator v2.27.0
Application files will be generated in folder: /home/myUbuntu/dev/workspace/generator-jhipster-master
? (1/15) Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? (2/15) What is the base name of your application? jhipster
? (3/15) What is your default Java package name? com.myapp.testapp
? (4/15) Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism)
? (5/15) Which *type* of database would you like to use? SQL (H2, MySQL, PostgreSQL, Oracle)
? (6/15) Which *production* database would you like to use? MySQL
? (7/15) Which *development* database would you like to use? MySQL
? (8/15) Do you want to use Hibernate 2nd level cache? Yes, with ehcache (local cache, for a single node)
? (9/15) Do you want to use a search engine in your application? No
? (10/15) Do you want to use clustered HTTP sessions? No
? (11/15) Do you want to use WebSockets? No
? (12/15) Would you like to use Maven or Gradle for building the backend? Maven
? (13/15) Would you like to use the LibSass stylesheet preprocessor for your CSS? No
? (14/15) Would you like to enable internationalization support? Yes
? Please choose the native language of the application? French
? Please choose additional languages to install Catalan
? (15/15) Which testing frameworks would you like to use? Gatling
Installing languages: fr, ca
create bower.json
conflict package.json
? Overwrite package.json? overwrite
force package.json
conflict README.md
? Overwrite README.md? overwrite
force README.md
conflict .gitignore
? Overwrite .gitignore? overwrite
force .gitignore
conflict .gitattributes
? Overwrite .gitattributes? overwrite
force .gitattributes
conflict .editorconfig
? Overwrite .editorconfig? overwrite
force .editorconfig
conflict .travis.yml
? Overwrite .travis.yml? overwrite
then :
yo jhipster:entity car
.yo-rc.json file :
GNU nano 2.4.2 FichierĀ : .yo-rc.json
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myapp.testapp",
"packageFolder": "com/myapp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "6b7f2e0be835e1ec6541cf6607c28d97edca19cc",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Update2
npm ERR! Linux 4.2.0-16-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "install" npm ERR! node v5.6.0 npm ERR! npm
v3.6.0
npm ERR! No compatible version found: generator-jhipster#0.0.0 npm
ERR! Valid install targets: npm ERR! 2.27.2, 2.27.1, 2.27.0, 2.26.2,
2.26.1, 2.26.0, 2.25.0, 2.24.0, 2.23.1, 2.23.0, 2.22.0, 2.21.1, 2.21.0, 2.20.0, 2.19.0, 2.18.0, 2.17.0, 2.16.1, 2.16.0, 2.15.2, 2.15.1, 2.15.0, 2.14.2, 2.14.1, 2.14.0, 2.13.1, 2.13.0, 2.12.0, 2.11.1, 2.11.0, 2.10.1, 2.10.0, 2.9.2, 2.9.1, 2.9.0, 2.8.0, 2.7.0, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.4.0, 2.3.0, 2.2.0, 2.1.1, 2.1.0, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.0, 1.8.1, 1.8.0, 1.7.1, 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.0, 0.18.1, 0.18.0, 0.17.2, 0.17.1, 0.17.0, 0.16.0, 0.15.0, 0.14.0, 0.13.0, 0.12.0, 0.11.0, 0.10.1, 0.10.0, 0.9.3, 0.9.2, 0.9.1, 0.9.0, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0, 0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.2, 0.5.1, 0.5.0, 0.4.0, 0.3.1, 0.3.0, 0.2.1, 0.2.0, 0.1.0, 0.0.29, 0.0.28, 0.0.27, 0.0.26, 0.0.23, 0.0.22, 0.0.21, 0.0.20, 0.0.19, 0.0.18, 0.0.17, 0.0.16, 0.0.15, 0.0.14, 0.0.13, 0.0.12, 0.0.11, 0.0.10, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1 npm ERR! npm ERR! npm ERR! If you need help, you may report this
error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/myUbuntu/dev/workspace/rhapp/npm-debug.log
module.js:341
throw err;
^
Error: Cannot find module 'gulp-autoprefixer'
You haven't forked JHipster 2.27, you have forked JHipster 3.0
from master (2.27 is on v2.x_maintenance branch) otherwise you would have
not been proposed to generate a monolith app.
It seems you have modified manually your .yo-rc.json file as JHipster would have rejected com.myApp.testapp with this error: "The package name you have provided is not a valid Java package name."
Your .yo-rc.json file is not valid, there should not be this "testapp" section, this is why it fails.
Here is what your .yo-rc.json file should be:
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myapp.testapp",
"packageFolder": "com/myapp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "33cd878a5fc34f050fec62a1c0c3f4dafb64458e",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Update 1
From your trace it seems that you tried to generate an app in the generator's folder, this cannot work.
Application files will be generated in folder:
/home/myUbuntu/dev/workspace/generator-jhipster-master
You got to run yo jhipster in a new empty folder.
Update 2
Your last error looks like you have changed the version of the generator in its package.json. Npm then looks up this version on nmpjs.org and cannot find it.
Update 3
Read our docs about how to use your forked generator: https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md#setup
Related
Electron and couchbase: the module was compiled against a different node.js version (win)
Question: I am trying to use couchbase in an electron application, but fail to run the electron application as soon as I include the couchbase module. How can I use couchbase with electron? Error message: C:\dev\app>npm start > eej#1.0.0 start C:\dev\app > electron . App threw an error during load Error: The module '\\?\C:\dev\app\node_modules\couchbase\build\Release\couchbase_impl.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 76. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func (electron/js2c/asar.js:140:31) at process.func [as dlopen] (electron/js2c/asar.js:140:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18) at Object.func (electron/js2c/asar.js:140:31) at Object.func [as .node] (electron/js2c/asar.js:140:31) at Module.load (internal/modules/cjs/loader.js:816:32) at Module._load (internal/modules/cjs/loader.js:728:14) at Module._load (electron/js2c/asar.js:717:26) at Function.Module._load (electron/js2c/asar.js:717:26) at Module.require (internal/modules/cjs/loader.js:853:19) My main.js file begins like this: const { app, BrowserWindow } = require('electron') var couchbase = require('couchbase'); function createWindow () { What I have tried already: removing the node_modules directory and lock file and reinstalling via npm i installing and running electron-rebuild using the --update-binary switch when running npm i downgraded the npm version to an LTS version Background information: Node version: PS C:\dev\app> node --version v12.16.1 PS C:\dev\app> electron --version v8.0.1 Electron uses node 12.13.0: We are using node 12.13.0, Chrome 80.0.3987.86, and Electron 8.0.1. The version of electron-node and standalone node differ. I am not sure if this is okay?! Content of my package.json file: { "name": "app", "version": "1.0.0", "description": "", "main": "main.js", "scripts": { "start": "electron ." }, "author": "", "license": "ISC", "devDependencies": { "couchbase": "^3.0.0", "electron": "^8.0.1", "electron-rebuild": "^1.10.0" }, "dependencies": { "node-gyp": "^6.1.0" } } Similar questions: Couchbase Node compiled against different node version: After I have added a comment I discovered that it is a unix specific question. Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51: I went through nearly all of the suggestions, but none of them seemed to work for me.
Webpack failure during JHipster Prod Package
I generated a vanilla JHipster microservice gateway. With JHipster registry running I am able to start it using ./mvnw and it works. I can package it using ./mvnw -Pdev package and that works. However, if I try to package it using ./mvnw -Pprod package it fails apparently during the webpack build prod step. JHipster version 4.14.0 Yarn version 1.3.2 Node version v6.11.5 yo-rc.json { "generator-jhipster": { "promptValues": { "packageName": "org.jhipster.blog", "nativeLanguage": "en" }, "jhipsterVersion": "4.14.0", "baseName": "blog", "packageName": "org.jhipster.blog", "packageFolder": "org/jhipster/blog", "serverPort": "8080", "authenticationType": "jwt", "cacheProvider": "hazelcast", "enableHibernateCache": true, "websocket": false, "databaseType": "sql", "devDatabaseType": "h2Disk", "prodDatabaseType": "postgresql", "searchEngine": "elasticsearch", "messageBroker": false, "serviceDiscoveryType": "eureka", "buildTool": "maven", "enableSocialSignIn": false, "enableSwaggerCodegen": false, "jwtSecretKey": "0b9d434149a3efef6af7362acaf33585d5eaa492", "clientFramework": "angularX", "useSass": false, "clientPackageManager": "yarn", "applicationType": "gateway", "testFrameworks": [ "gatling", "protractor" ], "jhiPrefix": "jhi", "enableTranslation": true, "nativeLanguage": "en", "languages": [ "en", "es" ] } } Maven Output [INFO] --- frontend-maven-plugin:1.6:yarn (webpack build prod) # blog --- [INFO] yarn not inheriting proxy config from Maven [INFO] Running 'yarn run webpack:prod' in /Users/mschreiber/temp/microservice-demo/blog [INFO] yarn run v1.3.2 [INFO] $ yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www [INFO] $ rimraf target/{aot,www} [INFO] $ yarn run webpack -- --config webpack/webpack.prod.js --profile [ERROR] warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts. [INFO] $ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --profile [INFO] MergetJsonsWebpackPlugin compilation started... [INFO] MergetJsonsWebpackPlugin compilation completed... [ERROR] buffer.js:202 [ERROR] throw new TypeError(kFromErrorMsg); [ERROR] ^ [ERROR] [ERROR] TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object. [ERROR] at Function.Buffer.from (buffer.js:202:9) [ERROR] at new Buffer (buffer.js:158:17) [ERROR] at writeOut (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:334:17) [ERROR] at require.forEach (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:345:12) [ERROR] at /Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:3096:16 [ERROR] at eachOfArrayLike (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:1055:9) [ERROR] at eachOf (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:1103:5) [ERROR] at Object.eachLimit (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:3158:5) [ERROR] at emitFiles (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:315:21) [ERROR] at /Users/mschreiber/temp/microservice-demo/blog/node_modules/mkdirp/index.js:30:20 [ERROR] at FSReqWrap.oncomplete (fs.js:135:15) [ERROR] error Command failed with exit code 1. [INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [ERROR] error Command failed with exit code 1. [INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [ERROR] error Command failed with exit code 1. [INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:05 min [INFO] Finished at: 2018-03-06T08:32:03-05:00 [INFO] Final Memory: 44M/372M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project blog: Failed to run task: 'yarn run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
This issue is related to the workbox-webpack-plugin dependency of JHipster and is fixed in the v4.14.1 release (related commit). To fix it in your generated project, make the following changes: package.json: - "workbox-webpack-plugin": "3.0.0-alpha.3", + "workbox-webpack-plugin": "3.0.0-beta.1", webpack/webpack.prod.js - new WorkboxPlugin({ + new WorkboxPlugin.GenerateSW({ You can also upgrade to the latest generator-jhipster release with yarn global upgrade generator-jhipster, then upgrade your project with jhipster upgrade. For more info on the upgrade command, see the relevant documentation.
micro-service always connects to localhost for consul
I have generated a microservice configured for consul with jhipster 4.6.2. I'm running Consul with Docker (with Virtualbox). As a result, it is not running on localhost (but e.g. with 192.168.99.100). Hence I modified application-dev.yml of my microservice to set the host like this : cloud: consul: discovery: prefer-ip-address: true host: 192.168.99.100 port: 8500 ... but when I start the micro-service, it is still trying to connect to localhost (i.e. the property below is not taken into account). Then I got this exception : com.ecwid.consul.transport.TransportException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:8500 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused Any idea ? thanks ! My config jhipster: { "generator-jhipster": { "promptValues": { "packageName": "org.fge.msconsul" }, "jhipsterVersion": "4.6.2", "baseName": "msconsul", "packageName": "org.fge.msconsul", "packageFolder": "org/fge/msconsul", "serverPort": "8082", "authenticationType": "jwt", "hibernateCache": "hazelcast", "clusteredHttpSession": false, "websocket": false, "databaseType": "sql", "devDatabaseType": "h2Disk", "prodDatabaseType": "postgresql", "searchEngine": false, "messageBroker": false, "serviceDiscoveryType": "consul", "buildTool": "maven", "enableSocialSignIn": false, "jwtSecretKey": "replaced-by-jhipster-info", "enableTranslation": false, "applicationType": "microservice", "testFrameworks": [], "jhiPrefix": "jhi", "skipClient": true, "skipUserManagement": true, "clientPackageManager": "yarn" } } </details> ##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory** ##### **Environment and Tools** java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode) git version 2.11.0 (Apple Git-81) node: v7.4.0 npm: 5.0.3 bower: 1.8.0 gulp: [22:45:50] CLI version 3.9.1 yeoman: 2.0.0 yarn: 0.27.5 Docker version 17.05.0-ce, build 89658be docker-compose version 1.13.0, build 1719ceb Execution complete
Spring Cloud has a bootstrap phase from which it can load configuration properties from the external sources. src/main/resources/bootstrap*.yml is the file where you must configure how to connect to Consul.
You can also mention in application.properties the consul host like below, i have confirmed that this works spring.cloud.consul.host=http://hostname spring.cloud.consul.port=8500 the best way to mention this is bootstrap.yml which is loaded first before any .properties are loaded
e2e test with Jenkins, selenium-grid and protractor
I'm trying to build my testing environment using Jenkins, Selenium and Protractor. I decided to use selenium-plugin (selenium grid) to dispatch tests among remote machines (nodes). What I achieved till now is establishing connection between selenium hub and nodes. Node.js version installed on Jenkins is 5.12.0, Protractor is 3.3.0. I also installed npm chromedriver and set a path to this driver in protractor.config.js like : chromeDriver: '/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/chromedriver/bin/chromedriver' Nodes are running selenium-standalone servers, installed globaly with npm. When I'm executing my protractor.config.js file I have the following error : protractor /u01/apps/jenkins/data/workspace/Servers/testApp/protractor.conf.js [14:49:08] I/direct - Using ChromeDriver directly... [14:49:08] I/launcher - Running 1 instances of WebDriver /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329 return callbackFn(this.value_); ^ Error: Server terminated early with status 127 at Error (native) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:210:20 at Promise.invokeCallback_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14) at TaskQueue.execute_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14) at TaskQueue.executeNext_ (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27 at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession() at acquireSession (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:62:22) at Function.createSession (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:295:12) at Driver (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:778:38) at Direct.getNewDriver (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/built/driverProviders/direct.js:65:26) at Runner.createBrowser (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/built/runner.js:182:43) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/built/runner.js:255:30 at _fulfilled (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/q/q.js:796:13) at /u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/protractor/node_modules/q/q.js:556:49 [14:49:08] E/launcher - Process exited with error code 1 Here is my protractor config file: exports.config = { directConnect: true, chromeDriver: '/u01/apps/jenkins/data/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_5.12.0/lib/node_modules/chromedriver/bin/chromedriver', framework: 'jasmine', capabilities: { 'browserName': 'chrome', shardTestFiles: true, maxInstances: 3 }, specs: ['test/test_spec.js'], jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, }, seleniumAddress: 'http://HUB_IP:4444/wd/hub', onPrepare: function() { browser.driver.manage().window().maximize(); }, plugins: [{ package: 'protractor-console', logLevels: ['severe', 'debug', 'info', 'warning'] }] };
You need to directConnect: false, so it will use the selenium server through seleniumAddress: 'http://HUB_IP:4444/wd/hub', and given you are on Jenkins, probably in headless mode I recommend you to use docker-selenium Start the local grid CONTAINER_ID="grid_$BUILD_NUMBER" docker run -d --name=$CONTAINER_ID -v /dev/shm:/dev/shm elgalu/selenium Wait for it to start docker exec $CONTAINER_ID wait_all_done 40s Grab the IP export HUB_IP=$(docker inspect -f='{{.NetworkSettings.IPAddress}}' $CONTAINER_ID) Run your tests protractor testApp/protractor.conf.js
Slow startup time Jhipster 3.0 application on Digitalocean using ubuntu-docker
I want to ask about my jhipster 3.0 generated application I was generate jhipster 3.0 application This is my .yo.rc.json file { "generator-jhipster": { "jhipsterVersion": "3.0.0", "baseName": "sfaweb", "packageName": "com.codesolution.sfa", "packageFolder": "com/codesolution/sfa", "serverPort": "8080", "authenticationType": "session", "hibernateCache": "no", "clusteredHttpSession": "no", "websocket": "no", "databaseType": "mongodb", "devDatabaseType": "mongodb", "prodDatabaseType": "mongodb", "searchEngine": "no", "buildTool": "maven", "enableSocialSignIn": false, "rememberMeKey": "c566b7acc3ae6491cd93f66f816bea4296598be6", "useSass": false, "applicationType": "monolith", "testFrameworks": [], "enableTranslation": true, "nativeLanguage": "en", "languages": [ "en" ]} } I using docker from jhipster/jhipster Then follow an instruction from https://jhipster.github.io/installation/ I running in dev mode, This is my startup script ./mvnw -Dspring.data.mongodb.host=${MONGO_PORT_27017_TCP_ADDR} This is screenshot after startup, it takes 1225.074 seconds. Startup screenshot I'm running on ubuntu 1 GB Memory / 30 GB Disk / SGP1 - Ubuntu Docker 1.10.3 on 14.04 Please help me, how it took so long? Am i miss something here?
You posted a comment on Docker Hub, but I don't think it's related to our image jhipster/jhipster On your screenshot, it stucks during 20min, between "web application fully configured" and "running with spring profiles" Can you try with a simple configuration (all by default), with H2?