A native abci-cli in tendermint works fine.
But this js-abci doesn't work as the document expects.
# case that work fine
tendermint version
v0.34.8
abci-cli version
0.17.0
abci-cli counter
tendermint init
tendermint start --proxy_app kvstore
abci-cli console
check_tx 0x00
code: OK
abci said:
I[2021-03-27|11:20:35.125] Accepted a new connection module=abci-server
I[2021-03-27|11:20:35.126] Waiting for new connection... module=abci-server
E[2021-03-27|11:20:38.014] Connection was closed by client module=abci-server
Ctrl+c
# case that don't work fine
# ( I also referred https://github.com/tendermint/js-abci/issues/38 )
node --version
v10.16.3
git clone https://github.com/tendermint/js-abci.git
cd js-abci/example/
npm install
cd ../
npm install
node example/counter.js
tendermint unsafe_reset_all
tendermint start --proxy_app kvstore
abci-cli console
check_tx 0x00
E[2021-03-27|11:25:08.260] Stopping abci.socketClient for error: unexpected *types.Response_BeginBlock when response to *types.Request_CheckTx expected module=abci-client
abci said:
events.js:174
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:788:14)
Emitted 'error' event at:
at Connection.error (/home/hirata/projects/cosmos/js-abci/src/connection.js:26:10)
at Socket.emit (events.js:198:13)
at errorOrDestroy (internal/streams/destroy.js:107:12)
at onwriteError (_stream_writable.js:436:5)
at onwrite (_stream_writable.js:461:5)
at _destroy (internal/streams/destroy.js:49:7)
at Socket._destroy (net.js:613:3)
at Socket.destroy (internal/streams/destroy.js:37:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:790:10)
What am I doing wrong?
Or could you tell me how it can be solved?
Thank you.
Now I was tracing a following step. https://docs.tendermint.com/master/app-dev/abci-cli.html#counter-another-example
A native abci-cli in tendermint works fine. But this js-abci doesn't work as the document expects.
What am I doing wrong? Or could you tell me how it can be solved? Thank you.