Version issues with connecting to hyperledger fabric

#1

Hi,
I am trying to connect 0.19.5 node-red to hyperledger fabric 1.2.1 or above.

Getting connection errors such as:

[error] [hyperledger-composer-in:composer in admin@carauction-network] Error: Error trying to ping. Error: Composer runtime (0.20.6) is not compatible with client (0.19.19)

~/.node-red/node_modules$ npm list -g --depth=0
/home/spfarquhar/.nvm/versions/node/v8.15.0/lib
├── composer-cli@0.20.6
├── composer-playground@0.20.6
├── composer-rest-server@0.20.6
├── generator-hyperledger-composer@0.20.6
├── npm@6.4.1
└── yo@2.0.5

I have tried setting FABRIC_VERSION is set to 'hlfv1' and
FABRIC_VERSION is set to 'hlfv12' but without success.

I have tried to downgrade the composer tools to
├── composer-cli@0.20.6
├── composer-playground@0.19.19
├── composer-rest-server@0.19.9
├── generator-hyperledger-composer@0.20.6
├── npm@6.4.1
└── yo@2.0.5

I can't downgrade composer-cli@0.19.19 as this creates issues with the fabric samples that are online.

My node-red config is

21 Jan 13:52:07 - [info] Node-RED version: v0.19.5
21 Jan 13:52:07 - [info] Node.js version: v8.15.0
21 Jan 13:52:07 - [info] Linux 4.15.0-43-generic x64 LE

using nodes: node-red-contrib-hyperledger-composer, using the car-auction fabric samples.

Can anyone please help me to connect to hyperledger fabric 1.2.1?

Note: upgrading to Node-RED version: v0.20.0-beta.3 still gives:
[error] [hyperledger-composer-in:composer in admin@carauction-network] Error: Error trying to ping. Error: Composer runtime (0.20.6) is not compatible with client (0.19.19)

0 Likes

#2

I Have same issue with Node-Red:
/home/adminpv/.nvm/versions/node/v8.15.0/lib
├── composer-cli@0.20.6
├── composer-playground@0.20.6
├── composer-rest-server@0.20.6
├── generator-hyperledger-composer@0.20.6
├── node-red@0.19.5
├── npm@6.4.1
└── yo@2.0.5

In the past I've found a workaround but I don't remember it today :frowning:

0 Likes

#3

I found the issue and solved the problem.

First the issue...

All the npm-packages below were still at v19.19 and this is what node-red was complaining about. Even though the main composer packages where updated to @latest (0.26.0)

npm list > npmlist.txt
username@host:~/.node-red/node_modules$ grep 0.19.19 npmlist.txt
│ ├─┬ composer-admin@0.19.19
│ │ ├── composer-common@0.19.19 deduped
│ │ ├─┬ composer-connector-hlfv1@0.19.19
│ │ ├─┬ composer-connector-proxy@0.19.19
│ │ ├─┬ composer-wallet-filesystem@0.19.19
│ │ │ ├── composer-common@0.19.19 deduped
│ │ └─┬ composer-wallet-inmemory@0.19.19
│ │ └── composer-common@0.19.19 deduped
│ ├─┬ composer-client@0.19.19
│ │ ├── composer-common@0.19.19 deduped
│ │ ├── composer-connector-hlfv1@0.19.19 deduped
│ │ ├── composer-connector-proxy@0.19.19 deduped
│ │ ├── composer-wallet-filesystem@0.19.19 deduped
│ │ ├── composer-wallet-inmemory@0.19.19 deduped
│ ├─┬ composer-common@0.19.19

npm i -g composer-admin@latest
npm i -g composer-common@latest
npm i -g composer-connector-hlfv1@latest
npm i -g composer-connector-proxy@latest
npm i -g composer-wallet-filesystem@latest
npm i -g composer-wallet-inmemory@latest
npm i -g composer-client@latest

This still failed.

I then removed them.

npm uninstall -g composer-admin composer-client composer-common composer-connector-hlfv1 composer-connector-proxy composer-wallet-filesystem composer-wallet-inmemory

I then thought, what the heck, try installing them locally.

/home/username/node_modules

npm i composer-admin@latest
npm i composer-common@latest
npm i composer-connector-hlfv1@latest
npm i composer-connector-proxy@latest
npm i composer-wallet-filesystem@latest
npm i composer-wallet-inmemory@latest
npm i composer-client@latest
(all 0.20.6)

