LedgerHQ / app-monero

Monero wallet application for Ledger Nano S & X
Apache License 2.0
273 stars 101 forks source link

After Ledger 1.5.5 update and Monero 1.1.1, Ledger Nano S stuck on Export View Key #29

Closed tficharmers closed 5 years ago

tficharmers commented 5 years ago

I have two Ledger Nano S devices. I plugged one in to Ledger Live and updated its firmware to 1.5.5. I then updated the Monero app to 1.1.1. Using the Monero Cli I attempted to open my Monero wallet, but the wallet froze on 'Export View Key'. Both accept and decline options didn't work. The Monero Cli then errors after a few minutes with either 'Error: failed to load wallet: Wrong Channel' or 'Segmentation fault: 11'.

However, I took my 2nd Ledger Nano S and went into Ledger Live, but didn't update the firmware and left it with Ledger firmware at 1.4.2 installed. I then updated the Monero app to 1.1.1. There is no freezing on the 'Export View Key' stage with this device.

So, I don't know if this is related to 1.5.5 or not, just thought I'd mention it. I've tried it six times now and can't get past the 'Export View Key' stage so it's unusable for me at the moment.

I only have the Bitcoin and Monero apps installed on both devices.

Using Monero 'Beryllium Bullet' (v0.13.0.4-release) on macOS 10.13.4.

johnalanwoods commented 5 years ago

Is the ledger running 1.4.2 firmware with 1.1.1 Monero app working?

tficharmers commented 5 years ago

Yeah seems to be working. I have done a successful transfer with my 1.4.2/1.1.1 Ledger.

I wondered if it was the decrease in available storage size after the 1.5.5 firmware update and so I deleted the Bitcoin app leaving only the Monero app. Still froze on the Export View Key prompt.

johnalanwoods commented 5 years ago

Wow @tficharmers, thanks for the warning. I will be careful not to update firmware until this issue is resolved.

Good shout. (at least you have one working device).

tficharmers commented 5 years ago

At least two more people with the same problem: https://www.reddit.com/r/monerosupport/comments/ahbk8p/after_ledger_155_update_and_monero_111_ledger/

dEBRUYNE-1 commented 5 years ago

Ping @cslashm.

sethforprivacy commented 5 years ago

This also applies to firmware v1.4.2 with the Monero 1.1.1 Ledger app. I made sure not to update firmware, but had to remove the Monero app to install another, and when I reinstalled Monero v1.1.1 it broke all ability to use Monero on the Ledger (both GUI and Monerujo).

Edit: While using Monerujo, I can export the view key to open the wallet, but as soon as Monerujo prompts for me to sign a transaction the Ledger freezes completely. I don't even get the X/Y prompt, it just freezes before showing that.

Makazar commented 5 years ago

I have identical problem. It has to do with the 1.5.5 update.

https://monero.stackexchange.com/questions/10797/cant-open-gui-wallet-with-ledger-nano-s-after-1-5-5-firmware-update?noredirect=1#comment9183_10797

Waiting to hear from the Ledger crew:

https://www.reddit.com/r/ledgerwallet/comments/aia4zq/cant_open_monero_gui_wallet_with_ledger_nano_s/

sethforprivacy commented 5 years ago

Looks like they fixed it:

v1.1.2 Fix stack overflow for 1.5.5 SDK

I installed the new version and it worked fine on Monero GUI.

Makazar commented 5 years ago

Didn't work for me. I've updated the Monero app to v1.1.2 and the 'Export Key' display is still frozen. Using macOS High Sierra and GUI Beryllium Bullet (v0.13.0.4).

cslashm commented 5 years ago

Please provide full configuration on which it doesnt work. I'm not able to reproduce the issue under my Linux.

Also run client in log level 4 and provide me log.

Take care to not do that with real wallet as the log will contained the viewkey.

Makazar commented 5 years ago

"Also run client in log level 4 and provide me log."

Could you please explain what this means?

Mansarde commented 5 years ago

In the CLI you can set the log level (0-4) with set_log. See help set_log for help.

In the GUI, you can set the log level (default: 0) to 4: Image of Monero GUI

cslashm commented 5 years ago

@Mansarde thank you. You ve been faster than me ;)

johnalanwoods commented 5 years ago

@cslashm v1.1.2 and Ledger 1.5.5 should work correctly together right? - I'm testing too.

cslashm commented 5 years ago

@johnalanwoods yes it should. It works for me under Linux

johnalanwoods commented 5 years ago

@cslashm testing on macOS now...

Makazar commented 5 years ago

