eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

Not getting chain_id in eos.getInfo({})

Open isha-padalia opened this issue 8 years ago • 4 comments

image

And also getting warning "WARN: chainId mismatch, signatures will not match transaction authority. expected cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f !== actual undefined".

I am using code shown below:

eos = Eos({ httpEndpoint: 'http://127.0.0.1:8888', chainId: "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f", sign: true, authorization: "eosio", keyProvider: "5JT4LZDq5HGzfSeQPYBb74rLbrhef2KBrXFtG3g4Sb9ZkGEgAms" })

isha-padalia avatar Jun 07 '18 08:06 isha-padalia

Check the version table in the README. Ideally upgrade nodeosd and eosjs to the latest versions. The get_info API call did not include chainId until recently.

jcalfee avatar Jun 07 '18 09:06 jcalfee

screenshot from 2018-06-08 10-28-09

Got chain_id by re-cloning and rebuilding EOS v1.0.1.

actual problem was the version of EOS. chain_id not included in other old version of EOS as @jcalfee said.

isha-padalia avatar Jun 08 '18 05:06 isha-padalia

@isha-padalia I've used EOS v1.0.1 in Docker. But there is no chain_id when i tried to get infor. Do you use Docker?

$ cleos get info
{
  "server_version": "19227c9b",
  "head_block_num": 2164,
  "last_irreversible_block_num": 2163,
  "head_block_id": "00000874c0c465a43ac5e7327b7ce3e0fc3d36796f81d7750a6db2b6164db06d",
  "head_block_time": "2018-06-16T04:07:04",
  "head_block_producer": "eosio"
}

quocle108 avatar Jun 16 '18 04:06 quocle108

I've solved this issue. For the docker, we should get the last image by command: docker pull eosio/eos:latest

quocle108 avatar Jun 16 '18 04:06 quocle108