THIS WORKED _ NODE-RED WRITES TO HL. So installing them locally allow node-red to write a new participate record to hyperledger fabric 1.2.1 (hlfv12)

username@host:~/node_modules$ grep composer npmlistFINAL.txt
├─┬ composer-admin@0.20.6
│ ├── composer-common@0.20.6 deduped
│ ├── composer-connector-hlfv1@0.20.6 deduped
│ ├── composer-connector-proxy@0.20.6 deduped
│ ├── composer-wallet-filesystem@0.20.6 deduped
│ └── composer-wallet-inmemory@0.20.6 deduped
├─┬ composer-client@0.20.6
│ ├── composer-common@0.20.6 deduped
│ ├── composer-connector-hlfv1@0.20.6 deduped
│ ├── composer-connector-proxy@0.20.6 deduped
│ ├── composer-wallet-filesystem@0.20.6 deduped
│ ├── composer-wallet-inmemory@0.20.6 deduped
├─┬ composer-common@0.20.6
├─┬ composer-connector-hlfv1@0.20.6
├─┬ composer-connector-proxy@0.20.6
├─┬ composer-wallet-filesystem@0.20.6
│ ├── composer-common@0.20.6 deduped
└─┬ composer-wallet-inmemory@0.20.6
└── composer-common@0.20.6 deduped

0 Likes

#4

Sorry ... to better understand ... For Fabric1.3.0 I have to do:
npm uninstall -g composer-admin composer-client composer-common composer-connector-hlfv1 composer-connector-proxy composer-wallet-filesystem composer-wallet-inmemory

npm i composer-admin@latest
npm i composer-common@latest
npm i composer-connector-hlfv1@latest
npm i composer-connector-proxy@latest
npm i composer-wallet-filesystem@latest
npm i composer-wallet-inmemory@latest
npm i composer-client@latest

0 Likes

#5

I would do the following first...

npm list > npmlist.txt
$ grep 0.19.19 npmlist.txt

To see what versions it returns. If there are still npm packages at v0.19.0 then yes, do the commands that you list above. i.e. remove and install the packages locally (I did it in the .node_red folder). At the time of writing the @latest is 0.26.0.

Please let me know how you got on.

0 Likes

#6

