From 3308653918fa1162d93b376abea2e76af181c867 Mon Sep 17 00:00:00 2001 From: Elliot Cameron <3noch@users.noreply.github.com> Date: Fri, 18 Jan 2019 14:00:15 -0500 Subject: [PATCH 1/3] Add fix for error 191 on macOS to troubleshooting in README --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 32fba886..d1a7f751 100644 --- a/README.md +++ b/README.md @@ -1012,6 +1012,40 @@ If the Ledger Nano S app crashes when you load it, there are two primary causes: * Out of date firmware: If the Ledger Nano S app doesn't work at all, make sure you are running firmware version 1.5.5. +### Error 191 on macOS + +If you get an error from `tezos-client` that looks like + +``` +client.signer.ledger: APDU level error: Unexpected sequence number (expected 0, got 191) +``` + +then your installation of `tezos-client` was built with an older version of HIDAPI that doesn't work well with macOS (see [#30](https://github.com/obsidiansystems/ledger-app-tezos/issues/30)). + +To fix this you need to get the yet-unreleased fixes from the [HIDAPI library](https://github.com/signal11/hidapi) and rebuilt `tezos-client`. + +If you got HIDAPI from Homebrew, you can update to the `master` branch of HIDAPI like this: + +```shell +$ brew install hidapi --HEAD +``` + +The full rebuild of tezos-client with HIDAPI's `master` branch looks like: + +```shell +$ brew unlink hidapi # remove the current one +$ brew install autoconf autmake libtool # Just keep installing stuff until the following command succeeds: +$ brew install hidapi --HEAD +``` + +Then rebuild `ocaml-hidapi` with Tezos, so in the `tezos` repository: + +```shell +$ opam reinstall hidapi +$ make all build-test +$ ./tezos-client list connected ledgers # should now work consistently +``` + ### Contact Us You can email us at tezos@obsidian.systems and request to join our Slack. We have several channels about baking and one specifically for our Ledger Nano S apps. From f1a563d8acff8cfdc1f9228d6cf414683db0d6c5 Mon Sep 17 00:00:00 2001 From: Elliot Cameron <3noch@users.noreply.github.com> Date: Fri, 18 Jan 2019 14:02:32 -0500 Subject: [PATCH 2/3] Fix typos --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d1a7f751..fc60ce87 100644 --- a/README.md +++ b/README.md @@ -1022,7 +1022,7 @@ client.signer.ledger: APDU level error: Unexpected sequence number (expected 0, then your installation of `tezos-client` was built with an older version of HIDAPI that doesn't work well with macOS (see [#30](https://github.com/obsidiansystems/ledger-app-tezos/issues/30)). -To fix this you need to get the yet-unreleased fixes from the [HIDAPI library](https://github.com/signal11/hidapi) and rebuilt `tezos-client`. +To fix this you need to get the yet-unreleased fixes from the [HIDAPI library](https://github.com/signal11/hidapi) and rebuild `tezos-client`. If you got HIDAPI from Homebrew, you can update to the `master` branch of HIDAPI like this: @@ -1030,7 +1030,7 @@ If you got HIDAPI from Homebrew, you can update to the `master` branch of HIDAPI $ brew install hidapi --HEAD ``` -The full rebuild of tezos-client with HIDAPI's `master` branch looks like: +The full rebuild of `tezos-client` with HIDAPI's `master` branch looks like: ```shell $ brew unlink hidapi # remove the current one @@ -1038,7 +1038,7 @@ $ brew install autoconf autmake libtool # Just keep installing stuff until the $ brew install hidapi --HEAD ``` -Then rebuild `ocaml-hidapi` with Tezos, so in the `tezos` repository: +Then rebuild `ocaml-hidapi` with Tezos. In the `tezos` repository: ```shell $ opam reinstall hidapi From b549039d25c7f5d5b17094d80509cca506c5c289 Mon Sep 17 00:00:00 2001 From: Elliot Cameron <3noch@users.noreply.github.com> Date: Tue, 22 Jan 2019 14:46:30 -0500 Subject: [PATCH 3/3] Reword some things; add clarity to 191 error --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fc60ce87..66dd9369 100644 --- a/README.md +++ b/README.md @@ -1012,9 +1012,9 @@ If the Ledger Nano S app crashes when you load it, there are two primary causes: * Out of date firmware: If the Ledger Nano S app doesn't work at all, make sure you are running firmware version 1.5.5. -### Error 191 on macOS +### Error "Unexpected sequence number (expected 0, got 191)" on macOS -If you get an error from `tezos-client` that looks like +If `tezos-client` on macOS intermittently fails with an error that looks like ``` client.signer.ledger: APDU level error: Unexpected sequence number (expected 0, got 191) @@ -1030,7 +1030,7 @@ If you got HIDAPI from Homebrew, you can update to the `master` branch of HIDAPI $ brew install hidapi --HEAD ``` -The full rebuild of `tezos-client` with HIDAPI's `master` branch looks like: +Then start a full rebuild of `tezos-client` with HIDAPI's `master` branch: ```shell $ brew unlink hidapi # remove the current one @@ -1038,7 +1038,7 @@ $ brew install autoconf autmake libtool # Just keep installing stuff until the $ brew install hidapi --HEAD ``` -Then rebuild `ocaml-hidapi` with Tezos. In the `tezos` repository: +Finally, rebuild `ocaml-hidapi` with Tezos. In the `tezos` repository: ```shell $ opam reinstall hidapi @@ -1046,6 +1046,8 @@ $ make all build-test $ ./tezos-client list connected ledgers # should now work consistently ``` +Note that you may still see warnings similar to `Unexpected sequence number (expected 0, got 191)` even after this update. The reason is that there is a separate, more cosmetic, issue in `tezos-client` itself which has already been fixed but may not be in your branch yet (see the [merge request](https://gitlab.com/tezos/tezos/merge_requests/600)). + ### Contact Us You can email us at tezos@obsidian.systems and request to join our Slack. We have several channels about baking and one specifically for our Ledger Nano S apps.