LedgerHQ / app-monero

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

Device not found #91

Open nalal opened 3 years ago

nalal commented 3 years ago

Friend of mine is trying to set up a wallet with Monero GUI, seems it's not working at all. We get about as far as Create wallet but it doesn't actually find the ledger nano S. Steps -Install ledger app -Close live ledger -Open ledger app on ledger -Open Monero GUI -Create new wallet from hardware -Provide name -Select ledger from dropdown -Click Create wallet Tried just about everything, logs don't provide anything other than an error stating the device was not found.

pricead commented 3 years ago

Is the Nano S firmware fully up to date (version 1.6.1)? Also what kind of operating system are you running Monero GUI on?

I suggest https://www.reddit.com/r/monerosupport/ for further help.

kylekingcdn commented 3 years ago

I am experiencing this issue as well.

I am inclined to think that it is an issue with the ledger monero app and not the monero gui. The reason for this assumption is that my OS lists the ledger device as being connected whenever the device is at the main menu or in another application. However once the monero app is opened on the ledger device, the entry for the ledger device immediately disappears from the list of peripherals on my computer. The ledger device re-appears immediately once the monero app is quit on the ledger device.

As an example - this is when the ledger device is sitting at the app list/main-menu:

Screenshot 2021-05-01 at 5 11 08 AM

Upon opening the ledger app:

Screenshot 2021-05-01 at 5 08 51 AM

I had no problems using the ledger with monero about 2 months ago. Today I plugged my device, updated the monero app from 1.7.5 to 1.7.6 and tried to access my wallet but was unable to. I am not sure if the update is related since it was released after this issue was opened, but I figured it was worth noting.

Environment info:

Host OS: macOS Big Sur 11.3
Device: Ledger Nano S
Device firmware version: 1.6.1
Ledger Live version: 2.26.1
monero-gui version: 0.17.2.1
kylekingcdn commented 3 years ago

Tested on Windows running as a host OS (not virtualized), and it did work. Perhaps a recent update to macOS has caused some issues here?

xanoni commented 3 years ago

Same issue now on Big Sur 11.5.2 with Ledger Monero app version 1.7.7 and monero-gui-mac-x64-v0.17.2.2.dmg ... says "No device found" after the correct wallet password is entered. If a wrong password is entered, it says "Invalid password" instead.

This must have happened in the last ~3 weeks. The Monero-GUI version has not changed, but there was definitely a MacOS update and I know that Ledger Manager updated a bunch of stuff today, potentially including the XMR app. Ledger Live recognizes the device fine, other chains work.

Correct pw:

Incorrect pw:

Interestingly some menu expands in the background despite the error message, but can't see what exactly is happening due to the blur effect:

xanoni commented 3 years ago

@cslashm @grydz @bigspider is there a way to downgrade the app on the Ledger? Seems most likely that (for me) this is related to the update that Ledger Manager installed yesterday.

Is the below safe in production (with Ledger S)?

git checkout '1.7.6'
make DEBUG=1
make load  # load the app on the Nano using ledgerblue

Do I need this here? https://github.com/LedgerHQ/blue-loader-python

pricead commented 3 years ago

Have you tried recreating the wallet on the Monero GUI? (via using the option to add a new wallet, and picking the hardware wallet option) It's possible the local files got corrupted and are leading to this error for you. Also make sure you don't have Ledger Live open at the same time.

I have the latest version of Big Sur and the 1.7.7 XMR app on my device and am getting no errors. Everything works fine on my end.

xanoni commented 3 years ago

Have you tried recreating the wallet on the Monero GUI? (via using the option to add a new wallet, and picking the hardware wallet option) It's possible the local files got corrupted and are leading to this error for you. Also make sure you don't have Ledger Live open at the same time.

Yes I tried the following:

I usually try not to reboot (only Windows users do that :P), but maybe this is something that a reboot could solve? Maybe something got stuck when I used the ETH app.

kylekingcdn commented 3 years ago

Have you tried recreating the wallet on the Monero GUI? (via using the option to add a new wallet, and picking the hardware wallet option) It's possible the local files got corrupted and are leading to this error for you. Also make sure you don't have Ledger Live open at the same time.

I have the latest version of Big Sur and the 1.7.7 XMR app on my device and am getting no errors. Everything works fine on my end.

From what I am observing, the device isn't even visible from the OS whenever the ledger device has the monero app open. This change in state is visible whether or not the monero gui, which to me, implies that files aren't an issue here.

Works no problem on windows (exported keys).

xanoni commented 3 years ago

So the reboot didn't fix it... is it possible to downgrade the app on the device? See here => https://github.com/LedgerHQ/app-monero/issues/91#issuecomment-902366088

kylekingcdn commented 3 years ago

So the reboot didn't fix it... is it possible to downgrade the app on the device? See here => #91 (comment)

Interestingly I've just noticed that the wallet works when used with a USBA->Micro B cable connected to my Thunderbolt 3 dock. Using the same USB A->Micro B cable with a USB-C adapter (like this one), however, does not work.