It's seems no:
/home/adminpv/.nvm/versions/node/v8.15.0/lib
├─┬ composer-cli@0.20.6
│ ├── ajv@6.1.1
│ ├── chalk@1.1.3
│ ├── cli-table@0.3.1
│ ├── composer-admin@0.20.6
│ ├── composer-client@0.20.6
│ ├── composer-common@0.20.6
│ ├── composer-documentation@0.20.6
│ ├── composer-report@0.20.6
│ ├── composer-wallet-filesystem@0.20.6
│ ├── composer-wallet-inmemory@0.20.6
│ ├── js-yaml@3.10.0
│ ├── mkdirp@0.5.1
│ ├── moment@2.19.3
│ ├── node-report@2.2.1
│ ├── npm-paths@0.1.3
│ ├── nunjucks@3.0.1
│ ├── ora@1.2.0
│ ├── prettyjson@1.2.1
│ ├── prompt@1.0.0
│ ├── sanitize-filename@1.6.1
│ ├── tar@4.3.0
│ ├── valid-url@1.0.9
│ └── yargs@10.0.3
├─┬ composer-playground@0.20.6
│ ├── cheerio@0.22.0
│ ├── composer-common@0.20.6
│ ├── composer-playground-api@0.20.6
│ ├── composer-wallet-filesystem@0.20.6
│ ├── composer-wallet-inmemory@0.20.6
│ ├── express@4.15.2
│ ├── is-docker@1.1.0
│ ├── opener@1.4.2
│ └── yargs@10.0.3
├─┬ composer-rest-server@0.20.6
│ ├── body-parser@1.17.0
│ ├── clui@0.3.1
│ ├── composer-admin@0.20.6
│ ├── composer-common@0.20.6
│ ├── composer-wallet-filesystem@0.20.6
│ ├── composer-wallet-inmemory@0.20.6
│ ├── compression@1.7.3
│ ├── connect-ensure-login@0.1.1
│ ├── cookie-parser@1.4.3
│ ├── cors@2.5.2
│ ├── express-flash@0.0.2
│ ├── express-session@1.15.1
│ ├── formidable@1.1.1
│ ├── helmet@1.3.0
│ ├── inquirer@3.3.0
│ ├── lodash@4.17.11
│ ├── loopback@3.4.0
│ ├── loopback-boot@2.25.0
│ ├── loopback-component-explorer@5.2.0
│ ├── loopback-component-passport@3.2.0
│ ├── loopback-connector-composer@0.20.6
│ ├── loopback-datasource-juggler@3.24.1
│ ├── passport-local@1.0.0
│ ├── pug@2.0.0
│ ├── serve-favicon@2.5.0
│ ├── strong-error-handler@1.0.1
│ ├── touch@1.0.0
│ ├── ws@3.3.3
│ └── yargs@10.0.3
├─┬ generator-hyperledger-composer@0.20.6
│ ├── composer-client@0.20.6
│ ├── composer-common@0.20.6
│ ├── shelljs@0.7.7
│ ├── underscore.string@3.3.4
│ ├── yeoman-generator@0.24.1
│ └── yeoman-option-or-prompt@2.0.0
├─┬ node-red@0.19.5
│ ├── ajv@6.5.4
│ ├── basic-auth@2.0.1
│ ├── bcrypt@2.0.1
│ ├── bcryptjs@2.4.3
│ ├── body-parser@1.18.3
│ ├── cheerio@0.22.0
│ ├── clone@2.1.2
│ ├── cookie@0.3.1
│ ├── cookie-parser@1.4.3
│ ├── cors@2.8.4
│ ├── cron@1.5.0
│ ├── denque@1.3.0
│ ├── express@4.16.4
│ ├── express-session@1.15.6
│ ├── fs-extra@5.0.0
│ ├── fs.notify@0.0.4
│ ├── hash-sum@1.0.2
│ ├── https-proxy-agent@2.2.1
│ ├── i18next@11.6.0
│ ├── is-utf8@0.2.1
│ ├── js-yaml@3.12.0
│ ├── json-stringify-safe@5.0.1
│ ├── jsonata@1.5.4
│ ├── media-typer@0.3.0
│ ├── memorystore@1.6.0
│ ├── mqtt@2.18.8
│ ├── multer@1.4.1
│ ├── mustache@2.3.2
│ ├── node-red-node-email@0.1.29
│ ├── node-red-node-feedparser@0.1.14
│ ├── node-red-node-rbe@0.2.4
│ ├── node-red-node-twitter@1.1.4
│ ├── nopt@4.0.1
│ ├── oauth2orize@1.11.0
│ ├── on-headers@1.0.1
│ ├── passport@0.4.0
│ ├── passport-http-bearer@1.0.1
│ ├── passport-oauth2-client-password@0.1.2
│ ├── raw-body@2.3.3
│ ├── request@2.88.0
│ ├── semver@5.6.0
│ ├── sentiment@2.1.0
│ ├── uglify-js@3.4.9
│ ├── when@3.7.8
│ ├── ws@1.1.5
│ └── xml2js@0.4.19
├─┬ npm@6.4.1
│ ├── abbrev@1.1.1
│ ├── ansicolors@0.3.2
│ ├── ansistyles@0.1.3
│ ├── aproba@1.2.0
│ ├── archy@1.0.0
│ ├── bin-links@1.1.2
│ ├── bluebird@3.5.1
│ ├── byte-size@4.0.3
│ ├── cacache@11.2.0
│ ├── call-limit@1.1.0
│ ├── chownr@1.0.1
│ ├── ci-info@1.4.0
│ ├── cli-columns@3.1.2
│ ├── cli-table3@0.5.0
│ ├── cmd-shim@2.0.2
│ ├── columnify@1.5.4
│ ├── config-chain@1.1.11
│ ├── debuglog@1.0.1
│ ├── detect-indent@5.0.0
│ ├── detect-newline@2.1.0
│ ├── dezalgo@1.0.3
│ ├── editor@1.0.0
│ ├── figgy-pudding@3.4.1
│ ├── find-npm-prefix@1.0.2
│ ├── fs-vacuum@1.2.10
│ ├── fs-write-stream-atomic@1.0.10
│ ├── gentle-fs@2.0.1
│ ├── glob@7.1.2
│ ├── graceful-fs@4.1.11
│ ├── has-unicode@2.0.1
│ ├── hosted-git-info@2.7.1
│ ├── iferr@1.0.2
│ ├── imurmurhash@0.1.4
│ ├── inflight@1.0.6
│ ├── inherits@2.0.3
│ ├── ini@1.3.5
│ ├── init-package-json@1.10.3
│ ├── is-cidr@2.0.6
│ ├── json-parse-better-errors@1.0.2
│ ├── JSONStream@1.3.4
│ ├── lazy-property@1.0.0
│ ├── libcipm@2.0.2
│ ├── libnpmhook@4.0.1
│ ├── libnpx@10.2.0
│ ├── lock-verify@2.0.2
│ ├── lockfile@1.0.4
│ ├── lodash._baseindexof@3.1.0
│ ├── lodash._baseuniq@4.6.0
│ ├── lodash._bindcallback@3.0.1
│ ├── lodash._cacheindexof@3.0.2
│ ├── lodash._createcache@3.1.2
│ ├── lodash._getnative@3.9.1
│ ├── lodash.clonedeep@4.5.0
│ ├── lodash.restparam@3.6.1
│ ├── lodash.union@4.6.0
│ ├── lodash.uniq@4.5.0
│ ├── lodash.without@4.4.0
│ ├── lru-cache@4.1.3
│ ├── meant@1.0.1
│ ├── mississippi@3.0.0
│ ├── mkdirp@0.5.1
│ ├── move-concurrently@1.0.1
│ ├── node-gyp@3.8.0
│ ├── nopt@4.0.1
│ ├── normalize-package-data@2.4.0
│ ├── npm-audit-report@1.3.1
│ ├── npm-cache-filename@1.0.2
│ ├── npm-install-checks@3.0.0
│ ├── npm-lifecycle@2.1.0
│ ├── npm-package-arg@6.1.0
│ ├── npm-packlist@1.1.11
│ ├── npm-pick-manifest@2.1.0
│ ├── npm-profile@3.0.2
│ ├── npm-registry-client@8.6.0
│ ├── npm-registry-fetch@1.1.0
│ ├── npm-user-validate@1.0.0
│ ├── npmlog@4.1.2
│ ├── once@1.4.0
│ ├── opener@1.5.0
│ ├── osenv@0.1.5
│ ├── pacote@8.1.6
│ ├── path-is-inside@1.0.2
│ ├── promise-inflight@1.0.1
│ ├── qrcode-terminal@0.12.0
│ ├── query-string@6.1.0
│ ├── qw@1.0.1
│ ├── read@1.0.7
│ ├── read-cmd-shim@1.0.1
│ ├── read-installed@4.0.3
│ ├── read-package-json@2.0.13
│ ├── read-package-tree@5.2.1
│ ├── readable-stream@2.3.6
│ ├── readdir-scoped-modules@1.0.2
│ ├── request@2.88.0
│ ├── retry@0.12.0
│ ├── rimraf@2.6.2
│ ├── safe-buffer@5.1.2
│ ├── semver@5.5.0
│ ├── sha@2.0.1
│ ├── slide@1.1.6
│ ├── sorted-object@2.0.1
│ ├── sorted-union-stream@2.1.3
│ ├── ssri@6.0.0
│ ├── stringify-package@1.0.0
│ ├── tar@4.4.6
│ ├── text-table@0.2.0
│ ├── tiny-relative-date@1.3.0
│ ├── uid-number@0.0.6
│ ├── umask@1.1.0
│ ├── unique-filename@1.1.0
│ ├── unpipe@1.0.0
│ ├── update-notifier@2.5.0
│ ├── uuid@3.3.2
│ ├── validate-npm-package-license@3.0.4
│ ├── validate-npm-package-name@3.0.0
│ ├── which@1.3.1
│ ├── worker-farm@1.6.0
│ └── write-file-atomic@2.3.0
└─┬ yo@2.0.5
├── async@2.6.1
├── chalk@2.4.2
├── cli-list@0.2.0
├── configstore@3.1.2
├── cross-spawn@6.0.5
├── figures@2.0.0
├── fullname@3.3.0
├── global-tunnel-ng@2.7.1
├── got@8.3.2
├── humanize-string@1.0.2
├── inquirer@6.2.1
├── insight@0.10.1
├── lodash@4.17.11
├── meow@3.7.0
├── npm-keyword@5.0.0
├── opn@5.4.0
├── package-json@5.0.0
├── parse-help@1.0.0
├── read-pkg-up@4.0.0
├── root-check@1.0.0
├── sort-on@3.0.0
├── string-length@2.0.0
├── tabtab@1.3.2
├── titleize@1.0.1
├── update-notifier@2.5.0
├── user-home@2.0.0
├── yeoman-character@1.1.0
├── yeoman-doctor@3.0.3
├── yeoman-environment@2.3.4
└── yosay@2.0.2

