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

Ledger Nano S Plus not detected by gaiad #1573

Closed
5 tasks
felsd opened this issue Jul 4, 2022 · 6 comments · Fixed by #1575
Closed
5 tasks

Ledger Nano S Plus not detected by gaiad #1573

felsd opened this issue Jul 4, 2022 · 6 comments · Fixed by #1575

Comments

@felsd
Copy link

felsd commented Jul 4, 2022

Summary of Bug

gaiad with Ledger support is not detecting Ledger Nano S Plus. The device has the latest firmware, is unlocked and the Cosmos app opened. Ledger Live and Keplr are detecting the ledger and everything works fine there.

Version

build_tags: netgo ledger,
commit: 3b1758faeb0d86aeb495aa0bc9d2b45b8e0a8074
cosmos_sdk_version: v0.46.0-rc1.0.20220616181117-53d0cc919f1a
go: go version go1.18.3 linux/amd64
name: gaia
server_name: gaiad
version: main-3b1758faeb0d86aeb495aa0bc9d2b45b8e0a8074

Steps to Reproduce

git clone https://github.com/cosmos/gaia
cd gaia
make install
$GOPATH/bin/gaiad keys add ledger --ledger --keyring-backend file

Result:
Error: failed to generate ledger key: failed to retrieve device: ledger nano S: no ledger connected


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
  • Is a spike necessary to map out how the issue should be approached?
@julienrbrt
Copy link
Member

julienrbrt commented Jul 4, 2022

This can be related to this: cosmos/ledger-go#4

@felsd
Copy link
Author

felsd commented Jul 4, 2022

Thank you @julienrbrt, that looks promising.

I just tried to replace ledger-go in gaia by adding a replace rule in go.mod:

replace (
	github.com/cosmos/ledger-go => github.com/empowerchain/ledger-go v0.9.2
)

make install runs without an error, this is the output:

--> Ensure dependencies have not been modified
all modules verified
go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=gaia -X github.com/cosmos/cosmos-sdk/version.AppName=gaiad -X github.com/cosmos/cosmos-sdk/version.Version=main-23a5a293a5e53eaf08bc4c9f099b658ad1ead080 -X github.com/cosmos/cosmos-sdk/version.Commit=23a5a293a5e53eaf08bc4c9f099b658ad1ead080 -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger," -X github.com/tendermint/tendermint/version.TMCoreSemVer=v0.35.6 -w -s' -trimpath  ./...

I think it's not using the forked version though. How can I force gaia to use github.com/empowerchain/ledger-go?
I'm not very familiar with golang, sorry.

@julienrbrt
Copy link
Member

It does use the fork, but not with the right version: it uses a tag that does not contain the fix.
Try with github.com/cosmos/ledger-go => github.com/empowerchain/ledger-go v0.9.3-0.20220531092147-dab46ea76974 instead.

@felsd
Copy link
Author

felsd commented Jul 4, 2022

Thanks, it's working now.

@okwme
Copy link
Contributor

okwme commented Jul 5, 2022

Thanks for resolving this issue @julienrbrt !
@felsd can you confirm which version of gaia you're impacted by? are you working off of main or the v7.0.x family?

@felsd
Copy link
Author

felsd commented Jul 5, 2022

@okwme On the main branch.

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

Successfully merging a pull request may close this issue.

3 participants