Thanks @Mansarde. Only I am not able to connect in GUI due to the frozen Export Key so that I can get the Log info. I can set it to 4 but nothing appears on the Log window.

cslashm commented 5 years ago

I did not success to reproduce the bug under both linux ("Ubuntu 18.04.1 LTS") and Windows (SevenPro-SP1).

I successfully restore several times my personal wallet without any problem.

To investigate more I need a details bug report with Host configutation, NanoS configuration (please double check :)) , command line used, screenshots of what happen on both host and NanoS, ....

sethforprivacy commented 5 years ago

With v1.1.2 I am now able to get the signing transaction portion of sending from Monerujo, but am unable to actually sign the transaction -- I approve it on the Ledger, but then get the following:

Transaction failed: unknown exception: Wrong Device Status: SW=6985 (EXPECT=9000, MASK=ffff)

I haven't been able to test sending via GUI yet on v1.5.5/v1.1.2.

Edit: Actually the Tx did send, but still threw that error... Seems odd. May be a Monerujo specific issue for @T81

cslashm commented 5 years ago

@GoodEn0ugh, your device is unlocked? I mean No screen lock?

Log of sent commands is needed to understand who/when the 6985 happen.

6985 means that command has been rejected for internal state reason: screen lock or TX related command received but no TX are in progress. It sounds like after TX is finished, Monerujo send a command related to TX (one of INS_STEALTH, INS_GEN_TXOUT_KEYS, INS_BLIND, INS_VALIDATE, INS_MLSAG).

Makazar commented 5 years ago

I can confirm that Nano S 1.4.2 works perfectly with GUI (v13.0.4), for those who might decide to wait with the 1.5.5 update until Ledger Co. fixes the glitch.

T81 commented 5 years ago

No problem with firmware 1.5.5 and GUI v13.0.4 on win7

tficharmers commented 5 years ago

Been away. Now back. I have installed the Monero app v1.1.2 on the Ledger v1.5.5. I am using Monero 'Beryllium Bullet' (v0.13.0.4-release) on macOS 10.13.4. I have tried both the latest CLI and GUI. I have tried connecting to my remote node from another computer and I also tried it with a local node.

Still freezes on the 'Export View Key' and times out with the error "Error: failed to load wallet: Wrong Channel" in the CLI and "Couldn't open wallet: Wrong Channel" in the GUI.

Makazar commented 5 years ago

Yep, still having this problem. Using Cake Wallet at the moment until this gets sorted.

johnalanwoods commented 5 years ago

@cslashm hey mate, is there any update? this issue is still occurring for me on macOS with 1.1.2 and 1.5.5

cslashm commented 5 years ago

@johnalanwoods @tficharmers I got the pb twice, but do not happen again. I think about some race condition that cannot explain today.

The both time it happen I plug/unplug my device several time before it works again. And then...no more problem.

You can try display the About content menu before launching the client. Assuming you have an already setup wallet to avoid the double ask. Let me know. I suspect something around there.

cslashm commented 5 years ago

@GoodEn0ugh, INS_STEALH have to be allowed outside TX. I fix that.

cslashm commented 5 years ago

@johnalanwoods @tficharmers @Makazar

Can you try this little python script. It mimic the startup of monero client, fetching the public key and twice the private view key.

(You need the ledger sdk)

from ledgerblue.comm import getDongle

dongle = getDongle(True)

apdu1 = bytearray([0x02, 0x20, 0x01, 0x00, 0x01, 0x00])
apdu2 = bytearray([0x02, 0x20, 0x02, 0x00, 0x01, 0x00])

dongle.exchange(apdu1)
dongle.exchange(apdu2)
dongle.exchange(apdu2)
johnalanwoods commented 5 years ago

@cslashm sure no probs - by the way, are you saying on your end, you could only reproduce initially and after a while the issue disappeared?

cslashm commented 5 years ago

yes it happened twice on friday and disappear....

johnalanwoods commented 5 years ago

@tficharmers have you experienced that which @cslashm mentioned? i.e. that the issue dissipated over time?

tficharmers commented 5 years ago

@johnalanwoods Still broken for me despite unplugging/plugging dozens of times. I'm not technically literate enough to try the python script. I tried recreating the wallet files, but it still freezes. The only other thing I can think is to reset the Ledger Nano S and recreate the wallet from that point, but that will be annoying. I'm not sure that would be a useful fix for lots of other people either.

PeteDaKat commented 5 years ago

