phoenixlzx / 1password2pass

1password2pass is a tool to import passwords from 1password keychain to pass (passwordstore.org)
MIT License
13 stars 5 forks source link

Error upon running? #2

Open arkag opened 8 years ago

arkag commented 8 years ago

Running this on El Capitan with npm installed via homebrew.

/usr/local/lib/node_modules/1password2pass/lib/parse.js:26
                i.secureContents.fields.forEach(function(field) {
                                       ^

TypeError: Cannot read property 'forEach' of undefined
    at /usr/local/lib/node_modules/1password2pass/lib/parse.js:26:40
    at Array.forEach (native)
    at module.exports (/usr/local/lib/node_modules/1password2pass/lib/parse.js:11:11)
    at module.exports (/usr/local/lib/node_modules/1password2pass/lib/index.js:21:16)
    at Object.<anonymous> (/usr/local/lib/node_modules/1password2pass/bin/1password2pass:5:18)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
phoenixlzx commented 8 years ago

Please check your data.1pif, should be a JSON text file.

MartinRogalla commented 8 years ago

Had a similar problem. I removed the offending entry from the data.1pif file by looking at the last imported entries. Thanks @phoenixlzx, greatly appreciate you putting this together.

gregoriomelo commented 7 years ago

In my case, clearing the trash in 1Password did the trick.

woochica commented 5 years ago

I've just run into the same problem. In my case the problem was that the export data contained items that had the type webforms.WebForm but lacked the property fields. These items were available both under Passwords and Logins categories. Once I removed them, the import worked well.

Here's an example entry:

{
    "uuid":"D7C16849444B405F8B174A7596FC35AE",
    "updatedAt":1432541383,
    "locationKey":"example.com",
    "securityLevel":"SL5",
    "contentsHash":"84fe0d85",
    "title":"Login",
    "location":"http:\/\/www.example.com",
    "secureContents":{"URLs":[{"url":"http:\/\/www.example.com"}]},
    "txTimestamp":1493367852,
    "createdAt":1432541383,
    "typeName":"webforms.WebForm"
}