STD Exception encountered while processing chain.get_code: unknown key
when I run node pingPong.js , error occured! details are as followed!
api error => { message: 'unknown key',
file: 'http_plugin.cpp',
line_number: 371,
method: 'handle_exception' } http://127.0.0.1:8888/v1/chain/get_code {"account_name":"child.acnt"}
{ Error: {"code":500,"message":"Internal Service Error","error":{"code":0,"name":"exception","what":"unspecified","details":[{"message":"unknown key","file":"http_plugin.cpp","line_number":371,"method":"handle_exception"}]}}
at /Users/changlingyi/node_modules/eosjs/node_modules/eosjs-api/lib/apigen.js:115:23
at STD Exception encountered while processing chain.get_code: unknown key in red color.
Here is content of pingPong.js
let EOS = require('eosjs')
eos = EOS.Localnet({ keyProvider:['5KQVzEFg4PbDNtCbdhbfgwfaqQYPNzhjna3ZCm5AzrFZCpeoccg','5KcHE3HF4zAecKWFxBiizG3KBPpkBxbbMDAn1HPeHQZecy69bZy'], httpEndpoint:'http://127.0.0.1:8888' })
eos.contract('child.acnt').then((contract) => { contract.ping("child.acnt",{authorization:['child.acnt']}).then((res) => { console.log(res) }) }) I think the problem may be in keyProvider.but '5KQVzEFg4PbDNtCbdhbfgwfaqQYPNzhjna3ZCm5AzrFZCpeoccg','5KcHE3HF4zAecKWFxBiizG3KBPpkBxbbMDAn1HPeHQZecy69bZy' is owner_private_key and active_private_key of child.acnt.
i'm stuck with the same issue
edit ~/Library/Application Support/eosio/nodeos/config/config.ini, cancel comment and add ` Specify the Access-Control-Allow-Origin to be returned on each request. (eosio::http_plugin)
access-control-allow-origin = *
Specify the Access-Control-Allow-Headers to be returned on each request. (eosio::http_plugin)
access-control-allow-headers = * ` ,error may be different
I'm stuck with this as well...
Can you provide the detail steps to reproduce this issue. Normally "unknown key" is because the account is not found.
Hi:
Why is this Closed? I'm stuck with the Same Issue, tried doing what @lingyiliu016 says here: https://github.com/EOSIO/eos/issues/3588#issuecomment-393084126
But NO RESULT...
Can Anyone help me out?
me too