Ledger error APDU_CODE_CLA_NOT_SUPPORTED
danbryan opened this issue · 10 comments
Can anyone help me understand why i am getting this error?
➜ ~ cargo version
cargo 1.61.0
➜ ~ cargo install tmkms --features=ledger
➜ ~ tmkms init .
➜ ~ cat tmkms.toml
[[providers.ledgertm]]
chain_ids = ["theta-testnet-001"]
[[validator]]
chain_id = "theta-testnet-001"
addr = "tcp://localhost:26658"
secret_key = "/home/socket/secrets/kms-identity.key"
protocol_version = "legacy"
reconnect = true
➜ ~ tmkms start
2022-06-11T17:47:40.793074Z INFO tmkms::commands::start: tmkms 0.12.0 starting up...
The application panicked (crashed).
Message: called Result::unwrap()
on an Err
value: Ledger(Apdu("[APDU_CODE_CLA_NOT_SUPPORTED] Class not supported"))
Location: /home/socket/.cargo/registry/src/github.com-1ecc6299db9ec823/tmkms-0.12.0/src/keyring/providers/ledgertm/signer.rs:40
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
➜ ~ RUST_BACKTRACE=1 tmkms start
2022-06-11T17:51:30.922089Z INFO tmkms::commands::start: tmkms 0.12.0 starting up...
The application panicked (crashed).
Message: called Result::unwrap()
on an Err
value: Ledger(Apdu("[APDU_CODE_CLA_NOT_SUPPORTED] Class not supported"))
Location: /home/socket/.cargo/registry/src/github.com-1ecc6299db9ec823/tmkms-0.12.0/src/keyring/providers/ledgertm/signer.rs:40
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 7 frames hidden ⋮
8: tmkms::keyring::providers::ledgertm::signer::<impl core::convert::From<&tmkms::keyring::providers::ledgertm::signer::Ed25519LedgerTmAppSigner> for ed25519_dalek::public::PublicKey>::from::h1c5ee8d3514861ef
at :
9: tmkms::keyring::providers::ledgertm::init::h9ecd220b46c540f2
at :
10: tmkms::chain::load_config::h6b1d89976d3aa046
at :
11: <tmkms::commands::start::StartCommand as abscissa_core::runnable::Runnable>::run::hb259537534e809b5
at :
12: abscissa_core::application::Application::run::ha0bf292f92c39aa2
at :
13: abscissa_core::application::boot::h15f1bdd67d42ee2e
at :
14: tmkms::main::h7c4819f94ac414a4
at :
15: std::sys_common::backtrace::__rust_begin_short_backtrace::h0ab56b7fd3500f73
at :
16: std::rt::lang_start::{{closure}}::h869f3a5e4f261876
at :
17: core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::hff1d360addf0e0a5
at /rustc/1.61.0/library/core/src/ops/function.rs:259
18: std::panicking::try::do_call::haaf1332f62982d76
at /rustc/1.61.0/library/std/src/panicking.rs:492
19: std::panicking::try::hb1a5ffffc51ce834
at /rustc/1.61.0/library/std/src/panicking.rs:456
20: std::panic::catch_unwind::h8b3ba16b791f0a1a
at /rustc/1.61.0/library/std/src/panic.rs:137
21: std::rt::lang_start_internal::{{closure}}::hc3bf7d68bdc46579
at /rustc/1.61.0/library/std/src/rt.rs:128
22: std::panicking::try::do_call::hb9549501a638587d
at /rustc/1.61.0/library/std/src/panicking.rs:492
23: std::panicking::try::h56ce4741a577b244
at /rustc/1.61.0/library/std/src/panicking.rs:456
24: std::panic::catch_unwind::he844618d24ada429
at /rustc/1.61.0/library/std/src/panic.rs:137
25: std::rt::lang_start_internal::h63ec520e87e83a8d
at /rustc/1.61.0/library/std/src/rt.rs:128
26: main
at :
27: __libc_start_main
at :
28: _start
at /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
We don't directly maintain the Ledger backend: it's a 3rd party contribution.
I'd suggest filing an issue here: https://github.com/zondax/ledger-rs
Thanks, here is the link incase anyone is curious to track.
Zondax/ledger-rs#101
I'v been told that i was using the wrong app.
[becominginsane](https://github.com/becominginsane) commented [yesterday](https://github.com/Zondax/ledger-rs/issues/101#issuecomment-1158429976) •
The app that TMKMS is looking for is the tendermint-validator app which is not the cosmos app. The error you encountered can happen when the app open on the ledger is different from the expected one, like in your case.
Each app has a code that they respond to, in this case cosmos responds to 0x55 and the tendermint-validator app responds to 0x56.
anyone here ever got a ledger nano x to work with tmkms?
Also, can anyone here tell me where to install the tendermint-validator from? I don't see it listed in ledger live, i only see the cosmos app (55), not the tendermint validator app (56).
[becominginsane](https://github.com/becominginsane) commented [5 minutes ago](https://github.com/Zondax/ledger-rs/issues/101#issuecomment-1159358883) •
We are not in charge of telling you how to retrieve the app you a looking for, I suggest you ask the TMKMS team where to retrieve the app, which is probably gonna be in the ledger live store with a specific provider id.
If you have more questions I'd also suggest you reach out to ledger on their discord, but the repo you linked appears to be right, but unless specifically stated otherwise officially, you shouldn't build the app yourself and sideload it on your own, but rather get it from the store.
Have you enabled developer mode in your Ledger Live settings?
@danbryan sorry, seems I sent you to the wrong repo. The correct one is here, I believe:
https://github.com/tendermint/ledger-validator-app
I am not sure who to ping specifically about ownership of it, however (ostensibly) we are not the owners (and generally wouldn't recommend it if only for a lack of maintenance).
does the validator app only work for the nano s, not the nano x?
That's entirely possible.
Also per Zondax/ledger-rs#101 everything seems to be working on the TMKMS side of things, so I'm going to go ahead and close this issue.