Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet.list_keys() bad_cast_exception #3

Closed
ajose01 opened this issue Aug 16, 2018 · 2 comments
Closed

Wallet.list_keys() bad_cast_exception #3

ajose01 opened this issue Aug 16, 2018 · 2 comments

Comments

@ajose01
Copy link

ajose01 commented Aug 16, 2018

Function returns a bad_cast_exception.

iex(phoenix@127.0.0.1)14> EOSRPC.Wallet.list_keys
{:error,
 %Tesla.Env{
   __client__: %Tesla.Client{fun: nil, post: [], pre: []},
   __module__: EOSRPC,
   body: %{
     "code" => 500,
     "error" => %{
       "code" => 7,
       "details" => [],
       "name" => "bad_cast_exception",
       "what" => "Bad Cast"
     },
     "message" => "Internal Service Error"
   },
   headers: [
     {"connection", "close"},
     {"server", "WebSocket++/0.7.0"},
     {"content-length", "125"},
     {"content-type", "application/json"}
   ],
   method: :get,
   opts: [],
   query: [],
   status: 500,
   url: "http://172.17.0.3:8888/v1/wallet/list_keys"
 }}

Logs from keosd:

2018-08-16T18:54:44.573 thread-0   http_plugin.cpp:475           handle_exception     ] FC Exception encountered while processing wallet.list_keys
2018-08-16T18:54:44.573 thread-0   http_plugin.cpp:476           handle_exception     ] Exception Details: 7 bad_cast_exception: Bad Cast
Invalid cast from object_type to Array
    {"type":"object_type"}
    thread-0  variant.cpp:535 get_array

.get_public_keys however works fine.

iex(phoenix@127.0.0.1)15> EOSRPC.Wallet.get_public_keys
{:ok,
 ["EOS5k6D6ehXScY9HHnRx9VhA1hkqvQyNcyMM9JQAdcrr7qi3kTUxT",
  "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV"]}
@lucca65
Copy link
Member

lucca65 commented Aug 17, 2018

The exception seems to be coming directly from keos. Are you being able to get your keys by running cleos wallet private_keys?

@lucca65
Copy link
Member

lucca65 commented Aug 24, 2018

It will cast a exception like this (that is now helpful at all) if you don't have the wallet_api_plugin installed. You can always use cleos to check those stuff out.

A common mistake would be not configuring the endpoints correctly, in many configurations nodeos and keosd don't run at the same port.

I will be closing this issue as its EOS related, but you can use this if you need further assistance

@lucca65 lucca65 closed this as completed Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants