LedgerHQ / ledgerjs

⛔️ MOVED to monorepo "ledger-live"
https://github.com/LedgerHQ/ledger-live
Apache License 2.0
574 stars 379 forks source link

Failed to sign with Ledger device: U2F DEVICE_INELIGIBLE #422

Open satb opened 4 years ago

satb commented 4 years ago

Searched far and wide including the issues list in here but couldn't find out what is causing this error. Tried chrome, opera, brave latest versions.

Code:

import VET from '@vechain/hw-app-vet'
import u2f_transport from '@ledgerhq/hw-transport-u2f'

const isSupported = await isHwWalletSupported()
 if(isSupported) {
     const transport = await createTransport()
     transport.setScrambleKey("")
     const thorLedger = new VET(transport)
     const appConfig = await thorLedger.getAppConfiguration() /// ---> FAILS HERE
}
const createTransport = async () => {
    const timeout = 5000
    const transport = await u2f_transport.create(timeout)
    console.log('u2f_transport', transport)
    return transport
}

const isHwWalletSupported = async () => {
    return await u2f_transport.isSupported()
}

The error shown in the browser console is

TransportError {name: "TransportError", message: "Failed to sign with Ledger device: U2F DEVICE_INELIGIBLE", stack: "Error↵    at new TransportError (webpack:///./node…rhq/hw-transport-u2f/lib/TransportU2F.js?:23:402)", id: "U2F_4", originalError: Error: Sign failed
    at makeError (webpack:///./node_modules/u2f-api/lib/u2f-api.js?:102:14)
    …}
id: "U2F_4"
message: "Failed to sign with Ledger device: U2F DEVICE_INELIGIBLE"
name: "TransportError"
mikegogulski commented 3 years ago

News from Metamask's UI:

Ledger Support Update for Chrome Users 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.

You can enable Ledger Live support by clicking Settings > Advanced > Use Ledger Live.

When interacting with your Ledger account in MetaMask, a new tab will open and you will be asked to open the Ledger Live app. Once the app opens, you'll be asked to allow a WebSocket connection to your MetaMask account. That's all!

5/26/2021

Krzysztof2301 commented 3 years ago

I have now the same problem, a few days ago everything was OK, but today I cant do any transactions. failed to sign with ledger device u2f device ineligible (Metamask). whats wrong??

pitchblacker commented 3 years ago

stopped working for me today. Had to use ledger live as solution, otherwise I have to use firefox aswell... very unsatisfying...

joshjacobson commented 3 years ago

Same issue with Solflare on Firefox & Chrome (MacOS)

DenisStark77 commented 3 years ago

Same for me. Could not sign any transaction for Stellar on Stellar Laboratory.

roomit-xyz commented 3 years ago

metmask 9.6.1 + chrome 91 + Linux still not work. I have enable "Use Ledger Live" but didn't happened on live. Please fixing it asap..

dzid26 commented 3 years ago

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.

I don't know why they said that. To me nothing has changed with v91.

It always was buggy but still works. The trick is though to make sure the Ethereum app is opened before approving the transaction. And if you forget, you will be getting the error. Then to fix it, close the Ethereum app and open it again before approving the transaction.

sevenearths commented 3 years ago

Screenshot from 2021-07-29 11 42 59

Don't know if this helps

sevenearths commented 3 years ago

I ended up reverting to version 2.16 & runing Metamask on Firefox (this is all on Ubuntu 18.04 btw).

Everything is back to normal now

michaelr-github commented 3 years ago

I'm now getting U2F DEVICE_INELIGIBLE everywhere. Ledger Nano X Firmware 1.2.4-5

Note that, inside Ledger Live, buy/sell function works fine, but prices are exorbitant (a difference of 3,7% from the SDEX) because it's going through a partner (Coinify), it should use the Stellar DEX (my use case). Sorry in advance for the conspiracy theory, but could this be Ledger (the Company) forcing us to buy via their trading/money partners? I hope not, because this would be outrageous. This is a 2019 issue and it's real, keeps coming back and hurting a lot of users, will this never be really fixed? Any other thoughts / fixes / hacks? EDIT: One of the websites works on Firefox. Also works fine on the Account Viewer on Chrome, as noted on this issue, which I'm unsure if can or cannot relate t

I think Ledger needs to answer some serious questions here; if they dont they will surely see the consequences of ignoring this issue and the consumers will certainly read about these issues and go to Trezor.

antonioribeiro commented 3 years ago

Yeah, no words from them, terrible user experience. Maybe things are sorted for Metamask users, but not every cryptocurrency is supported by Metamask, so eveyone else is harmed by these deprecations or bugs

opeleion commented 3 years ago

Here the solution : Watch the following video on Youtube : "How to fix the U2F DEVICE INELIGIBLE Error when using Ledger wallet with Metamask"

ctrlaltfx commented 3 years ago

this solution listed above worked for me when moving NFT's from my ledger nano x to my metamask wallet:

  1. connect ledger nano x to computer
  2. input ledger nano x password
  3. navigate to etherium app/settings/contract data on ledger nano x
  4. disable/enable 'allow contract data' on ledger nano x
  5. connect to metamask wallet using brave browser
  6. using opensea.io, navigate to NFT's stored on the ledger nano x
  7. select 'transfer' NFT to destination to destination eth address on ledger nano x
  8. accept metamask gas fee when prompted
  9. accept series of prompts on ledger nano x
  10. NFT will begin transferring and metamask will prompt when transfer completes
ctrlaltfx commented 3 years ago

this solution listed above worked for me when moving NFT's from my ledger nano x to my metamask wallet:

1. connect ledger nano x to computer

2. input ledger nano x password

3. navigate to etherium app/settings/contract data on ledger nano x

4. disable/enable 'allow contract data' on ledger nano x

5. connect to metamask wallet using brave browser

6. using opensea.io, navigate to NFT's stored on the ledger nano x

7. select 'transfer' NFT to destination to destination eth address on ledger nano x

8. accept metamask gas fee when prompted

9. accept series of prompts on ledger nano x

10. NFT will begin transferring and metamask will prompt when transfer completes
  1. NOTE: after disabling and enabling 'allow contract data'... stay on this screen during the entirety of this process. hope this helps
ctrlaltfx commented 3 years ago

this solution listed above worked for me when moving NFT's from my ledger nano x to my metamask wallet:

1. connect ledger nano x to computer

2. input ledger nano x password

3. navigate to etherium app/settings/contract data on ledger nano x

4. disable/enable 'allow contract data' on ledger nano x

5. connect to metamask wallet using brave browser

6. using opensea.io, navigate to NFT's stored on the ledger nano x

7. select 'transfer' NFT to destination to destination eth address on ledger nano x

8. accept metamask gas fee when prompted

9. accept series of prompts on ledger nano x

10. NFT will begin transferring and metamask will prompt when transfer completes
11. NOTE: after disabling and enabling 'allow contract data'... stay on this screen during the entirety of this process.
   hope this helps

NOTE: HAD TO USE FIREFOX (WOULD NOT WORK WITH BRAVE)

Bowser401 commented 3 years ago

Hello guys, I have encountered this issue yesterday on www.binance.org with my Ledger Nano X.

I disabled bluetooth on the device and used mac osx latest version. When I was logging into binance.org the ledger app on my mac was closed.

Ledger and all my browsers were all up to date (Firefox, chrome, brave and opera). On all of them I got the same error message. Plus I tried safari and there I got a message: U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension. Also make sure you're on an HTTPS connection (I knew from before that safari wouldn't work but tried anyways).

On the new ledger update there are 2 binance apps you can download on the ledger. There is Binance Smart Chain (Which now has ledger live support) and Binance Chain (it is called tendermint binance chain on ledger live), two different things. When I try to unlock the Binance wallet with Binance Smart Chain app the error message pops up, but I tried to do the same with Binance Chain (The other one, Tenderming Binance Chain), and it worked:

BUT That only worked with Tor browser, any other browser shows me the same error message.

So yeah, after couple of hours of raging I finally somehow found a solution, I hope it helps you. I resolved this issue before ledger answered (Which was really quick TBH) Their response was: I can see that you are having trouble connecting your Ledger device to a third-party/web wallet.

The recent Chrome v91 update released by Google has broken the U2F proxy compatibility on macOS & Linux. Therefore, it is expected that macOS & Linux users face issues when connecting their Ledger devices (or any hardware) to a third-party wallet that only offers U2F or WebUSB connections when using a Chromium web browser which is based on Chrome v91 (Chrome and Brave for instance).

If the third-party wallet you are trying to use offers the webHID option, use this option to connect your Ledger device to the third-party wallet. If the third-party wallet doesn’t offer the webHID option, use a web browser that is not based on Chrome, such as Firefox or Safari for Mac users.

Knightfall11 commented 2 years ago

Found a solution! After months i couldnt use my ledger with metamask today i upgraded ledger live and the eth app on the ledger nano S and it worked again. Contract allowed and not through ledger live but normal metamask setting: WebHID

garrettpless commented 2 years ago

This solution worked for me. I simply needed to add the FIDO U2F app to my Ledger device. Follow this link.