-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Error View Wallet Info "Invalid password. :RangeError: private key length is invalid" #259
Comments
edit: Post-issue summary here: #259 (comment). You're not going to want to read this whole thread and it's mostly trying to figure out what was happening, not how to solve it.I just went through all the emails and the only time we've received a message regarding this that eventually got resolved was with a guy using an private key from Icebox. Is this the same in your case? Regardless, go to the console and paste the following:
It will spit out all your wallets and each will look like this:
Copy that to a .txt document. (hold on testing) |
Ugh. Okay. This is going to get messy. Bear with me. In a NEW text document paste the following:
Copy the Address, Ciphertext, IV, N, SALT, mac, and ID from your first text document and paste it into the areas I've designated in your second document. Save it as UTC-YOUR_ADDRESS_HERE_WITHOUT_0X_BEFORE_IT as either a .txt, .json, or no extension. Go to https://www.myetherwallet.com/#view-wallet-info and attempt to decrypt it. If you get an error, let me know. I'm sure there is an easier way but that's all I got for now. |
Hi @tayvano, ok so I have a different output when pasting the first command you mentioned. The JSON that returned only had the "nick", "priv" and "type" keys like this:
I'm guessing that is causing the error... Seen this before? Many thanks for the help so far! |
Oh that's interesting. Hmmmm... We did a lot of testing before migrating to the new keys (months and months ago) so that this wouldn't be an issue but apparently something went wrong somewhere. Try copying just the information after It should ask for your password. If it decrypts that way successfully, remove the wallet from your Chrome Extension and then re-add it using the same method (add wallet -> private key) If it doesn't decrupt successfully, let me know. You may have issues re-adding it to the CX if the password is under 3 characters or something. If that is the case, let me know and I'll update the validation so that you can add it, even with your super short password. |
I have exactly the same problem when I try open my keystore file on https://www.myetherwallet.com |
I just went through all my old backups and still can't recreate this issue. 😠 Can you give me details like: Where did the file come from? When / where was the wallet generated? How many characters is the private key? Or, if it's a JSON, what are some of the keys that are in it (januszdotnl already did this above) I'm going to try to revert back to an old version of the chrome extension, generate a new wallet, and see what happens. I'm also trying to nail down when this started occurring and maybe the commits before that will shed some light? |
Here's another report when user was trying to use ledger on offline. Wondering if it can also help narrow down where this error is coming from. |
So I just tested with all private key versions found in CX v 0.0.3 And had no issues. I also created a key in 0.0.3 and then updated the app to 0.2.2 and then 3.1.3 and still had no issues decrypting or viewing the wallet. Now I'm really confused. |
@vied12 @januszdotnl Do either of you have a version of the key that is NOT working that does NOT have your life savings in it that you would be willing to email us? We've been looking through stuff all night and cannot figure out what is going on. We would attempt to convert to a working key first and immediately transfer all the funds in it to a new address that you designate. Then we would use that key to figure out how to keep this error from happening to others. Thank you in advance. |
Hi @tayvano , json file name: UTC--2016-05-27T06-58-44.141984544Z--4692c5add9815e24b1b23ccc016280b3d54ff359 Sorry I don't have empty wallet that doesn't work |
@vied12 Thank you. So I replaced the address, ciphertext, iv, salt, mac, and id with the values found in one of my keystore files created around the same time via ethereum wallet mac and it decrypted. the cipher, kdf, n, and so on already matched. So it's not a file format thing. Let's try this: can you save the following in a file named like
password is |
Thanks for keeping trying :) I can unlock it Le jeu. 3 nov. 2016 à 11:08, Taylor Van Orden notifications@github.com a
|
@vied12 That's actually quite helpful. So what I'm guessing is that something we are using implemented better checks for private key length and that's why this is happening? I thought it might have been ethereumjs-utils but apparently rolling that back breaks the entire site. So instead, I'm going to have YOU roll back and see if you can decrypt there and then at least you can (hopefully) decrypt and access your funds and whatnot. To do this, download the version of our repo from a couple months back here: https://github.com/kvhnuke/etherwallet/archive/dfda56db1a3408a52e29afbcaedd64363b4fe9ea.zip unzip it and double-click If you can decrypt it, you can most likely send from it, or use the view wallet info tab to grab your unencrypted private key and use that on the current version of the site for the time being. If that fixes it then we have narrowed the problem and may be actually able to fix it. It's 4am though and I just broke the site once so we're going to bed. I feel like we're closer to solving the problem. But we're still unable to recreate the issue which is the oddest thing. But hopefully this gives you access to your funds again, which is the most important thing. Thanks for all your help. note to future-awake-self: eth-lightwallet seemed to have a similar issue....but it was a long time ago. I don't know how these are related but I feel like they might be? Consensys/eth-lightwallet#60 |
Haha yes go find some rest that you deserve ! Unfortunately I have the same error with https://github.com/kvhnuke/etherwallet/archive/dfda56db1a3408a52e29afbcaedd64363b4fe9ea.zip Good night and sweet dreams |
Poop. I had high hopes for that. We can try going back further in time? Im starting to wonder if this is an ethereum wallet issue. @januszdotnl what is the N value in your private key that isn't working? 262144? |
Found it. Look like everyone's ensuring 32 bytes now. I'm sure we updated a library that now checks for 32 bytes when it didn't before. And since there's such a low probability of having a key with 31 bytes, we couldn't recreate. @kvhnuke can fix by adding padding tomorrow. Good details in this issue: |
Cool! Thanks a lot for all your investigations ! I'm waiting for any update Le jeu. 3 nov. 2016 à 13:00, Taylor Van Orden notifications@github.com a
|
keys to test with: https://github.com/Gustav-Simonsson/go-ethereum/blob/7cc6b801e0967e5ebfa26b9f670675acea6e3a20/accounts/testdata/v3_test_vector.json implementing in next couple hours |
Alright just pushed an update (#dc995ff) which hopefully fixes it. Not live on the Chrome Extension yet, so please try on MyEtherWallet.com |
Resolved in f1b6a13 by padding keys with 30 or 31 bytes so they are the required 32 bytes. No longer occuring in >v0.3.2.1 |
It works now perfectly ! Thanks again |
@vied12 Yay! So glad we finally got this worked out. What a weird situation. Go buy a lotto ticket. You were one of the lucky 0.3% to have a key with 31 bytes. 🎰 |
Since this thread is long but certainly going to be something that other developers encounter, here is a summation.
So moving forward, most should already pad keys with less than 32 bytes. However, if you encounter an old key you should pad it before attempting to interact with it.
|
…info-tab update/network-info-view
Hi,
I'm trying to view the wallet to download the corresponding keys. After entering my password I get the "Viewing wallet" screen, although nothing is filled in. However, in the console I see a "Invalid password. :RangeError: private key length is invalid" error. I'm positive that I am using the right password. The behaviour is different when I enter a invalid password which just returns me an "Unable to decrypt" message.
Anyone that has seen this before? Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: