Failed to build project with the pre-configured prod profile - jhipster

When I execute command mvnw -Pprod, i get BUILD FAILURE with this error :
>[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
>[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
>[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
>[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#0.5.x"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.3"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#0.1.x"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.3"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#~0.4.1"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#0.5.x"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.7"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#~0.5.1"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.4.2"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.3"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.6"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#~0.5.0"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.3"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.5.1"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#~0.2.0"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.4.4"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.1.41"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#~0.2.0"
[ERROR] warning Resolution field "source-map#0.6.1" is incompatible with requested version "source-map#^0.4.2"
[INFO] [3/5] Fetching packages...
[ERROR] warning Pattern ["generator-jhipster#latest"] is trying to unpack in the same destination "/Users/jkll/Library/Caches/Yarn/v1/npm-generator-jhipster-4.14.3-f99f8b1cd590b1fdc2908a43d66249daff8baac0" as pattern ["generator-jhipster#4.14.3","generator-jhipster#>=4.13.3","generator-jhipster#>=4.6.0","generator-jhipster#>=2.27.0","generator-jhipster#>=3.0.0","generator-jhipster#>=4.0.0","generator-jhipster#>2.26.0","generator-jhipster#>=4.10","generator-jhipster#>=2.26.0"]. This could result in a non deterministic behavior, skipping.
[INFO] [4/5] Linking dependencies...
[INFO] [5/5] Rebuilding all packages...
[INFO] success Saved lockfile.
[INFO] $ webdriver-manager update && node node_modules/phantomjs-prebuilt/install.js
[INFO] webdriver-manager: using local installed version 12.0.6
[INFO] [19:41:12] I/file_manager - creating folder /Users/jkll/eclipse/eclipse-workspace/halfearth/node_modules/webdriver-manager/selenium
[INFO] [19:41:26] I/update - geckodriver: unzipping geckodriver-v0.23.0.tar.gz
[INFO] [19:41:26] I/update - geckodriver: setting permissions to 0755 for /Users/jkll/eclipse/eclipse-workspace/halfearth/node_modules/webdriver-manager/selenium/geckodriver-v0.23.0
[ERROR] events.js:183
[ERROR] throw er; // Unhandled 'error' event
[ERROR] ^
[ERROR]
[ERROR] Error: ESOCKETTIMEDOUT
[ERROR] at ClientRequest.<anonymous> (/Users/jkll/eclipse/eclipse-workspace/halfearth/node_modules/request/request.js:813:19)
[ERROR] at Object.onceWrapper (events.js:313:30)
[ERROR] at emitNone (events.js:106:13)
[ERROR] at ClientRequest.emit (events.js:208:7)
[ERROR] at TLSSocket.emitTimeout (_http_client.js:708:34)
[ERROR] at Object.onceWrapper (events.js:313:30)
[ERROR] at emitNone (events.js:106:13)
[ERROR] at TLSSocket.emit (events.js:208:7)
[ERROR] at TLSSocket.Socket._onTimeout (net.js:407:8)
[ERROR] at ontimeout (timers.js:475:11)
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:18 min
[INFO] Finished at: 2018-10-07T19:45:12+08:00
[INFO] Final Memory: 39M/416M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project halfearth: Failed to run task: 'yarn install --force' 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
Environment and Tools
Operational system: macOS High Sierra(version 10.13.6)
JHipster Version(s): JHipster Generator v4.14.3
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
NodeJS: x64 (by running: node -p "process.arch")
node: v10.8.0
npm: 6.2.0
yarn: 1.9.4
JHipster configuration:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.xinjue.halfearth",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.14.3",
"baseName": "halfearth",
"packageName": "com.xinjue.halfearth",
"packageFolder": "com/xinjue/halfearth",
"serverPort": "8080",
"authenticationType": "session",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": true,
"enableSwaggerCodegen": false,
"rememberMeKey": "201bbd1f0bf1b5cf99931cd98e550fbf31fcf45a",
"clientFramework": "angularX",
"useSass": true,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [
"protractor"
],
"jhiPrefix": "jhi",
"otherModules": [
{
"name": "generator-jhipster-ionic",
"version": "3.1.2"
},
{
"name": "generator-jhipster-db-helper",
"version": "1.0.0"
},
{
"name": "generator-jhipster-pages",
"version": "2.0.4"
},
{
"name": "generator-jhipster-elasticsearch-reindexer",
"version": "1.2.1"
},
{
"name": "generator-jhipster-bootstrap-material-design",
"version": "3.5.1"
},
{
"name": "generator-jhipster-swagger2markup",
"version": "1.2.0"
},
{
"name": "generator-jhipster-primeng-charts",
"version": "1.0.0"
},
{
"name": "generator-jhipster-entity-snowflake",
"version": "1.0.0"
},
{
"name": "generator-jhipster-swagger-api-first",
"version": "1.0.1"
},
{
"name": "generator-jhipster-leaflet",
"version": "1.0.0"
},
{
"name": "generator-jhipster-swagger-cli",
"version": "2.0.5"
},
{
"name": "generator-jhipster-elasticsearch-rest-client",
"version": "1.0.0"
},
{
"name": "generator-jhipster-primeng-entity",
"version": "1.0.2"
},
{
"name": "generator-jhipster-entity-audit",
"version": "3.1.0"
},
{
"name": "generator-jhipster-enterprise-pom",
"version": "0.0.7"
},
{
"name": "generator-jhipster-grpc",
"version": "0.15.0"
},
{
"name": "generator-jhipster-leafletmap",
"version": "1.0.5"
},
{
"name": "generator-jhipster-pace",
"version": "0.1.3"
},
{
"name": "generator-jhipster-spring-social-connectors",
"version": "0.0.1"
},
{
"name": "generator-jhipster-entity-audit-and-delete",
"version": "2.2.2"
},
{
"name": "generator-jhipster-mssql",
"version": "2.1.2"
},
{
"name": "generator-jhipster-material",
"version": "0.0.0"
},
{
"name": "generator-jhipster-nav-element",
"version": "1.4.19"
},
{
"name": "generator-jhipster-darktheme",
"version": "0.0.7"
},
{
"name": "generator-jhipster-basic-auth",
"version": "1.0.1"
}
],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"zh-cn"
]
}
}
I have checked in different ways but I still have no clue about what is the issue. Could you please guide me on this issue? Thank you.
(I tried to set --max_old_space_size to 2048 or 6000 in package.json and it did not work)

Related

Log all failed attempts in testcafe quarantine mode?

I have quarantine mode enabled in my testcafe configuration.
"ci-e2e": {
"browsers": [
"chrome:headless"
],
"debugOnFail": false,
"src": "./tests/e2e/*.test.ts",
"concurrency": 1,
"quarantineMode": true,
"reporters": [
{
"name": "nunit3",
"output": "results/e2e/testResults.xml"
},
{
"name": "spec"
}
],
"screenshots": {
"takeOnFails": true,
"path": "results/ui/screenshots",
"pathPattern": "${DATE}_${TIME}/${FIXTURE}/${TEST}/Screenshot-${QUARANTINE_ATTEMPT}.png"
},
"video": {
"path": "results/ui/video",
"failedOnly": true,
"pathPattern": "${DATE}_${TIME}/${FIXTURE}/${TEST}/Video-${QUARANTINE_ATTEMPT}"
}
},
Now when some attempt fails I have entry in log (nunit xml logfile) with information about failed runs and only one stack-trace. I have screenshot for each failed run.
<failure>
<message>
<![CDATA[ ❌ AssertionError: ... Run 1: Failed Run 2: Failed Run 3: Failed ]]>
</message>
<stack-trace>
here we have stack-trace for only one failed run
</stack-trace>
</failure>
I want to have log entry with stack-trace for each failed run for each failed test. Is it possible to configure testcafe this way? If not what I need to do?
There is a mistake in the config file. The name of the option for reporters should be reporter, but it is reporterS. It means that Testcafe doesn't use these reporters at all and maybe now you just see an outdated file with results.

Prisma: getting "com.prisma.deploy.schema.InvalidProjectId: No service with name 'default' and stage 'default' found" error

I'm getting errors related to name 'default' and stage 'default' when initializing new prisma project
Steps to reproduce:
Follow all the steps from official guide strictly
Get com.prisma.deploy.schema.InvalidProjectId: No service with name 'default' and stage 'default' found error when run prisma deploy
Get this error when performing a simple query from http://localhost:4466/graphql:
Query:
query {
user {
id
name
}
}
Response:
{
"errors": [
{
"message": "Project not found: 'graphql_default'",
"code": 3016,
"requestId": "local:cjzs556h5000f0754vc6k36qd"
}
]
}
Versions:
Connector: MongoDB
Prisma Server: 1.34.6
prisma CLI: prisma/1.34.6 (darwin-x64) node-v10.16.3
OS: OS X Mojave - 10.14.6
Logs from Docker:
$ docker logs hello-world_prisma_1
No log level set, defaulting to INFO.
[INFO] Cluster created with settings {hosts=[mongo:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
[INFO] Exception in monitor thread while connecting to server mongo:27017
Exception opening socket
com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.internal.connection.AsynchronousSocketChannelStream$OpenCompletionHandler.failed(AsynchronousSocketChannelStream.java:272)
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:128)
at sun.nio.ch.Invoker$2.run(Invoker.java:218)
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252)
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198)
at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)
at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)
... 1 more
[INFO] Initializing workers...
[INFO] Obtaining exclusive agent lock...
[INFO] Obtaining exclusive agent lock... Successful.
[INFO] Successfully started 1 workers.
[INFO] No server chosen by com.mongodb.async.client.ClientSessionHelper$1#70a6c292 from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=mongo:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]}. Waiting for 30000 ms before timing out
[INFO] Opened connection [connectionId{localValue:2, serverValue:1}] to mongo:27017
[INFO] Monitor thread successfully connected to server with description ServerDescription{address=mongo:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 6, 13]}, minWireVersion=0, maxWireVersion=6, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=16638401}
Server running on :4466
[INFO] Opened connection [connectionId{localValue:3, serverValue:2}] to mongo:27017
[INFO] Deployment worker initialization complete.
[Warning] Management authentication is disabled. Enable it in your Prisma config to secure your server.
{"key":"error/handled","requestId":"local:cjzs54qg500020754mbbzqni9","payload":{"exception":"com.prisma.deploy.schema.InvalidProjectId: No service with name 'default' and stage 'default' found","query":"\n query($name: String! $stage: String!) {\n project(name: $name stage: $stage) {\n name\n stage\n }\n }\n ","variables":"{\"name\":\"default\",\"stage\":\"default\"}","code":"4000","stack_trace":"com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$3(SchemaBuilder.scala:144)\\n scala.Option.getOrElse(Option.scala:121)\\n com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$2(SchemaBuilder.scala:144)\\n scala.util.Success.$anonfun$map$1(Try.scala:251)\\n scala.util.Success.map(Try.scala:209)\\n scala.concurrent.Future.$anonfun$map$1(Future.scala:288)\\n scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)\\n scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)\\n scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)\\n akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)\\n akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)\\n scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\\n scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)\\n akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)\\n akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)\\n akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)\\n akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\\n akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\\n akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\\n akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)","message":"No service with name 'default' and stage 'default' found"}}
[Debug] Initializing deployment worker for default_default
[Debug] Scheduling deployment for project default_default
[INFO] Opened connection [connectionId{localValue:4, serverValue:3}] to mongo:27017
[Debug] Applied migration for project default_default
Formatted [Warning]:
{
"key": "error/handled",
"requestId": "local:cjzs54qg500020754mbbzqni9",
"payload": {
"exception": "com.prisma.deploy.schema.InvalidProjectId: No service with name 'default' and stage 'default' found",
"query": "\n query($name: String! $stage: String!) {\n project(name: $name stage: $stage) {\n name\n stage\n }\n }\n ",
"variables": "{\"name\":\"default\",\"stage\":\"default\"}",
"code": "4000",
"stack_trace": "com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$3(SchemaBuilder.scala:144)\\n scala.Option.getOrElse(Option.scala:121)\\n com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$2(SchemaBuilder.scala:144)\\n scala.util.Success.$anonfun$map$1(Try.scala:251)\\n scala.util.Success.map(Try.scala:209)\\n scala.concurrent.Future.$anonfun$map$1(Future.scala:288)\\n scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)\\n scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)\\n scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)\\n akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)\\n akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)\\n scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)\\n scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)\\n akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)\\n akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)\\n akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)\\n akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)\\n akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)\\n akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)\\n akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)",
"message": "No service with name 'default' and stage 'default' found"
}
}
Formatted "query":
query($name: String! $stage: String!) {
project(name: $name stage: $stage) {
name
stage
}
}
Formatted "variables":
{ "name":"default", "stage":"default" }
Formatted stack trace:
com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$3(SchemaBuilder.scala:144)
scala.Option.getOrElse(Option.scala:121)
com.prisma.deploy.schema.SchemaBuilderImpl.$anonfun$projectField$2(SchemaBuilder.scala:144)
scala.util.Success.$anonfun$map$1(Try.scala:251)
scala.util.Success.map(Try.scala:209)
scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:44)
akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
P/s: It actually was running flawlessly some days before, but today I can't manage to make it work again!

