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

wasmcli does not works. #31

Closed
4 tasks
westaking opened this issue Jan 20, 2020 · 13 comments
Closed
4 tasks

wasmcli does not works. #31

westaking opened this issue Jan 20, 2020 · 13 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@westaking
Copy link
Contributor

westaking commented Jan 20, 2020

Summary of Bug

I can't generate a key with the wasmcli command.

Version

os : centos 7
git commit hash: ec7f996

$ wasmd version --long
name: wasm
server_name: wasmd
client_name: wasmcli
version: ""
commit: ec7f996
build_tags: netgo,ledger
go: go version go1.13.6 linux/amd64

Steps to Reproduce

$ wasmcli keys add validator

following this error:

panic: No such interface 'org.freedesktop.DBus.Properties' on object at path /

goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.writeInfo(0x13b2560, 0xc0003522a0, 0x7ffdbe8ea89d, 0x1, 0x13b25e0, 0xc00035a810)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keyring.go:444 +0x38c
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.writeLocalKey(0x13b2560, 0xc0003522a0, 0x7ffdbe8ea89d, 0x1, 0x13b0860, 0xc000b38480, 0x105d674, 0x8, 0xc000b38480, 0xf73380)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keyring.go:430 +0x132
github.com/cosmos/cosmos-sdk/crypto/keys.baseKeybase.persistDerivedKey(0x13a2e20, 0xc000162b50, 0xc00035e380, 0x40, 0x40, 0x105d674, 0x8, 0x7ffdbe8ea89d, 0x1, 0xc000c07a90, ...)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keybase_base.go:104 +0x155
github.com/cosmos/cosmos-sdk/crypto/keys.baseKeybase.Derive(0x13a2e20, 0xc000162b50, 0x7ffdbe8ea89d, 0x1, 0xc000368140, 0x91, 0x0, 0x0, 0x105d674, 0x8, ...)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keybase_base.go:178 +0x16d
github.com/cosmos/cosmos-sdk/crypto/keys.baseKeybase.CreateAccount(0x13a2e20, 0xc000162b50, 0x7ffdbe8ea89d, 0x1, 0xc000368140, 0x91, 0x0, 0x0, 0x105d674, 0x8, ...)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keybase_base.go:88 +0x127
github.com/cosmos/cosmos-sdk/crypto/keys.keyringKeybase.CreateAccount(...)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/crypto/keys/keyring.go:78
github.com/cosmos/cosmos-sdk/client/keys.runAddCmd(0xc000334280, 0xc00050eff0, 0x1, 0x1, 0x0, 0x0)
        /home/user777/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.34.4-0.20191114141721-d4c831e63ad3/client/keys/add.go:234 +0x91b
github.com/spf13/cobra.(*Command).execute(0xc000334280, 0xc00050efc0, 0x1, 0x1, 0xc000334280, 0xc00050efc0)
        /home/user777/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc000528500, 0xb9ee40, 0xc000528500, 0x1058d6c)
        /home/user777/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
        /home/user777/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/tendermint/tendermint/libs/cli.Executor.Execute(0xc000528500, 0x12549d0, 0x2, 0xc000b0d740)
        /home/user777/go/pkg/mod/github.com/tendermint/tendermint@v0.32.7/libs/cli/setup.go:89 +0x3c
main.main()
        /home/user777/wasmd/cmd/wasmcli/main.go:77 +0x5d5


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@ethanfrey
Copy link
Member

This code is straight from https://github.com/cosmos/cosmos-sdk.

Please file a bug with them about CentOS7 support. You can tag @alessio who probably knows more about the keyring keybase than anyone else on that team.

@ethanfrey ethanfrey added bug Something isn't working wontfix This will not be worked on labels Jan 20, 2020
@ethanfrey
Copy link
Member

Assigned "won't fix" as I cannot do anything until upstream support is added. Then I will just update the dependencies (so not closing it - please add a comment if anything changes)

@westaking
Copy link
Contributor Author

westaking commented Jan 20, 2020

In centos7, other platforms based on tendermint can generate keys without problems. However, wasmcli occurs an error on generating the key.

@ethanfrey
Copy link
Member

ethanfrey commented Jan 20, 2020

Tendermint works fine, as does wasmd aparently. The issue is the cosmos-sdk client-side library., which as of the recent master no longer uses a file system storage, but rather os-specific keyring. See cosmos/gaia#164 and cosmos/cosmos-sdk#5180 neither of which is in the 0.37 branch

To isolate the problem, can you please check out the current master branch of https://github.com/cosmos/gaia and make install. Then try the gaiacli keys add validator command (and all the other keys subcommands). If there is a bug, please log it on gaia and cosmos-sdk. If this works perfectly, I can look at it.

