How can I proceed run task on API Connect(IBM Bluemix)? - ibm-cloud

I'm in the tutorial of Bank A.
http://www.ibm.com/support/knowledgecenter/SSMNED_5.0.0/com.ibm.apic.toolkit.doc/tutorial_cli_api_def_working.html%23topic_qdj_dtb_gv?cp=SSMNED_5.0.0&lang=en
In API Designer(the part of IBM API Connect),I clicked the "run" button.
There is error about loading module.
How Can I fix this issue?
Then, I got the following output.
$ apic edit
Express server listening on http://127.0.0.1:9000
Unhandled rejection Error: Service manager failed to start. Please review > /home/sugai/.apiconnect/strong-pm/start.log for details.
at ChildProcess. (/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-pm/lib/start/pm.js:122:23)
at ChildProcess.g (events.js:260:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
at Process.onexit (/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-edit/node_modules/apim-ui/node_modules/loopback-workspace/node_modules/loopback/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)
Reviewed the log file. There is following output.
https://gist.github.com/hokkai7go/ee0d453a60e60e1ab9109a851edae0c4

Related

Error: Failed to start debug session! in vscode-ros with ROS Melodic

I am trying to debug a ROS node inside VSCode but it seems that the debugger is not working. Please see below screen recordings:
Attaching a running node
Launching nodes
I noticed that attaching a node is requesting authentication. But after providing the correct password, nothing happens. Similarly, the launching nodes show processes for a second but die/disappear immediately.
Below is the version related information:
Visual Studio Code v1.74.3
VSCode-ROS Extension v0.8.4
ROS Melodic
GCC v7.5.0
Python v2.7.17
Ubuntu OS v18.04.6 LTS
Ubuntu OS Kenel v5.4.0-137-generic
The developer tools are showing following following error:
[Extension Host] rejected promise not handled within 1 second: Error: Failed to start debug session!
[Extension Host] stack trace: Error: Failed to start debug session!
at LaunchResolver.<anonymous> (/home/ravi/.vscode/extensions/ms-iot.vscode-ros-0.8.4/out/src/debugger/configuration/resolvers/ros1/launch.js:310:32)
at Generator.next (<anonymous>)
at fulfilled (/home/ravi/.vscode/extensions/ms-iot.vscode-ros-0.8.4/out/src/debugger/configuration/resolvers/ros1/launch.js:7:58)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
Please see a screenshot below:

How do I fix this error when creating a candy machine with metaplex?

I am following this tutorial "https://www.youtube.com/watch?v=4LLx7SMAOag&t=446s" and at 9:28 he tells us to input this
ts-node js/packages/cli/src/candy-machine-cli.ts upload ./assets --env devnet --keypair ~/config/solana/devnet-test.json
His result is an initialized candy machine as shown in the video. Mine is the following:
Beginning the upload for 150 (png+json) pairs
started at: 1634300753134
wallet public key: GLCNNSs9QA1YqxkY6Ptq3pb6UZrkRbwGw7ZUGeJK1CCg
(node:6434) UnhandledPromiseRejectionWarning: Error: failed to get info about
account 63N3bBDCVVzdCaofQAnY5s4kcZodw1evomptDgNQ4feK: FetchError: request to https://api.devnet.solana.com/ failed, reason: connect ENETUNREACH 128.0.113.156:443
at Connection.getAccountInfo (/Users/hectorbardales/Desktop/metaplex/js/node_modules/#solana/web3.js/src/connection.ts:2404:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Function.fetchIdl
(/Users/hectorbardales/Desktop/metaplex/js/node_modules/#project-serum/anchor/src/program/index.ts:309:25)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6434) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6434) [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 do I do to fix this? (I'm running this in visual studio code on a Mac)
Here's what I did for example
ts-node ./js/packages/cli/src/candy-machine-v2-cli.ts upload \
-e devnet \
-k ./js/cm.devnet.json \
-cp ./js/config.json \
-c temp \
./js/assets-pictures
I made sure the path was clear and direct to each file, make sure for -k its path is to the file created when you did your keygen.
If you haven't, perhaps try airdropping 10 SOLs into that wallet address listed above? But do 5 first, then 5 again.
I can't remember what error I got, but I did have issues with that line.
Command for airdropping Sol is simple. Solana Airdrop x (x is your SOL amount).
Idk, worth a shot.
ENETUNREACH is a connection-related error. Even if you are able to browse the web or do other things, the best option is to test again with a new internet connection.

IBM Cloud App ID' s custom identity flow:InternalOAuthError occurs

I use IBM Cloud App ID' and I want to use LinkedIn as a provider.
However, "InternalOAuthError" occurs at the time of app approving.
There is a sample on the IBM Cloud blog.
Sign In Your App Users With Any Identity Provider Using App ID
I tried the sample app along this flow. Login to LinkedIn seems to have succeeded, but the following error occurred when app was approved.
InternalOAuthError: failed to fetch user profile
at _oauth2.get (C:\xxx\AppIdCustomIdentity\node_modules\passport-linkedin-oauth2\lib\oauth2.js:70:23)
at passBackControl (C:\xxx\AppIdCustomIdentity\node_modules\oauth\lib\oauth2.js:132:9)
at IncomingMessage.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Please help!!
When I tried this post,"InternalOAuthError" no longer occurs.
But another error has occurred.
Error: Failed to obtain tokens
at Request.request [as _callback] (C:\xxx\AppIdCustomIdentity\node_modules\ibmcloud-appid\lib\token-manager\token-manager.js:118:13)
at Request.self.callback (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:1161:10)
at Request.emit (events.js:182:13)
at IncomingMessage.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
As suggested in this post (https://stackoverflow.com/a/56329029/10422503), looks like the passport-linkedin-oauth2 library has not been updated for the LinkedIn 2.0 APIs. Try using the fork suggested there
Looking at the stack trace it looks like the exception is coming from passport-linkedin-oauth2 module.
at _oauth2.get (C:\xxx\AppIdCustomIdentity\node_modules\passport-linkedin-oauth2\lib\oauth2.js:70:23)
Googling for InternalOAuthError: failed to fetch user profile +linkedin gives a few options you might want to try.

Error while using persistent datasource using mongodb ini hyperledger composer

I am trying to use persistent datasource using mongoDB in hyperledger composer on a UBUNTU droplet
but after starting the rest server and den after issuing a command docker logs -f rest i am getting the following error(i have provided a link to the image)
webuser#ubuntu16:~$ docker logs -f rest
[2018-08-29T12:38:31.278Z] PM2 log: Launching in no daemon mode
[2018-08-29T12:38:31.351Z] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-08-29T12:38:31.359Z] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
(node:15) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
Connection fails: Error: Error trying to ping. Error: Failed to connect before the deadline
It will be retried for the next request.
Exception: Error: Error trying to ping. Error: Failed to connect before the deadline
Error: Error trying to ping. Error: Failed to connect before the deadline
at _checkRuntimeVersions.then.catch (/home/composer/.npm-global/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:806:34)
at <anonymous>
[2018-08-29T12:38:41.021Z] PM2 log: App [composer-rest-server] with id [0] and pid [15], exited with code [1] via signal [SIGINT]
[2018-08-29T12:38:41.024Z] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-08-29T12:38:41.028Z] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
(node:40) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
Connection fails: Error: Error trying to ping. Error: Failed to connect before the deadline
It will be retried for the next request.
I don't understand what is the problem and what wrong I am doing because I have followed all the steps in the hyperledger composer document with success....
Is it because I am using it on ubuntu droplet....?? anyone help
EDIT
I followed all the steps mentioned in this tutorial
but instead of using google authentication i am using github authentication.
Also i have changed my local host to the ip of my ubuntu droplet in connection.json file and also in this command
sed -e 's/localhost:7051/peer0.org1.example.com:7051/' -e 's/localhost:7053/peer0.org1.example.com:7053/' -e 's/localhost:7054/ca.org1.example.com:7054/' -e 's/localhost:7050/orderer.example.com:7050/' < $HOME/.composer/cards/restadmin#trade-network/connection.json > /tmp/connection.json && cp -p /tmp/connection.json $HOME/.composer/cards/restadmin#trade-network/
bt yet with no success! i get the following error now.....
webuser#ubuntu16:~$ docker logs rest
[2018-08-30T05:03:02.916Z] PM2 log: Launching in no daemon mode
[2018-08-30T05:03:02.989Z] PM2 log: Starting execution sequence in -fork mode- for app name:composer-rest-server id:0
[2018-08-30T05:03:02.997Z] PM2 log: App name:composer-rest-server id:0 online
WARNING: NODE_APP_INSTANCE value of '0' did not match any instance config file names.
WARNING: See https://github.com/lorenwest/node-config/wiki/Strict-Mode
Discovering types from business network definition ...
(node:15) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
Discovering the Returning Transactions..
Discovered types from business network definition
Generating schemas for all types in business network definition ...
Generated schemas for all types in business network definition
Adding schemas for all types to Loopback ...
Added schemas for all types to Loopback
SyntaxError: Unexpected string in JSON at position 92
at JSON.parse ()
at Promise.then (/home/composer/.npm-global/lib/node_modules/composer-rest-server/server/server.js:141:34)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[2018-08-30T05:03:09.942Z] PM2 log: App [composer-rest-server] with id [0] and pid [15], exited with code 1 via signal [SIGINT]
This error Error trying to ping. Error: Failed to connect before the deadline means that the composer-rest-server in the container cannot see/connect to the underlying Fabric at the URLs in the connection.json of the card that you are using to start the REST server.
There are a number of reasons why:
The Fabric is not started
You are using a Business Network Card that has localhost in the URLs of the connection.json, and localhost just re-directs back into the rest container.
Your rest container is started on a different Docker network bridge to your Fabric containers and cannot connect to the Fabric.
Have you followed this tutorial in the Composer documentation? If followed completely it will avoid the 3 problems mentioned above.

start a new project in IONIC error

i want to start a new project in IONIC with this command "ionic start myApps tabs" but i get this error :
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz) × Downloading - failed! Error: unable to verify the first certificate at Error (native) at TLSSocket. (_tls_wrap.js:1092:38) at emitNone (events.js:86:13) at TLSSocket.emit (events.js:185:7) at TLSSocket._finishInit (_tls_wrap.js:610:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:440:38)
please help me to solve it
Be sure that you have the latest node, cordova and ionic cli updates.
Try to stop all server instances. I mean stop the localhost:8080 server.