Unable to connect the Botium client with Google DialogFlow - npm-install

Installed npm via mac terminal.
Installed botium client with npm command : npm install -g botium-cli
As directed in this tutorial :
Also have got allocated one DialogFlow instance and other details with project configuration as directed in the above linked tutorial.
Error I am getting while establishing the connection between botium client and DialogFlow :
Auth error:Error: error:0906D06C:PEM routines:PEM_read_bio:no start
line (node:25129) UnhandledPromiseRejectionWarning: Error: Cannot send
message to dialogflow container: { Error: 14 UNAVAILABLE: Getting
metadata from plugin failed with error: error:0906D06C:PEM
routines:PEM_read_bio:no start line
at Object.exports.createStatusError (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/common.js:87:15)
at Object.onReceiveStatus (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:1188:28)
at InterceptingListener._callNext (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:564:42)
at InterceptingListener.onReceiveStatus (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:614:8)
at callback (/usr/local/lib/node_modules/botium-cli/node_modules/grpc/src/client_interceptors.js:841:24)
code: 14, metadata: Metadata { _internal_repr: {} }, details:
'Getting metadata from plugin failed with error: error:0906D06C:PEM
routines:PEM_read_bio:no start line' }
at /usr/local/lib/node_modules/botium-cli/node_modules/botium-connector-dialogflow/dist/botium-connector-dialogflow-cjs.js:222:14
(node:25129) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 12) (node:25129) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
If you need, there is also link to botium client
Can anyone help me here with the connection establishment and get going !

Same error was coming in my case when I was trying to connect botium to dialogue flow.
In my case DIALOGFLOW_PRIVATE_KEY was incorrect. Please check it, if it is starting with
------BEGIN PRIVATE KEY-----
and ends with
\n-----END PRIVATE KEY-----\n
This solved my issue:)

Related

How to resolve "cannot pipe" issue with testcafe-hammerhead

When running tests, I'm getting the following error:
1 Unhandled promise rejection:
Error: Cannot pipe, not readable
at new NodeError (node:internal/errors:387:5)
at ServerResponse.pipe (node:_http_outgoing:1070:22)
at respondOnWebSocket (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\websocket.js:56:9)
at Array.decideOnProcessingStrategy (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\stages.js:77:48)
at run (D:\e2e\0.0.157\node_modules\testcafe\node_modules\testcafe-hammerhead\lib\request-pipeline\index.js:20:34)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Does anyone have a suggestion on how to resolve this?
See future updates related to this issue in this GitHub thread.

Hyperledger Fabric error: "TLS: bad certificate server" when installing chaincode

I'm just starting learning HLF, and I have an error while following tutorial from the docs: link
I downloaded fabric-samples using this command (replaced bit.ly link with the destination):
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 2.2.2 1.4.9
I run logspout in one terminal and try to execute peer lifecycle chaincode install basic.tar.gz in another one, and this is the result i get
Error: failed to retrieve endorser client for install: endorser client
failed to connect to localhost:7051: failed to create new connection:
context deadline exceeded
Log presented by Logspout:
peer0.org1.example.com|2022-03-15 13:03:24.452 UTC [core.comm]
ServerHandshake -> ERRO 04a Server TLS handshake failed in 2.650245ms
with error remote error: tls: bad certificate server=PeerServer
remoteaddress=172.22.0.1:61126
I set the envs in terminal as instructed in the docs, and I checked that CORE_PEER_TLS_ROOTCERT_FILE variable points to an existing file. The content of the file is the same as on the container.
What I tried to do:
download fabric-samples again and redo all the setup with copy-pasting the commands directly from docs
Do you have any suggestions where I can look for an issue?
I resolved the problem, I was using peer version 2.2.1 from previous experiments, it probably collided with FABRIC_CFG_PATH

CypressError: `cy.visit()` failed trying to load: https://dev-eccc.env.xxxx.com/ via Gitlab CI job