I am running on a very recent master, looking to tag to unreleased 0.38. This is much newer than most projects... recent cosmos hub upgrade was to 0.36. Some of the more adventurous projects are on 0.37.5 or so. I don't think anyone is running a net on master... I am waiting for the tagged release to do so as well.

@westaking
Copy link
Contributor Author

yep, it does not work in the gaia master branch as well. (cosmos-sdk v0.34.4)

@ethanfrey
Copy link
Member

cosmos-sdk v0.34.4 that is totally misleading tag (and has confused me many times). It is followed by a git commit, which you can search in cosmos-sdk for.

Can you please raise an issue on gaia and/or cosmos-sdk and link to this? Thank you

@westaking
Copy link
Contributor Author

If I build directly with cosmos-sdk v0.34.4, generating key with cli works fine.
I'm confused too.

@ethanfrey
Copy link
Member

This is due to confusing tagging in cosmos.

If you look at the gaia go.mod, we see:

github.com/cosmos/cosmos-sdk v0.34.4-0.20200110211037-214024431fbd

This is commit 214024431fbd from Jan 10, 2020, which is quite a bit newer than cosmos-sdk v0.34.4

You can also ask them to tag release on master, which would make the go.mod files more understandable. They had some reasoning for the current system to make internal processes better, but it does make it harder to external development.

@ethanfrey
Copy link
Member

Okay, I checked in with @alessio and there is a more recent PR that adds support for a file backend, which should work on more systems (like CentOS7 or Docker). cosmos/cosmos-sdk#5355

It was merged Dec 11, which is newer than the version of cosmos-sdk we are using now. When we update to the current master #15 this flag will be enabled, and we can try it out. Hopefully that will resolve the problem.

(#15 is high priority for the release I plan later this week)

@westaking
Copy link
Contributor Author

westaking commented Jan 22, 2020

It seems that keyring does not support headless server.

So I saw the following article and solved it.

https://ahelpme.com/linux/dbusexception-could-not-get-owner-of-name-org-freedesktop-secrets-no-such-name/

I got a hint from https://askubuntu.com/a/912250

On centos 7,
The keyring used by cosmos-sdk internally activates the gnome-keyring-daemon process.
When the wasmcli keys command is executed for the first time, an error occurs, but from the second run it works fine. However, the keyring console prompt appears TOO SLOW. It takes about 2 minutes.

You can reduce the time by making the following modifications.

$ sudo nano /usr/share/dbus-1/session.conf

# 120000 -> 1000
# <limit name = "service_start_timeout"> 120000 </ limit>
<limit name = "service_start_timeout"> 1000 </ limit>

@ethanfrey
Copy link
Member

I'm glad it worked.
Do you want to make a PR adding that link and a little text to the README?

I'd be glad to have your contribution.

@westaking
Copy link
Contributor Author

updated README.md #40

@ethanfrey
Copy link
Member

Closed by #40

loloicci pushed a commit to loloicci/wasmd that referenced this issue Apr 21, 2023
loloicci added a commit to loloicci/wasmd that referenced this issue Aug 19, 2024
…CosmWasm#53)

* build: replace line repositories with finschia repositories (CosmWasm#30)

* build: replace line repositories with finschia repositories

* Update x/wasmplus/README.md

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update x/wasm/ibc_reflect_test.go

Co-authored-by: zemyblue <zemyblue@gmail.com>

* Update .github/dependabot.yml

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* Update CHANGELOG.md

Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* docs: replace a comment contains line with finschia one

* build: replace line in Dockerfile with finschia

* docs: replace line in README.md with Finschia

* docs: update CHANGELOG

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>

* chore: update changelog for release v0.1.3 (CosmWasm#31)

* fix: stop wrap twice the response of handling non-plus wasm message in plus handler (CosmWasm#35)

* fix: stop wrap twice non-plus wasm hander's response

fix Finschia#33

* test: add tests handling non-plus wasm messages

* docs: add this PR to CHANGELOG.md

* fix: reflect golangci-lint

* fix: simplify how to handle the message in wasmplus

* chore: update notice (CosmWasm#44)

* chore: update notice

* chore: update changelog

* fix: delete unnecessary test (CosmWasm#43)

* fix: delete unnecessary test

* docs: add CHANGELOG

* feat: add admin-related events (CosmWasm#46)

* add admin-related events in docs
* fix ClearAdmin event
* cherry-pick upstream admin-related events update

* chore: update changelog for release v0.1.4 (CosmWasm#49)

* build: update depending wasmvm to v1.1.1-0.11.2-dynamiclink2 and update tests

---------

Co-authored-by: zemyblue <zemyblue@gmail.com>
Co-authored-by: jaeseung-bae <119839167+jaeseung-bae@users.noreply.github.com>
Co-authored-by: Daisuke Iuchi <42408108+da1suk8@users.noreply.github.com>
Co-authored-by: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants