error while trying to "recover" a key
jesuscript opened this issue · 8 comments
jesuscript commented
$ node unlock.js
/Users/megatv/CODE/ETHEREUM/unlock-acc/node_modules/keythereum/index.js:471
var iv = keyObject.Crypto.cipherparams.iv;
^
TypeError: Cannot read property 'cipherparams' of undefined
at Object.module.exports.recover (/Users/megatv/CODE/ETHEREUM/unlock-acc/node_modules/keythereum/index.js:471:34)
at Object.<anonymous> (/Users/megatv/CODE/ETHEREUM/unlock-acc/unlock.js:4:13)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Function.Module.runMain (module.js:457:10)
at startup (node.js:138:18)
at node.js:974:3
$ cat unlock.js
var key = require("./key.json"),
keyethereum = require("keythereum");
keyethereum.recover("password", key);
osx, keyethereum version 0.2.1
jesuscript commented
doh.
ignore this
jesuscript commented
actually, no - "crypto" in the keyfile should be lowercase; geth has got it wrong (there's a doc with the format specification somewhere)
tinybike commented
The aim here is to be consistent with geth's implementation. So, if geth is different than the formal specification, keythereum will use geth's version.
cheershendtco commented
hihi
I face same Error
/home/cheer/mtest/newProject2/Fileuploads/node_modules/keythereum/index.js:496
var iv = keyObjectCrypto.cipherparams.iv;
^
TypeError: Cannot read property 'cipherparams' of undefined
at Object.module.exports.recover (/home/cheer/mtest/newProject2/Fileuploads/node_modules/keythereum/index.js:496:33)
at /home/cheer/mtest/newProject2/Fileuploads/Server.js:109:30
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
cheershendtco commented
oh I know the reason cause my keyObject have no 'iv'
mariam-crissi commented
@cheershendtco Did you resolve this issue??I am also facing this same issue,,
mariam-crissi commented
@tinybike I am also facing this issue..How can it be resolved?
tinybike commented
Hm, what fields does your key object have? (Note: don't paste the actual values here, just the names of the fields.)