I have setup a Gitlab ci/cd job to execute all cypress integration tests. I found that all tests are getting fail due to home URL is getting failed to load by cy.visit().
On my local machine it is working fine.
below is the complete Error trace:
CypressError: `cy.visit()` failed trying to load:
https://dev-eccc.env.ihsmarkit.com/
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
> Error: getaddrinfo ENOTFOUND dev-eccc.env.ihsmarkit.com
Common situations why this would fail:
- you don't have internet access
- you forgot to run / boot your web server
- your web server isn't accessible
- you have weird network configuration settings on your computer
Because this error occurred during a `before all` hook we are skipping the remaining tests in the current suite: `Facility Register`
at http://localhost:45271/__cypress/runner/cypress_runner.js:156433:23
at visitFailedByErr (http://localhost:45271/__cypress/runner/cypress_runner.js:155794:12)
at http://localhost:45271/__cypress/runner/cypress_runner.js:156432:11
at tryCatcher (http://localhost:45271/__cypress/runner/cypress_runner.js:10130:23)
at Promise._settlePromiseFromHandler (http://localhost:45271/__cypress/runner/cypress_runner.js:8065:31)
at Promise._settlePromise (http://localhost:45271/__cypress/runner/cypress_runner.js:8122:18)
at Promise._settlePromise0 (http://localhost:45271/__cypress/runner/cypress_runner.js:8167:10)
at Promise._settlePromises (http://localhost:45271/__cypress/runner/cypress_runner.js:8243:18)
at _drainQueueStep (http://localhost:45271/__cypress/runner/cypress_runner.js:4837:12)
at _drainQueue (http://localhost:45271/__cypress/runner/cypress_runner.js:4830:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues
(http://localhost:45271/__cypress/runner/cypress_runner.js:4846:5)
at Async.drainQueues (http://localhost:45271/__cypress/runner/cypress_runner.js:4716:14)
From Your Spec Code:
at Object.homepage_test (http://localhost:45271/__cypress/tests?p=cypress/integration/eccc-
app-ui-cypress/API/register_api.ts:71:8)
at Context.eval (http://localhost:45271/__cypress/tests?p=cypress/integration/eccc-app-ui-
cypress/API/register_api.ts:13:25)
From Node.js Internals:
Error: getaddrinfo ENOTFOUND dev-eccc.env.ihsmarkit.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)

Import json Swagger to insomnia

I'm trying to import a Json file from Swagger to insomnia. To do that I use this project from NPM (I'm not familiar with NPM):
https://www.npmjs.com/package/insomnia-importers
I have npm v6.5.0 and node v11.9.0
To do that I run this command: insomnia-import /path/to/swagger-export.json > insomnia-export.json:
(node:38053) UnhandledPromiseRejectionWarning: TypeError: Cannot
convert undefined or null to object
at Function.keys ()
at object (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:300:14)
at generateParameterExample (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:332:12)
at Object.keys.forEach.propertyName (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:301:33)
at Array.forEach ()
at object (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:300:31)
at generateParameterExample (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:332:12)
at prepareBody (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:242:37)
at importRequest (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:173:11)
at tags.forEach (/Users/user/.nvm/versions/node/v11.9.0/lib/node_modules/insomnia-importers/src/importers/swagger2.js:129:21)
(node:38053) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 1) (node:38053) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
What is the problem here?
Insomnia maintainer here.
Insomnia uses the insomnia-import package internally so you don't have to. You can import your Swagger file directly into Insomnia and it will import it.

Node.js/ webpack/ getaddrinfo looking for internet when not needed, why?

I've got an issue with a machine that's supposed to be able to run offline.
I can pull the cable after my application is running, but during unplugged start I get the following error:
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:443
May 6 23:04:50 myco serve[4121]: at Object._errnoException (util.js:1022:11)
May 6 23:04:50 myco serve[4121]: at errnoException (dns.js:55:15)
May 6 23:04:50 myco serve[4121]: at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
May 6 23:04:50 myco serve[4121]: (node:4121) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
May 6 23:04:50 myco serve[4121]: (node:4121) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It appears that dns.js is part of webpack/node-libs-browser but thats as far as I can seem to figure out.... I can't find GetAddrInfoReqWrap anywhere in my source tree, or getaddrinfo for that matter. Searching around there's a lot of info with people getting similar errors when deliberately trying to use npm, but thats not what I'm doing. I should have everything I need already on the machine.
Apparently this is a problem with serve.
Serve >6.5.3 apparently has an issue where it tries to contact the registry. Downgrade of serve to 6.5.3 solves this particular issue.
this is documented in https://github.com/zeit/serve/issues/348
not sure why serve would need to contact the registry.
noafterglow is right, but just for reference, rolling back to version 6.5.3 of serve can be accomplished with
npm install -g serve#6.5.3
Source: this post
I ran into exactly this error when trying to serve a VueJs app from a different VM from where the code was developed originally.
The file vue.config.js read :
module.exports = {
devServer: {
host: 'tstvm01',
port: 3030,
},
};
When served on the original machine the start up output is :
App running at:
- Local: http://tstvm01:3030/
- Network: http://tstvm01:3030/
Using the same settings on a VM tstvm07 got me a very similar error to the one the OP describes:
INFO Starting development server...
10% building modules 1/1 modules 0 activeevents.js:183
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN
at Object._errnoException (util.js:1022:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
If it ain't already obvious, changing vue.config.js to read ...
module.exports = {
devServer: {
host: 'tstvm07',
port: 3030,
},
};
... solved the problem.