0 Likes

#7

All your packages are the latest version. What node-red connection error are you getting?

0 Likes

#8

Thanks.
The issue is:
"Error: creating resource error Error trying to ping. Error: Composer runtime (0.20.6) is not compatible with client (0.19.19)"
I'm using node-red component: node-red-contrib-composer
:slight_smile:

0 Likes

#9

Hi, try removing all the composer* npm packages. Then go into your node_modules directory and "rm -R composer*". Most admin's will gasp with using rm -R but that is all i know how to do it.

Then reinstall.
If this still fails, go into each package.json and look for version numbers starting 0.19.0 for each package sub-directory under the node_modules folder.

0 Likes

#10

Have you opened an issue on the nodes github page to inform the authors of the issue you had and how you fixed it?

0 Likes

#11

I got hit with this issue again using the latest 0.20.6 composer packages.

Delete all versions of composer* npm packages - both global and under ~/.node-red/node_modules
Check for other composer* packages using:
npm list | grep composer
Under ~/.node-red/node_modules/node-red-contrib-composer, edit the package.json file.
Change the following 3 lines:

"dependencies": {
"composer-admin": "^0.19.0-0",
"composer-client": "^0.19.0-0",
"composer-common": "^0.19.0-0",

to

"dependencies": {
"composer-admin": "^0.20.0-0",
"composer-client": "^0.20.0-0",
"composer-common": "^0.20.0-0",

Save file

Change folder to:

~/.node-red/node_modules/node-red-contrib-composer/node_modules

rm -R composer*

Then go back to folder:

~/.node-red/node_modules

Then re-install the npm composer* packages locally.

npm i composer-admin@latest
npm i composer-common@latest
npm i composer-connector-hlfv1@latest
npm i composer-connector-proxy@latest
npm i composer-wallet-filesystem@latest
npm i composer-wallet-inmemory@latest
npm i composer-client@latest

(v0.20.8 as of 2nd April 2019)

Re-run npm list

~/.node-red/node_modules$ npm list | grep composer
├─┬ composer-admin@0.20.8
│ ├── composer-common@0.20.8 deduped
│ ├── composer-connector-hlfv1@0.20.8 deduped
│ ├── composer-connector-proxy@0.20.8 deduped
│ ├── composer-wallet-filesystem@0.20.8 deduped
│ └── composer-wallet-inmemory@0.20.8 deduped
├─┬ composer-client@0.20.8
│ ├── composer-common@0.20.8 deduped
│ ├── composer-connector-hlfv1@0.20.8 deduped
│ ├── composer-connector-proxy@0.20.8 deduped
│ ├── composer-wallet-filesystem@0.20.8 deduped
│ ├── composer-wallet-inmemory@0.20.8 deduped
├─┬ composer-common@0.20.8
├─┬ composer-connector-hlfv1@0.20.8
├─┬ composer-connector-proxy@0.20.8
├─┬ composer-wallet-filesystem@0.20.8
│ ├── composer-common@0.20.8 deduped
├─┬ composer-wallet-inmemory@0.20.8
│ └── composer-common@0.20.8 deduped
├─┬ node-red-contrib-composer@0.0.13
│ ├─┬ composer-admin@0.20.8
│ │ ├── composer-common@0.20.8 deduped
│ │ ├── composer-connector-hlfv1@0.20.8 deduped
│ │ ├── composer-connector-proxy@0.20.8 deduped
│ │ ├── composer-wallet-filesystem@0.20.8 deduped
│ │ └── composer-wallet-inmemory@0.20.8 deduped
│ ├── composer-client@0.20.8 deduped
│ ├─┬ composer-common@0.20.8

Check that all packages are the same latest version and there are no older 0.19.x versions.

0 Likes