I haven't spent much time debugging what exactly is the cause of this solution, but it may be worth trying any usb docks or hubs if available.

xanoni commented 3 years ago

I haven't spent much time debugging what exactly is the cause of this solution, but it may be worth trying any usb docks or hubs if available.

That's weird, because as mentioned it works fine with the Ethereum app and with Ledger Manager .... does this app use a different mechanism to access the Ledger?

Also, I know that it worked fine in the past. The setup is MacBook -> USB-C-to-A adapter -> USB-A Ledger cable -> Ledger.

But given it worked for you, I will try a bunch of combinations and different cables ...

kylekingcdn commented 3 years ago

I haven't spent much time debugging what exactly is the cause of this solution, but it may be worth trying any usb docks or hubs if available.

That's weird, because as mentioned it works fine with the Ethereum app and with Ledger Manager .... does this app use a different mechanism to access the Ledger?

Same here - I used to not have any issue with any wallets. This issue first cropped up at the start of May, and only occurs when the Monero app is open on the ledger device. Other wallets continue to work fine.

Also, I know that it worked fine in the past. The setup is MacBook -> USB-C-to-A adapter -> USB-A Ledger cable -> Ledger.

This is what wasn't working for me. I also have a USB-C -> USB microB (Nano S port) cable, that did not work either.

But given it worked for you, I will try a bunch of combinations and different cables ...

I have just tried a cheap Anker USB hub, and it is working with it. Strangely system profiler is reporting that the hub is USB 2.0, when it in fact is a 3.0 hub. So the current setup (while a little bit ridiculous is): MacBook -> USB-C-to-A adapter -> USB-A hub -> Ledger USB cable -> Ledger device

From my own observations, this issue is present given

If you are curious, this is the hub that I am currently observing success with.

xanoni commented 3 years ago

I have just tried a cheap Anker USB hub, and it is working with it.

Fuck. I just tried a random USB hub (without connecting it to a power plug... just in passive mode) and it is working, too!

This is weird, but tbh before my recent issues I hadn't tried NOT using an USB hub in a long time. Maybe this is actually an older problem on MacOS?

image

kylekingcdn commented 3 years ago

I have just tried a cheap Anker USB hub, and it is working with it.

Fuck. I just tried a random USB hub (without connecting it to a power plug... just in passive mode) and it is working, too!

This is weird, but tbh before my recent issues I hadn't tried NOT using an USB hub in a long time. Maybe this is actually an older problem on MacOS?

image

Super strange eh? I'm glad it's working! This only started happening to me recently, monero used to work no problem.

xanoni commented 3 years ago

Haha... well, unfortunately it's difficult for me to tell whether the problem existed in the past, because in the past I always used an USB hub when on my OSX computer ... (Apple and their questionable port/dongle design ...)

xanoni commented 3 years ago

Oh, forgot to mention... I'm curious if this is related to Apple's special port designs again ... looks like USB-C, but we know it's mostly Thunderbolt ... I've had issues with other open source software in the past.

E.g., uhubctl (https://github.com/mvp/uhubctl) only allows me to control USB ports of connected USB hubs, but it doesn't allow me to control Apple's ports directly. See the story here: https://github.com/mvp/uhubctl/issues/350#issuecomment-855594705

kylekingcdn commented 3 years ago

Oh, forgot to mention... I'm curious if this is related to Apple's special port designs again ... looks like USB-C, but we know it's mostly Thunderbolt ... I've had issues with other open source software in the past.

E.g., uhubctl (https://github.com/mvp/uhubctl) only allows me to control USB ports of connected USB hubs, but it doesn't allow me to control Apple's ports directly. See the story here: mvp/uhubctl#350 (comment)

This is really interesting - I wouldn't be surprised if it's related. I might do some digging into the ledger monero app source and see if there's anything that rings any bells.

jap commented 2 years ago

Can confirm this happens on my late-2013 MBP as well, running the latest Big Sur. This thing has only USB-A ports, unsure if they do USB-3. No blue connectors.

When I plug in the ledger directly and have it in the main menu, I can see a Nano S device showing up in the USB tree. When I open the monero app on the ledger, it disappears. Closing the monero app causes it to reappear again.

However, when I hook it up using an (unpowered) USB2 hub, it does show up, and remains visible after opening the monero app. Super weird, but at least I have a workaround now.

I'll try to source a USB3 hub and if that changes things.

Jsalas424 commented 2 years ago

My MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports) is exhibiting the same behavior @kylekingcdn and I resolved it with a USB3 hub, don't spend the money @jap

The hub that made it all better

With either the Bitcoin app open, or no app at all, just unlocked:

image

With the monero app open, no hub:

image

With the hub + monero app:

image

Monero GUI & CLI v0.18.1.2-release MacOS v11.6.5 Ledger Nano S firmware v2.1.0 Ledger Monero App v1.8.0 Startech USB-C to Micro-B Cable - M/M Anker USB C Hub for MacBook

Edit: Added details about the macbook hardware.