Newman Error: Invalid Protocol : null - newman

I am getting a Invalid Protocol : null error when I run my postman collection via Newman.
Steps I have followed
Installed node js
Configured npm registry using
npm config set registry
Configured npm proxy using
npm config set proxy
4.installed Newman using npm install -g Newman
Tried to run a postman collection using
newman run
In the result I am getting an error saying
Invalid Protocol : null

Try to writing these commands in your console with your password and user of Windows:
**set HTTPS_proxy=youruser:yourpassword#ip of the proxy:port of the proxy
set HTTP_proxy=youuser:yourpassword#ip of the proxy:port of the proxy**
I hope it helps.

Related

Jenkins NPM private registry returns 401

Locally, I am able to successfully authorize and pull modules from my private Nexus registry (.npmrc file).
However on Jenkins I get
error An unexpected error occurred: "https://myprivaterepo.com/myprivatemodule.tgz: Request failed \"401 Unauthorized\"".
When I run npm whoami on Jenkins it returns a valid user. npm config ls prints valid configuration as well.
The problem started to occur when I changed myprivaterepo url (we've migrated it). Is there something I don't know (ie. I have to logout/login again or there's some cache in Jenkins)??
Thanks in advance!

ArgumentError: Missing required argument: clientId

while running bootstrap-flight-search-form-part-2 using command
npm run start
it gives error like
To run the project locally do the following steps:
Clone the repository
Install the dependencies with
npm install
Add your API key and API secret at app.js
const amadeus = new Amadeus({
clientId: 'YOUR_API_KEY',
clientSecret: 'YOUR_API_SECRET'
});
Start the server with
npm run start

Error: failed to request identity. Error trying to enroll user and return certificates

I am biginner in block chain development. I succesfully run ./startFabric.sh and ./createPeerAdminCard.sh .Then i succesfully run two command as follow below.
composer runtime install -c PeerAdmin#byfn-network-org1-only -n trade-network
composer runtime install -c PeerAdmin#byfn-network-org2-only -n trade-network
Then i tried to run
composer identity request -c PeerAdmin#byfn-network-org1-only -u admin -s adminpw -d alice
But i got error like the following
Error: failed to request identity. Error trying to enroll user and return certificates. Error: Calling enrollment endpoint failed with error [Error: connect ECONNREFUSED 127.0.0.1:7054]
I tried many time to kill all process in docker and remove .composer file from home directory. But always showing the same error message.
Please help me as possible
Os: Ubuntu 16.04
Fabric vertion:1.0.4
Composer vertion:0.16.6
Thanks..
This error "Failed to import the business network card Connection profile has no x-type property defined." means that a v0.20 client can't/won't import a card from an earlier version (probably v0.16).
I think maybe you are running the wrong version of createPeerAdminCard.sh script and it is trying to create and import an 'old' card.
With Composer v0.20 you need to get 'new' copies of the fabric-development-servers scripts which work with Fabric 1.2.
So I would suggest running the following:
run teardownAllDocker.sh script
remove the fabric-dev-server folder (might be fabric-tools if old)
remove the ~/.composer folder
follow the install doc from Step 4 . - make sure to export FABRIC_VERSION=hlfv12 - this is what makes sure you get Fabric 1.2.
This is difficult to help ...
The first 2 scripts you have run (./startFabric.sh and ./createPeerAdminCard.sh) are for a basic development Fabric.
The next 2 commands look like they are from the Multi-Org tutorial which uses a different Fabric and has different cards and crypto material.
Unless there is a particular reason for using an old version of Composer, I would suggest using Composer v0.20, which requires Fabric 1.2.
If you are a beginner I would suggest working with the Developer Tutorial to start with.
if you are using a default file (e.g. connection.json, env.json, etc.) to hold your base connnection profile, simply change the "type" term in that default file to "x-type"
In converting from v0.16 to v0.20, you must first remove the v0.16 composer tools from your system, then install the v0.20 version.
To remove v0.16.6:
npm uninstall -g composer-cli
npm uninstall -g generator-hyperledger-composer
npm uninstall -g composer-rest-server
To install V0.20.2:
npm install -g --python=python2.7 composer-cli#0.20.2
npm install -g --python=python2.7 generator-hyperledger-composer#0.20.2
npm install -g --python=python2.7 composer-rest-server#0.20.2
npm install -g --python=python2.7 yo
If you're running nodejs, then you also have to update both package.json files (network/package/json as well as your {base folder}package.json) from 0.16.x to ^0.20.2
The reason for error is Missing of Certificate Authorities(CA). I Just up my CA server. Now Working perfectly.

Yarn ignores proxy settings

I try to get a build job running using yarn and react-native on a windows 10 machine. The following commands are executed inside of jenkins to prepare the actual build of a native Windows app.
yarn config set proxy http://192.109.190.88:8080
yarn config set https-proxy http://192.109.190.88:8080
yarn add react-native
This leads to the following output although the proxy settings are correct (tried "http://192.109.190.88:8080/" as well):
yarn add v0.27.5
[1/4] Resolving packages...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
Any ideas on why this happens are well appreciated.
yarn version 2 requires a different variable name:
yarn config set httpProxy http://...
yarn config set httpsProxy http://...
Just follow this Link
https://yarnpkg.com/lang/en/docs/cli/config/
and remove the https-proxy and it worked for me.
I had the same issue and solved by following steps:
Run the following terminal command
npm cache clean --force
set http_proxy=
set https_proxy=
yarn config delete proxy
npm config rm https-proxy
npm config rm proxy
Restart your terminal
yarn
yarn –network-timeout 100000
Restart your terminal
it worked for me.

Start up Fabric Composer REST API server

I am trying to use the composer-rest-server package after completing the Fabric Composer quick start, but I failed.
Please give me a hint.
The composer-rest-server package was successfully installed.
npm install -g composer-rest-server
Composer-rest-server started.
composer-rest-server
I was asked to enter simple information about the business network.
After that, I failed to load the connector module 'composer-connector-hlf'.
? Enter your Fabric Connection Profile Name: defaultProfile 
? Enter your Business Network Identifier : digitalproperty-network
? Enter your Fabric username : WebAppAdmin
? Enter your secret: DJY27pEnl16d
? Specify if you want namespaces in the generated REST API: always use namespace
s
? Specify if you want the generated REST API to be secured: Yes
To restart the REST server using the same options, issue the following command:
composer-rest-server -p defaultProfile -n digitalproperty-network -i WebAppAdmin -s DJY27pEnl16d -N always -S true
Discovering types from business network definition ...
Connection fails: Error: Failed to load connector module "composer-connector-hlf" for connection profile "defaultProfile"
It will be retried for the next request.
Error: Failed to load connector module "composer-connector-hlf" for connection profile "defaultProfile"
at connectionProfileStore.load.then.e (/home/user1/.nvm/versions/node/v6.9.5/lib/node_modules/composer-rest-server/node_modules/composer-common/lib/connectionprofilemanager.js:148:27)
How can I solve the problem?
Your .composer-connection-profiles is not set to defaultprofile.
Check your root folder and there .composer-connection-profiles folder must be present.
Inside that folder the composer profiles will be there (if your defaultprofile is made, then there will be a folder named defaultprofile), check the connection.json inside the defaultprofile folder.
If there is any other folder with different name, use that as your profile. Or you can specifically define the folder defaultprofile and write connection.json with connection details.
Which version of npm are you using? I faced similar issue on ubuntu 16.4. When I retinstall evberything with lower version of npm it worked perfectly.
npm version when things worked:
npm --version
3.10.10
when I was getting problem as you have mentioned it was 5.x
Does your grpc module has grpc_node.node files?
It's in the composer-cli module.
In my environment
/usr/local/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/grpc_node.node
if you use sudo, you may need to add --unsafe-perm option.
Like: sudo npm install -g --unsafe-perm composer-cli

Resources