Kerberos library is not installed

I have a simple project to test Kerberos authentication. This is a Windows machine.
In my package.json:
"dependencies": {
"kerberos": "^0.0.24",
"mongodb": "^3.0.10"
}
Connection URL:
const url = 'mongodb://userxxx%40XXXXX.XXXXX.COM:Password01#servername:27017/?authMechanism=GSSAPI&authSource=%24external&ssl=true';
But when I'm trying to connect in the code:
MongoClient.connect(url, (err, client) => {
if (err) {
console.error(err);
I get an error message Error: Kerberos library is not installed
I tried nuking node_modules and reinstalling everything. I tried installing kerberos module globally and locally. Same consistent result every time. Looking for insights. Thank you.
EDIT:
No errors during installation/compilation:
$ yarn add mongodb kerberos
yarn add v1.5.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 8 new dependencies.
info Direct dependencies
├─ kerberos#0.0.24
└─ mongodb#3.0.10
info All dependencies
├─ bson#1.0.9
├─ kerberos#0.0.24
├─ mongodb-core#3.0.9
├─ mongodb#3.0.10
├─ nan#2.10.0
├─ require_optional#1.0.1
├─ resolve-from#2.0.0
└─ semver#5.5.0
Done in 23.56s.
EDIT 2:
C:\Users\username\Projects\node.js\kerberos-test>npm init -y
Wrote to C:\Users\username\Projects\node.js\kerberos-test\package.json:
{
"name": "kerberos-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
C:\Users\username\Projects\node.js\kerberos-test>npm install kerberos mongodb
--save
> kerberos#0.0.24 install C:\Users\username\Projects\node.js\kerberos-test\nod
e_modules\kerberos
> (node-gyp rebuild) || (exit 0)
C:\Users\username\Projects\node.js\kerberos-test\node_modules\kerberos>if not
defined npm_config_node_gyp (node "C:\Users\username\AppData\Roaming\npm\node_
modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp
\bin\node-gyp.js" rebuild ) else (node "C:\Users\username\AppData\Roaming\npm
\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
kerberos.cc
worker.cc
security_buffer.cc
security_buffer_descriptor.cc
security_context.cc
security_credentials.cc
win_delay_load_hook.cc
..\lib\win32\wrappers\security_credentials.cc(314): warning C4996: 'Nan::Callba
ck::Call': was declared deprecated [C:\Users\username\Projects\node.js\kerber
os-test\node_modules\kerberos\build\kerberos.vcxproj]
C:\Users\username\Projects\node.js\kerberos-test\node_modules\nan\nan.h(161
8): note: see declaration of 'Nan::Callback::Call'
..\lib\win32\wrappers\security_credentials.cc(341): warning C4996: 'Nan::Callba
ck::Call': was declared deprecated [C:\Users\username\Projects\node.js\kerber
os-test\node_modules\kerberos\build\kerberos.vcxproj]
C:\Users\username\Projects\node.js\kerberos-test\node_modules\nan\nan.h(161
8): note: see declaration of 'Nan::Callback::Call'
..\lib\win32\wrappers\security_context.cc(49): warning C4996: 'Nan::Callback::C
all': was declared deprecated [C:\Users\username\Projects\node.js\kerberos-te
st\node_modules\kerberos\build\kerberos.vcxproj]
C:\Users\username\Projects\node.js\kerberos-test\node_modules\nan\nan.h(161
8): note: see declaration of 'Nan::Callback::Call'
..\lib\win32\wrappers\security_context.cc(67): warning C4996: 'Nan::Callback::C
all': was declared deprecated [C:\Users\username\Projects\node.js\kerberos-te
st\node_modules\kerberos\build\kerberos.vcxproj]
C:\Users\username\Projects\node.js\kerberos-test\node_modules\nan\nan.h(161
8): note: see declaration of 'Nan::Callback::Call'
..\lib\win32\wrappers\security_context.cc(612): warning C4311: 'type cast': poi
nter truncation from 'unsigned long *' to 'unsigned long' [C:\Users\username\
Projects\node.js\kerberos-test\node_modules\kerberos\build\kerberos.vcxproj]
..\lib\win32\wrappers\security_context.cc(612): warning C4302: 'type cast': tru
ncation from 'unsigned long *' to 'unsigned long' [C:\Users\username\Projects
\node.js\kerberos-test\node_modules\kerberos\build\kerberos.vcxproj]
base64.c
kerberos_sspi.c
Creating library C:\Users\username\Projects\node.js\kerberos-test\node_m
odules\kerberos\build\Release\kerberos.lib and object C:\Users\username\Pro
jects\node.js\kerberos-test\node_modules\kerberos\build\Release\kerberos.exp
Generating code
Finished generating code
kerberos.vcxproj -> C:\Users\username\Projects\node.js\kerberos-test\node_m
odules\kerberos\build\Release\\kerberos.node
kerberos.vcxproj -> C:\Users\username\Projects\node.js\kerberos-test\node_m
odules\kerberos\build\Release\kerberos.pdb (Full PDB)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN kerberos-test#1.0.0 No description
npm WARN kerberos-test#1.0.0 No repository field.
+ kerberos#0.0.24
+ mongodb#3.0.10
added 8 packages from 13 contributors and audited 8 packages in 22.648s
found 0 vulnerabilities
C:\Users\username\Projects\node.js\kerberos-test>
After copying the index.js file in from the other test project:
C:\Users\username\Projects\node.js\kerberos-test>node index.js
Error: Kerberos library is not installed
at SSPI.auth (C:\Users\username\Projects\node.js\kerberos-test\node_module
s\mongodb-core\lib\auth\sspi.js:58:41)
at authenticate (C:\Users\username\Projects\node.js\kerberos-test\node_mod
ules\mongodb-core\lib\connection\pool.js:244:17)
at authenticateLiveConnections (C:\Users\username\Projects\node.js\kerbero
s-test\node_modules\mongodb-core\lib\connection\pool.js:831:7)
at C:\Users\username\Projects\node.js\kerberos-test\node_modules\mongodb-c
ore\lib\connection\pool.js:876:5
at waitForLogout (C:\Users\username\Projects\node.js\kerberos-test\node_mo
dules\mongodb-core\lib\connection\pool.js:867:34)
at Pool.auth (C:\Users\username\Projects\node.js\kerberos-test\node_module
s\mongodb-core\lib\connection\pool.js:874:3)
at Server.auth (C:\Users\username\Projects\node.js\kerberos-test\node_modu
les\mongodb-core\lib\topologies\server.js:922:20)
at Server.auth (C:\Users\username\Projects\node.js\kerberos-test\node_modu
les\mongodb\lib\topologies\topology_base.js:379:30)
at authenticate (C:\Users\username\Projects\node.js\kerberos-test\node_mod
ules\mongodb\lib\authenticate.js:56:23)
at module.exports (C:\Users\username\Projects\node.js\kerberos-test\node_m
odules\mongodb\lib\authenticate.js:112:12)
C:\Users\username\Projects\node.js\kerberos-test>
After some digging around I found this in mongodb-core/lib/auth/sspi.js:
try {
Kerberos = require_optional('kerberos').Kerberos;
// Authentication process for Mongo
MongoAuthProcess = require_optional('kerberos').processes.MongoAuthProcess;
} catch (err) {} // eslint-disable-line
The problem is it silently catches the error and doesn't report anything. After placing console.log(err) in the catch, I saw the following error:
Error: optional dependency [kerberos] found but version [0.0.24] did not satisfy constraint [^0.0.23]
sspi.js:34
code:"OPTIONAL_MODULE_NOT_FOUND"
message:"optional dependency [kerberos] found but version [0.0.24] did not satisfy constraint [^0.0.23]"
stack:"Error: optional dependency [kerberos] found but version [0.0.24] did not satisfy constraint [^0.0.23]\n at require_optional (c:\Users\apolkousky\Projects\node.js\kerberos-test\node_modules\require_optional\index.js:109:19)\n at Object.<anonymous> (c:\Users\apolkousky\Projects\node.js\kerberos-test\node_modules\mongodb-core\lib\auth\sspi.js:29:14)\n at Module._compile (module.js:643:30)\n at Object.Module._extensions..js (module.js:654:10)\n at Module.load (module.js:556:32)\n at tryModuleLoad (module.js:499:12)\n at Function.Module._load (module.js:491:3)\n at Module.require (module.js:587:17)\n at require (internal/module.js:11:18)\n at Object.<anonymous> (c:\Users\apolkousky\Projects\node.js\kerberos-test\node_modules\mongodb-core\lib\connection\pool.js:25:10)"
__proto__:Object {constructor: , name: "Error", message: "", …}
Downgrading kerberos to version 0.0.23 solved the issue.

Hyperledger Composer - connection issue when using TLS

i'm having issues deploying composer on top of a multi org, multi peer network. My network has two CA's, one order and six peers (two per org).
The network uses TLS, which is giving me some issues. When running
composer network ping -n network2 -p org1 -i user -s pass
i am receiving SSL errors;
E0913 16:54:49.855499904 120141 ssl_transport_security.c:921] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0913 16:54:49.864638248 120141 ssl_transport_security.c:921] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0913 16:54:49.865108661 120141 ssl_transport_security.c:921] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
E0913 16:54:49.865506771 120141 ssl_transport_security.c:921] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed.
Error: Error trying to ping. Error: Error trying to query chaincode. Error: Connect Failed
Command failed
Here is my connection file;
{
"type": "hlfv1",
"name": "org1",
"orderers": [
{ "url" : "grpcs://localhost:7050",
"cert" : "-----BEGIN CERTIFICATE-----removed-----END CERTIFICATE-----\n"
}
],
"ca": { "url": "http://localhost:7054",
"name": "ca_peerOrg1",
"trustedRoots": [""],
"verify": true
},
"peers": [
{
"requestURL": "grpcs://localhost:7051",
"eventURL": "grpcs://localhost:7053",
"cert" : "-----BEGIN CERTIFICATE-----removed-----END CERTIFICATE-----\n"
},
{
"requestURL": "grpcs://localhost:8051",
"eventURL": "grpcs://localhost:8053",
"cert" : "-----BEGIN CERTIFICATE-----removed-----END CERTIFICATE-----\n"
}
],
"keyValStore": "/home/paul/.composer-credentials",
"channel": "mychannel",
"mspID": "Org1MSP",
"timeout": "300",
"globalcert": "",
"maxSendSize": -1,
"maxRecvSize": -1
}
The value of cert matches the contents of the .pem file used to start the CA (sh -c 'fabric-ca-server start --ca.certfile /etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem)
Any ideas how i get this working with TLS? none of the composer commands are working, they are all giving me the same errors
If you used cryptogen to generate your certificates then there will be tls folders for your organisations which will contain the public certificate you need to put into the connection profile. The certificate you use for the CA configuration is not the correct certificate to use.

Error keeps popping up: Configuration for rule "react/jsx-uses-react" is invalid

When I save any js file in Sublime text 3 the error pasted below keeps popping up.
I have tried a reinstall of eslint, eslint-plugin-import, eslint-config-airbnb, eslint-plugin-react, but no results.
any ideas?
error: Error: C:\Users\user_name\node_modules\eslint-config-airbnb\rules\react.js:
Configuration for rule "react/jsx-uses-react" is invalid:
Value "[object Object]" should NOT have more than 0 items.
Referenced from: C:\Users\user_name\node_modules\eslint-config-airbnb\index.js
Referenced from: C:\Users\user_name\.eslintrc
Error: C:\Users\user_name\node_modules\eslint-config-airbnb\rules\react.js:
Configuration for rule "react/jsx-uses-react" is invalid:
Value "[object Object]" should NOT have more than 0 items.
Referenced from: C:\Users\user_name\node_modules\eslint-config-airbnb\index.js
Referenced from: C:\Users\user_name\.eslintrc
at validateRuleOptions (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-validator.js:113:15)
at Object.keys.forEach.id (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-validator.js:153:9)
at Array.forEach (native)
at validateRules (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-validator.js:152:30)
at Object.validate (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-validator.js:230:5)
at loadFromDisk (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-file.js:549:19)
at load (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-file.js:592:20)
at configExtends.reduceRight.e (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-file.js:421:36)
at Array.reduceRight (native)
at applyExtends (C:\Users\user_name\Dev\node_modules\eslint\lib\config\config-file.js:403:28)
(node:11548) DeprecationWarning: [eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in C:\Users\user_name\node_modules\eslint-config-airbnb\rules\react.js)
I had this problem with Atom. You need to configure eslint to support jsx. Add this to your .eslintrc file. Particularly the parserOptions field! Make sure you have eslint-plugin-react installed properly as well.
eslint-plugin-react on github
{
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react"
],
}

Resources