spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.46k stars 3.1k forks source link

No module named 'electrum.plugins.ledger.auth2fa on macOS and ledger HW.1 #5854

Open bitcoinland opened 4 years ago

bitcoinland commented 4 years ago

Hello,

I'm using Electrum 3.3.8 on macOS High-Sierra (10.13.6), if it maters, wallet is a standard p2sh-p2wpkh on a ledger hw.1. I'm getting "No module named 'electrum.plugins.ledger.auth2fa" when trying to sign a transaction.

Here is the detailed step-by-step:

  1. After filling the data for a transaction, and clicking preview, I click Sign;
  2. It will ask for PIN if not yet informed, otherwise it proceeds to the next step;
  3. Shows the message "Signing transaction..." for a couple seconds;
  4. Shows "Confirm transaction on your ledger device" for a couple seconds;
  5. Shows "No module named 'electrum.plugins.ledger.auth2fa'"

I use this same wallet with electrum on Linux (debian) without issues, only get this error on macOS.

Thanks in advance!

SomberNight commented 4 years ago

From the description, this could be an issue with PyInstaller not picking up and including the electrum.plugins.ledger.auth2fa module.

However, I have now tested on macOS (10.14) with the official 3.3.8 Electrum .dmg binary and a ledger HW1, and I could not reproduce the issue. I have successfully signed a tx.

How are you running Electrum? Are you using the .dmg from the website?

bitcoinland commented 4 years ago

Thanks and apologies for the delay in the response.

Turns out I was running from the official .dmg file but without installing it first. I just tested it again after installing and it works as expected.

I noticed an unrelated thing though, might be good to check here before filing a new issue: if the destination address is a native segwit (bc***) the Security Card challenge screen doesn't show the characters for which the pin needs to be entered but instead prints "Press ENTER" in blue as if the pin was already entered. My guess is that electrum.plugins.ledger.auth2fa doesn't support native segwit address.

bitcoinland commented 4 years ago

Actually the comment above has nothing to do with segwit, it happens when using pay to many having two destination addresses and it doesn't matter if segwit or normal addresses

Edit: I did some very basic troubleshooting and it seems I'm getting an empty keycardData bytearray for these transactions from btchip.finalizeInput. getFirmwareVersion() for my device gives me{'compressedKeys': True, 'version': '1.0.4', 'specialVersion': 32} which I suppose is the last version, but I might be wrong and will check it later.