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.
selsta@mbpR ~/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
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.selsta@mbpR ~/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
https://github.com/monero-project/monero/issues/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:
Error: failed to load wallet: Wrong sequence_idx
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
2018-10-15 17:14:32.291 3580 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's another USBLYZER capture
ledger.zip
@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.
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
2018-10-15 17:14:32.291 3580 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
There are no errors there.

Basically means Ledger isn't usable on Windows as of v0.13.0.2.
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.
In the GUI, if I select to create a new wallet I get the error message "failed to generate new wallet: Wrong sequence_idx". The ledger worked fine with GUI 0.12.3.
Things I tried;
1) Unplugging and plugging it back.
2) Different USB cables and ports.
3) Removed the Monero app from the device and re-installing it.
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:
https://pastebin.com/23KkmGz9
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)
To investigate more I need both log level 4 from cli and usblyser log and from as many failing machine.
On failing machine, you can also test that:
retry with 1 minute in case of failure
On failing machine, you can also test that:
- plug the NanoS,
- wait 30sec,
- launch the monero app
- wait 30sec,
- launch client
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
@doserFu
Which OS are you using?
@selsta
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...
@iDunk5400
Basically means Ledger isn't usable on Windows as of v0.13.0.2.
Works fine for me on Windows 10. Make sure you've installed the required dependency before building.
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
Monero released v0.13.0.3 binaries
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 --hw-device Ledger ?
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.
Edit2: Windows 10, latest windows updates, ledger fw 1.4.2.
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;
hmm I do no agree with the previous patch, If I correctly re-read the code:
00 ins p1 p2 lc=00 and return offset=5 (next byte offset, actual length)00 ins p1 p2 lc=00 payload=00lc is in fact 1, one byte data payload the option
having the same issue myself (https://monero.stackexchange.com/questions/10366/v0-13-0-2-monero-wallet-cli-error-failed-to-load-wallet-wrong-sequence-idx-l)
using ledger fw 1.4.2 & Windows 10 I keep getting the same error after entering my Wallet password:
Error: failed to load wallet: Wrong sequence_idx
Tried some of the recommended fixes from this thread like waiting 30 seconds-1 minute between plugging into USB & running Monero App. I also tried not plugging in the Ledger Nano S until I get prompted for the password, and then after plugging it in, entering PIN & opening the Monero App I enter the wallet password, but still get the same 'Wrong sequence_idx' error.
Any & all help appreciated!!!
For any test, keep in mind that the application on NanoS SHALL BE launched BEFORE the monero desktop client.
For any test, keep in mind that the application on NanoS SHALL BE launched BEFORE the monero desktop client.
just tried this, i'm on windows 10 and it's not working for me as well :(
i have tried in different win10 machines and the same happens...!
Spent all day pissing about with this. macOS High Sierra + Monero 13.0.3 and Ledger Nano S 1.4.2 and I'm getting the Couldn't open wallet:wrong sequence idx or Couldn't open wallet: std::bad_alloc both alternating as they please. Tried several different USB ports and I still have the same issue.
To those affected, can you try git revert bd7b800 and see if that makes any difference ?
@iDunk5400 - Can you please explain what to do with 'git revert bd7b800' in more detail? Happy to try.
He means for someone to recompile 13.03 without that change
I suggest if you kept your old version 12 client to move funds elsewhere before tomorrow. That is what I am doing.
@smurfguy12 - Unfortunately I do not have the 12 GUI any longer. Not sure if it can be emailed if someone still has it?
Send to where? Mine are on a Ledger Nano S. I think once the bugs are fixed we'll be good to go. It's not like the Monero is disappearing off of the Ledger.
It's not disappearing, but it's going to be a hell of a lot harder to access your money once this fork happens.
v0.12.3.0 GUI is not that hard to find if you want to transfer from your device until this is fixed.
@smurfguy12 what if we access the Ledger Wallet trough monerujo? Would that make sense? I still don't understand why it would be harder to access the money after the fork.
@arguser Not gonna lie. Did not know about monerujo. Pretty cool. Convinced me to finally get an OTG cable.
@iDunk5400 Thanks for that bud. Just installed it and now even v0.12.3.0 wouldn't open the wallet (macOS High Sierra). Think I'll just have to wait it out 'till the workable v0.13 gets released.
Also receiving this error when using the GUI with a Nano S on Win 10.
Im having the same issue on Win 10. I upgraded to the newest build recently and this error popped up :(
I have tried cleaning all files that XMR created on my PC but still same issue :(
"Error: failed to load wallet: Wrong sequence_idx" also here with a Ledger Nano S.
Windows 10, both with GUI and CLI.
pending fix incoming : #4643
maybe stupid but I was not able to launch with the connection to the ledger (I had the error src/device/device_io_hid.cpp:97 Unable to open device 1:11415) until I did run the start--gui.sh in sudo. If it helps anyone...
I am having the same problem with gui v0.13.0.3.
"Couldn't open wallet: Wrong sequence_idx"
I am hoping some specific instructions will surface on how to fix this. I'm very confused...and worried. But glad that I found this thread, at least.
Does anyone how to proceed?
@althea16 The problem will be fixed with v0.13.0.4, which should come out in the next days.
@althea16 The problem will be fixed with v0.13.0.4, which should come out in the next days.
@selsta Thank you!
Believed fixed now.
+resolved
I've checked out the latest commits and built. My Monerod / wallet CLI version now shows
Monero 'Beryllium Bullet' (v0.13.0.3-4ad6b662)
I do think the fix for these changes are incorporated but I'm still getting
Error: failed to load wallet: Wrong sequence_idx
@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:
"Couldn't open wallet: Wrong sequence_idx" using the available gui v0.13.0.3.
Why is this marked resolved?
@Zarkoob are you sure you checked out the latest master branch? Could you provide git log -n 1 output?
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?
@althea16 It is marked as resolved because a fix has been merged.
As @selsta mentioned, this is a dev issue tracker, not a user support forum.
master, #4643 has been merged to release-v0.13.Okay ... so we have to include the updated Monero codebase when recompiling Monero GUI. Got it.
4642 has been merged to
master, #4643 has been merged torelease-v0.13.
Thank you. So if I delete my current V0.13.0 and reinstall then it should work?
@jefferson-1 If you're building Monero GUI from release-v0.13 branch, try replacing as yet non-existent v0.13.0.4 tag with release-v0.13 branch here.
@althea16 You have to compile from source to get the fix until the new binaries are released.
/Edit: typos.
@althea16
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:
Error: failed to load wallet: Wrong sequence_idx
I've tried using
(v0.13.0.0-master-2287fb9f)
(v0.13.0.3-4ad6b662)
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 (v0.13.0.0-master-2287fb9f would be fine) and provide the monero-wallet-cli logs with --log-level 4
@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
macOS Mojave v10.14
Issue
We are invoking hid_open_path to open a device.
And there is no way to select a desired device with HIDAPI if both devices have the same OS-specific device path, Using hid_open won't work either, it is implemented through hid_open_path as well.
Workaround
depends might resolve the issue.Log
2018-10-23 02:49:34.902 0x11929f5c0 DEBUG device.io src/device/device_io_hid.cpp:83 Looking for HID Device with interface_number 0 or usage_page 65440
2018-10-23 02:49:34.902 0x11929f5c0 DEBUG device.io src/device/device_io_hid.cpp:92 SKIPPED HID Device path USB_2c97_0001_14200000 interface_number -1 usage_page 61904
2018-10-23 02:49:34.902 0x11929f5c0 DEBUG device.io src/device/device_io_hid.cpp:92 SELECTED HID Device path USB_2c97_0001_14200000 interface_number -1 usage_page 65440
Thanks @xiphon
I debugged with @Zarkoob and using the latest master version seems to have fixed the issue. (At least it didn’t occur after opening the wallet 25 times in a row.)
If @selsta is unable to reopen this issue, I guess we can move to #4706.
I had the same error. "Error: failed to load wallet: Wrong sequence_idx"
My solution was to go to "USB Configuration" then "Bluetooth and other devices" In "Other devices" "Ledger S" Remove device.
Then it worked.
Sorry for my English,
I do not know if the problem had already been solved.
Greetings.
I had the same error. "Error: failed to load wallet: Wrong sequence_idx"
My solution was to go to "USB Configuration" then "Bluetooth and other devices" In "Other devices" "Ledger S" Remove device.
Then it worked.Sorry for my English,
I do not know if the problem had already been solved.
Greetings.
This actually worked! Thank you!
I had the same error. "Error: failed to load wallet: Wrong sequence_idx"
My solution was to go to "USB Configuration" then "Bluetooth and other devices" In "Other devices" "Ledger S" Remove device.
Then it worked.Sorry for my English,
I do not know if the problem had already been solved.
Greetings.
i came here to say this worked for me as well :)
Most helpful comment
pending fix incoming : #4643