madfish-solutions / templewallet-extension

🔐💰Cryptocurrency wallet for Tezos blockchain as Web extension for your Browser.
https://templewallet.com
MIT License
184 stars 62 forks source link

Ledger doesn't work anymore under last Chrome 91 #353

Closed bikerduweb closed 2 years ago

bikerduweb commented 3 years ago

Since last chrome update a few days ago, the communication between TempleWallet and a ledger nano is broken: 1) If I try to connect a ledger, templewallet do the request to ledger, I can approve the request on the ledger, but TW never receive de communication and fails with an error message "Ledger error. Unable to retrieve public key" 2) If i try to use a ledger already connected to TempleWallet to do a buy on Hicetnunc, TW send the swap request to ledger but the ledger never show the confirmation screen, and after a few second, it fails with error "Ledger error. The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client."

Also, Metamask had this same kind of problem and stated this "As of Chrome version 91, the API that enabled our Ledger support (U2F) no longer supports hardware wallets. MetaMask has implemented a new Ledger Live support that allows you to continue to connect to your Ledger device via the Ledger Live desktop app." https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet

So maybe TW is facing the same kind of problem as I guess there are similarities there

amani1104 commented 3 years ago

I have the same error on both Chrome (v91) and Brave (v1.25.68) using a Ledger Nano X on macOS Big Sur (v11.4). No issues with tezos-client and Kukai wallet.

bikerduweb commented 3 years ago

Thanks @amani1104 , good to know that kukai work, will use it in the meanwhile until a fix is found for TW ;-)

michaelkernaghan commented 3 years ago

I upgraded to chrome 9.1 and tried to use a LEDGER NANO S with Temple wallet and I had problems. Different error messages, but something is not right. I did not have a problem with NANO X however.

I then ran NANO X and NANOS through our ledger integration tests suite and all cases passed for both ledger types.

So I think there is a problem with Temple, Chrome 91 and NANO S. I got this error as did the original reporter: "Ledger error. The operation either timed out or was not allowed. See https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client.""

bikerduweb commented 3 years ago

I have the problem on both NANO S and NANO X. To reproduce, I start from fresh TW, under latest chrome 91 public stable version (91.0.4472.77) under Mac OSX M1, without any ledger imported... Then when I try to import my ledger account (either from S or X), same things happens: ledger receive the request, I confirm on the ledger, but the confirmation is never received and show the error "Ledger error. Unable to retrieve public key"

Then I reuse an older chrome version to add my ledger account, so now that the account is imported, I go back to Chrome latest version and this time, I try to do a swap on HEN, and it fails: the ledger don't receive anything and I get the error "Ledger error. The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client."

So it can also fails on NANO X :(

michaelkernaghan commented 3 years ago

I was using the ledger with Temple on windows and running regression tests (with no chrome) on Linux.

No Mac so I can't speak to that.

amani1104 commented 3 years ago

Just found that the same issue is present in MetaMask so it's likely a breaking change in the newest version of Chromium. Tested with Firefox, and Temple works fine with that browser (also MetaMask).