@johnalanwoods ... The only other thing I can think is to reset the Ledger Nano S and recreate the wallet from that point, but that will be annoying. I'm not sure that would be a useful fix for lots of other people either.

I went to the trouble of going the entire way, resetting Ledger, reentering seed, reinstalling the apps. It is still broken. I've moved my XMR to CakeWallet. I spent several hours over a week on this and that is enough, so here I sit and wait and watch.

cslashm commented 5 years ago

I continue to try to understand the pb. The big thing is that I 'm not able to reproduce the problem. I tried last week on several computer linux/mac/win and it works. This extremely weird.

johnalanwoods commented 5 years ago

@cslashm thanks for update, is there anything we can do to help debug further?

Also when will the Monero app be updated on Ledger Live, because the current version is completely incompatible with the latest firmware!?

So surely the version that is working for some (1.1.2) is better than one that doesn't work at all...

Currently when a user gets a new ledger, updates and uses the version on Ledger live, it literally is broken.

Or maybe you're waiting for Monero fork to release?

@tficharmers would you agree?

johnalanwoods commented 5 years ago

As stated here, this is messy for new customers.

cslashm commented 5 years ago

yes 1.1.1 was an error because of wrong linking options.

1.1.2 seems work for lot of people but fail for some. We try to investigate but :

1/ Hard to reproduce here 2/ I get difficulties to have full config (OS version, Log, ...) from people claiming it fails

Edited: There is ~1.1.2~ new master sources under git. You can try it. Not released in Live as I cant said if it solves the pb

johnalanwoods commented 5 years ago

@cslashm trying to build makefile on new Mac but get: Environment variable BOLOS_SDK is not set. Stop.

Any readme or instruction on deploying?

tficharmers commented 5 years ago

1.1.2 is on Ledger Live by the way.

Could users who had to initially configure their Smart Card Services be the ones still having problems? I still have those values in the config file, but I know it's not necessary to have these. Just wonder if there might be a conflict here. Just a wild guess :)

cslashm commented 5 years ago

please DL the 1.5.5 SDK https://github.com/LedgerHQ/nanos-secure-sdk/tree/nanos-1552

Some doc here https://ledger.readthedocs.io/en/latest/

johnalanwoods commented 5 years ago

@tficharmers excellent question. @cslashm might he be right? Could the issue be related to those early users that manually setup smart card services?

cslashm commented 5 years ago

not related to pcsc config.

cslashm commented 5 years ago

sorry, not 1.1.2, but simply master.

tficharmers commented 5 years ago

Well, this is embarrassing... just saw a message in #monero-dev IRC from cslashm that you shouldn't have Ledger Live open when using the Monero app with the CLI/GUI. I actually didn't have Ledger Live open when I've been getting these freezes, but I wondered if on MacOS there might have been a residual process running in the background that hadn't been shut down that was causing this conflict. So, using my expert IT skills, I turned my Mac off... and then turned it back on again. Yep... it worked. No freeze.

Update: Hmmmmmm actually. So I exited the CLI wallet, then opened it again (without unplugging the Ledger) and it froze. I unplugged the Ledger, plugged it back in and opened the wallet again in the CLI and it froze. Perhaps not solved. I will try a macOS restart again.

Update 2: Did another macOS restart. Opened the CLI wallet, Ledger froze :(

johnalanwoods commented 5 years ago

@tficharmers this must be something subtle...

Makazar commented 5 years ago

Just a quick check in guys to let you know I still get the frozen 'Export Key' message and cannot use Ledger Nano S + Monero GUI. Thought this issue would be resolved by now. Shame really as I would like to run my own node by using GUI. For now using CakeWallet. I'm a macOS High Sierra user +1.5.5 Ledger Nano S firmware + 1.1.2 Monero app (Ledger) + 0.13.0.4 Beryllium Bullet GUI. Hope this gets sorted soon.

PeteDaKat commented 5 years ago

To join Makazar's voice. I, too, am in the same predicament still, and have also moved my XMR to Cake Wallet using a Ledger 1.4.2 for safekeeping. MacOS Mojave 10.14.3, Ledger Nano S 1.5.5, Monero app 1.1.2, Monero GUI 0.13.0.4 I've since deleted and reinstalled everything, down to a new copy of the blockchain. Always the frozen Export View Key with unresponsive X and ✓.

tippierchip commented 5 years ago

Same problem here😳

cslashm commented 5 years ago

@tippierchip

Same problem hereflushed

Please your full config

tippierchip commented 5 years ago

Os is Windows, 64- bit. Im using the monero gui 0.13.04 And my ledger nano s is updated to 1.5.5