-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v13] Ledger wallet doesn’t open sometimes (libhidapi) #4534
Comments
Minor but Srange. I will try to have a look quickly at that.
Le lun. 8 oct. 2018 à 22:13, selsta <notifications@github.com> a écrit :
… This issue is is quite minor, simply opening the wallet again fixes the
issue.
***@***.*** ~/d/m/b/D/l/r/bin> ./monero-wallet-cli --wallet-file ledger
2018-10-08 20:09:40,705 INFO [default] Page size: 4096
This is the command line monero wallet. It needs to connect to a monero
daemon to work correctly.
WARNING: Do not reuse your Monero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy.
Monero 'Beryllium Bullet' (v0.13.0.1-rc-ac567452)
Logging to ./monero-wallet-cli.log
Wallet password:
Error: failed to load wallet: Wrong sequence_idx
/cc @cslashm <https://github.com/cslashm>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4534>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFOX8y0Ua4K5KiWXBz5dPPBuDW-lfXv8ks5ui7HwgaJpZM4XNmX1>
.
|
@selsta and @cslashm I can get the ledger working in v0.13.0.2-release however I noticed a strange quirk that's similar to the send issue: If you start the CLI wallet with the typical command and let it prompt you for your wallet password everything works fine. However if you start the wallet with a password file/arg in the command you will get an error sometimes as: It's only 50% of the time like the issue with sending. But at least this way you can jump into the wallet really fast and test if the issue is still here vs having to send something. It's almost as if we need another type of delay? |
+1 on this issue, same description as above Right now it happened 3x in a row when trying to open the wallet file for Ledger. 4th attempt, without changing anything, the wallet opened. Also on macOS. |
+1 except this is happening on a fresh CLI build of v0.13.0.2 on Windows too. Seems to be happening 100% of the time when trying to create new or access existing Ledger wallet (which worked fine on v0.12). Basically means Ledger isn't usable on Windows as of v0.13.0.2 (on my machine at least, subsequent posts indicate it is working for others but also that I am not alone with this issue). |
I look at that today. |
I'm not able to reproduce the probleme neither under win7 nor under linux It would be useful if someone can make USB log with http://www.usblyzer.com. (filtering the long on the device VID:PID == 2c97:0001) |
I have same issue. Unable to open wallet on my ledger nano S Win 10 Errors the wallet cli generates 2018-10-15 17:13:21.366 3156 INFO logging contrib/epee/src/mlog.cpp:242 New log categories: *:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO |
Here is the USBLYZER capture |
Here's another USBLYZER capture |
@usmarine2141, @philkode thanks. We saw somthing strange that we do not explain for now. Is it possible for you to do the same log, but with log level4 on monero cli and provide me the both log ulz and monero. |
|
Works fine for me on Windows 10. Make sure you've installed the required dependency before building. |
I'm on Windows 10 (Home v1809) using the new 0.13.0.3 GUI I get "Couldn't open wallet: wrong sequence_idx" when opening my Ledger Wallet, same error when doing it with the CLI 0.13.0.2.
Without the Ledger, just opening a local non-ledger wallet or creating a new one works fine. With error level=4 I get the following in the log: |
Update: I just tried the Ledger (with the same USB cable) on a different computer (Windows 10 Pro 1809) and I was able to get past the option to create a new wallet without the error message appearing. So that means it's not a problem with the Ledger or the cable. |
@DrCryptoKey thanks for the precision. It confirm there is some random/race probleme under windows/mac during init. (making me crasy) On failing machine, you can also test that:
retry with 1 minute in case of failure |
Even with 1 minute pauses, the problem persists. My logs are supplied a few posts up, I can't quite figure out how to use usblyser, perhaps a more detailed explanation on what to do with it would be helpful? Thanks for assisting. |
This seems to work for me (not a fix, workaround, only tried a few times with monero-wallet-cli)
This seems to have worked for me a few times. |
Do you have USB 2 ports on your PC ? If you do, try using those. On my Linux boxes, for example, I can only use my Nano S in my front panel USB 2 ports. It won't work in USB 3 ports. On my Windows box, where I only have USB 3 ports, It works on some ports (chipset provided USB 3), and does not on others (ASMedia add-on chip). |
Same issue with ledger, tried all the walkarounds, not working. Error: failed to load wallet: Wrong sequence_idx |
Which OS are you using? |
Sorry, Windows10 |
@cslashm here's another USBLYZER dump including CLI wallet log-level 4, on Windows 10 (built with all appropriate dependencies) @MrC0D3 unfortunately that trick didn't seem to work for me...
Yeah I followed the instructions verbatim from the Github readme and the prerequisite steps seem to install all dependencies. I should clarify my post to indicate that it seems that for some machines, Ledger isn't working on the latest CLI. Glad to hear it's not universal though - hopefully we can figure out the root cause. Update: this issue also seems to be occuring with the latest released v0.13.0.3 binaries, for what it's worth. |
same here... windows 10, ledger latest 1.4.2 firmware however, it is not sometimes, but sofar always |
Fresh install of Windows 10 + Monero 13.0.3 and Ledger Nano S 1.4.2 and I'm getting the wrong sequence idx issue as well. Tried several different USB ports and I still have the same issue. |
Does it work if you start the wallet with |
Yeah can't get this to work at all. I usually use the GUI wallet. Tried starting in CLI but I have to use input args due to wallet location. Could using args be an issue? |
I too am having the same issue, wrong sequence_idx, latest binary GUI 13.0.3 and Ledger Nano S. Tried all the approaches above, but have not been able to access my wallet thus far. Verified the GUI binary archive. Edit: Non ledger wallets are fine. |
Could someone::
PS: Would be great to see Usblyzer logs. diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
index a1778496..461225ea 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -276,7 +276,7 @@ namespace hw {
int device_ledger::set_command_header_noopt(unsigned char ins, unsigned char p1, unsigned char p2) {
int offset = set_command_header(ins, p1, p2);
//options
- this->buffer_send[offset++] = 0;
+ this->buffer_send[offset] = 0;
this->buffer_send[4] = offset - 5;
return offset;
} diff --git a/src/device/device_io_hid.cpp b/src/device/device_io_hid.cpp
index 562aca8b..6fd90cb0 100644
--- a/src/device/device_io_hid.cpp
+++ b/src/device/device_io_hid.cpp
@@ -184,8 +186,9 @@ namespace hw {
out[offset_out++] = ((sequence_idx >> 8) & 0xff);
out[offset_out++] = (sequence_idx & 0xff);
sequence_idx++;
- out[offset_out++] = ((command_len >> 8) & 0xff);
- out[offset_out++] = (command_len & 0xff);
+ unsigned int total_len = static_cast<unsigned int>(command_len) + offset_out;
+ out[offset_out++] = ((total_len >> 8) & 0xff);
+ out[offset_out++] = (total_len & 0xff);
block_size = (command_len > this->packet_size - 7 ? this->packet_size - 7 : command_len);
ASSERT_X(out_len >= block_size, "out_len too short: "+std::to_string(out_len));
out_len -= block_size; |
I've checked out the latest commits and built. My Monerod / wallet CLI version now shows
I do think the fix for these changes are incorporated but I'm still getting @selsta have you been able to check this? |
I'm still unable to utilize the Ledger, was wondering why it was being reported as 'resolved' when the issue persists on v0.13.0.3. Hoping v0.13.0.4 comes out soon w/ fix, or someone can explain why this is being described as resolved when people are still getting the error, many of us 100% of the time, not "sometimes" as described above. |
This is a dev issue tracker. If something is resolved in the code, it is resolved here. |
I still have the same issue: |
@Zarkoob are you sure you checked out the latest |
I checked the commits and I don't see any committed code that affects the ledger nano s issue discussed here. I compiled as of a day ago and I still face the same issue. Could you reference the correct commit so that I can review the code? |
Okay ... so we have to include the updated Monero codebase when recompiling Monero GUI. Got it. |
@jefferson-1 If you're building Monero GUI from release-v0.13 branch, try replacing as yet non-existent @althea16 You have to compile from source to get the fix until the new binaries are released. /Edit: typos. |
Here is the process that you should follow.
or... You can wait until someone releases an official update. |
@jefferson-1 Thank you. I'm guessing I should just wait until an official release. That should probably come soon, right? It would be bad for a project to leave non-techies without access..? |
@althea16 Yes...the unpaid workers and contributors of Monero are working at it. I'm sure that it will happen. Given that they have released prior updates as quickly as possible...I'm sure that they will release this update soon. If you want it sooner, compile it yourself as I am doing. |
That is a different error. You may want to delete or move your wallet cache file elsewhere and try again. /Edit: this message was in response to a user who subsequently deleted his/her comment. |
Can Windows/macOS users who have troubles opening the Ledger wallet test the nightly linked by @iDunk5400 above? Does it fix the issue? |
I still have the following error: I've tried using
Both have the same error. macOS Mojave v10.14 |
I can confirm that the latest CLI nightly (I used the Win64 link that @iDunk5400 posted above) works fine and fixed the issue. Thank you everyone for finding the bug and fixing it so quickly! |
@DrCryptoKey can you try opening and closing the wallet like 20 times in a row? Some times I can get it to work 10 times in a row oddly. Since my windows machines have the issue I wonder if you ran into a string of “good luck”? |
@Zarkoob please run master binaries ( |
@xiphon thank you for taking the time for this! |
According to the logs the binary doesn't contain #4642 fix |
Finally localized Mac-related problem (thanks to @Zarkoob for IRC log-gathering session) OS Issue Workaround
Log
|
I had the same error. "Error: failed to load wallet: Wrong sequence_idx" Sorry for my English, |
This actually worked! Thank you! |
i came here to say this worked for me as well :) |
This issue is quite minor, simply opening the wallet again fixes the issue. It has happened a couple of times now so I’ve created an issue to document it.
/cc @cslashm
The text was updated successfully, but these errors were encountered: