EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

cleos wallet list always empty #2989

Closed scientistnik closed 6 years ago

scientistnik commented 6 years ago

I run all https://github.com/EOSIO/eos/tree/master/Docker But when I create default wallet, I try import key:

"/opt/eosio/bin/keosd" launched
Error 3120002: Nonexistent wallet
Public key should be encoded in base58 and starts with EOS prefix
Error Details:
Wallet not found: default

When I try watch wallet list:

"/opt/eosio/bin/keosd" launched
Wallets:
[]

After that cleos wallet create again:

"/opt/eosio/bin/keosd" launched
Error 3120001: Wallet already exists
Name should be less than 13 characters and only contains the following symbol .12345abcdefghijklmnopqrstuvwxyz
Error Details:
Wallet with name: 'default' already exists at /root/eosio-wallet/./default.wallet
BinaryFocus commented 6 years ago

I'm not 100% sure this will help but you may want to try this docker image and then read the page on wallets that I created. I'm not sure it'll solve your problem but it may give you a different perspective and hopefully help you.

https://www.eosdocs.io/dappdevelopment/software/docker/ https://www.eosdocs.io/dappdevelopment/wallets/

scientistnik commented 6 years ago

if start alias how:

alias cleos='docker-compose exec keosd /opt/eosio/bin/cleos --wallet-url http://localhost:8888'

wallet create and show

andriyha commented 6 years ago

But with your alias when I try: cleos set contract eosio /contracts/eosio.bios -p eosio i get such error: Reading WAST/WASM from /contracts/eosio.bios/eosio.bios.wasm... Using already assembled WASM... Publishing contract... Error 3110001: Missing Chain API Plugin Error Details: Chain API plugin is not enabled

itinance commented 6 years ago

Same happens to me.

I follow all steps to build the docker container following the official docs, and also run cleos with the following alias:

alias cleos='docker-compose exec keosd /opt/eosio/bin/cleos -u http://nodeosd:8888'

This happens then:

After creating a wallet

$ cleos wallet create
"/opt/eosio/bin/keosd" launched
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5KdkDAnhZmChM*****************************"

it will be gone afterwards:

hagen at Hagens-MBP-4 in /data/workspace/eos/Docker on master
$ cleos wallet list
"/opt/eosio/bin/keosd" launched
Wallets:
[]

But recreating the wallet again with "cleos wallet create" gives: "wallet already exists"

andriyha commented 6 years ago

With such alias everything is very wonderful alias cleos='docker-compose exec keosd /opt/eosio/bin/cleos -u http://nodeosd:8888 --wallet-url http://localhost:8888'

itinance commented 6 years ago

@scientistnik It seems that you need to unlock the account first in order to get it listet!

> cleos unlock -n default
> Password: xxxxxxxxxxxx
> Unlocked: default

Then:

> cleos wallet list
Wallets:
[
   "default *"
]
sergmetelin commented 6 years ago

In 4.0 keosd is run automatically by cleos. However, currently cleos doesn't seem to recognize nodeos running a wallet.

itinance commented 6 years ago

As stated in the docs:

Something that can be a little confusing is that wallets that are not “open” are not listed when using the “list” command. Here’s an example:

sergmetelin commented 6 years ago

opening/unlocking the wallet doesn't fix it as well.

gleehokie commented 6 years ago

I tried to recreate this but was not able to. Here's what I did:

  1. Build from master (I used commit 6b4c6fe70eddab59962681617337e5f5f9e38d14)
  2. Install (cd build && sudo make install)
  3. Run nodeos (nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin)
  4. Create wallet (cleos wallet create) and note the wallet password
  5. List wallet (cleos wallet list)
  6. Lock wallet (cleos wallet lock)
  7. Unlock wallet (cleos wallet unlock --password xxxxxxxxx) where xxxxxxxxx is the wallet password
glee-mbp:eosio-wallet greg$ cleos wallet create
"/usr/local/bin/keosd" launched
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"xxxxxxxxx"
glee-mbp:eosio-wallet greg$ cleos wallet lock
Locked: default
glee-mbp:eosio-wallet greg$ cleos wallet unlock --password xxxxxxxxx
Unlocked: default
glee-mbp:eosio-wallet greg$ cleos wallet list
Wallets:
[
  "default *"
]
glee-mbp:eosio-wallet greg$ cleos wallet lock
Locked: default
glee-mbp:eosio-wallet greg$ cleos wallet list
Wallets:
[
  "default"
]
glee-mbp:eosio-wallet greg$

Note that I built my executables, I did not do this using the Docker container.

v1nc3ntlaw commented 6 years ago

Stuck couple hours with same problem followed by https://github.com/EOSIO/eos/wiki/Local-Environment#start-both-nodeos-and-keosd-containers

I tried this one works well. https://github.com/EOSIO/eos/issues/2989#issuecomment-389158223 May related with new options message.

Host and port options (-H, --wallet-host, etc.) have been replaced with -u/--url and --wallet-url Use for example -u http://localhost:8888 or --url https://example.invalid/

Thanks for save my day.

gleehokie commented 6 years ago

Related to #3105

ericiles commented 6 years ago

The documentation has been updated to reflect the solution to this issue.

GoodbyePlanet commented 6 years ago

I had the same issue, I created a wallet and when I restart nodeos wallet list was empty. I resolve it with cleos wallet open command. It appears that you first need to open wallet so you can use it.

yhuag commented 5 years ago

As @GodbayPlanet stated, you might need to open the wallet before seeing it.

cleos wallet open

And, you can view the wallet in the list:

cleos wallet list

Otherwise, since you cannot remove & rename any wallet on the eosio chain, you may want to create a new wallet with a new specific name:

cleos wallet create --to-console -n THE_NAME_OF_WALLET

When you finished using the wallet and want to store it somewhere (e.g. like your main key-pair) and may retrieve it back in the near future, you can transfer the ownership to the main key-pair:

cleos set account permission ACCOUNT_NAME owner THE_MAIN_PUBLIC_KEY_THAT_STORES_YOUR_WALLETS -p ACCOUNT_NAME@owner