Skip to content
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

Document need for 1Password to be installed to import on macOS #8259

Open
nodevnul opened this issue Jul 10, 2022 · 21 comments
Open

Document need for 1Password to be installed to import on macOS #8259

nodevnul opened this issue Jul 10, 2022 · 21 comments

Comments

@nodevnul
Copy link

You need to rename the .opvault folder to something else before it will work. This is a macOS limitation.

Originally posted by @droidmonkey in #8258 (comment)

@nodevnul
Copy link
Author

Sorry droidmonkey,

to what should I rename the folder ?

I renamed it to „Tresor”, without any dot that could indicate a suffix.

And - guess what - nothing. No import.

So would you mind to elaborate further ?

Thanks.

@droidmonkey
Copy link
Member

It has been too long for me to remember what to do. 1Password declares the folder to be a file on macOS which screws up the file selection process. Try various things, unfortunately I cannot provide further support.

@nodevnul
Copy link
Author

nodevnul commented Jul 10, 2022 via email

@nodevnul
Copy link
Author

The 1PW 7 generated directory

1Password.opvault

is a directory in Finder and terminal. The question is: Why can't KPXC simply be directed to the

1Password.opvault/default and parse the files there for import ?

@droidmonkey
Copy link
Member

Did you try this method? #4069 (comment)

@nodevnul
Copy link
Author

nodevnul commented Jul 11, 2022 via email

@nodevnul
Copy link
Author

nodevnul commented Jul 11, 2022 via email

@keepassium
Copy link

I concur that this is likely related to .opvault folder being recognized as a package.

On macOS 12.4 with 1Password 7 installed and .opvault selectable, running mdls 1Password.opvault lists this (among the other things):

kMDItemContentType                     = "com.agilebits.opvault"
kMDItemContentTypeTree                 = (
    "com.agilebits.opvault",
    "com.apple.package",
    "public.directory",
    "public.item"
)

@nodevnul , does it contain "com.apple.package" on your M1 system?

@nodevnul
Copy link
Author

nodevnul commented Jul 11, 2022 via email

@nodevnul
Copy link
Author

nodevnul commented Jul 11, 2022 via email

@keepassium
Copy link

So I think the md data can be modified in terminal

I could not find a way to do that, it seems to be updated by some system service depending on installed apps.

Btw, try to import the opvault the other way round: Finder → right-click the .opvault → Open with... → Other → select KeePassXC. If it is greyed out, change the filter from "Recommended Applications" to "All Applications".

@droidmonkey
Copy link
Member

Yah I thought we fixed this, we require 1PW to be installed on the system so that the "package" is registered. The old rename trick was before the fix. Unfortunately you can only choose a file OR a folder in pickers. So we original had a folder picker which failed when 1PW was installed, and on macOS we switched it to a file picker. Having 1PW installed is the most likely scenario so covers the majority of cases.

Should add a note about that in the docs.

@droidmonkey droidmonkey self-assigned this Jul 11, 2022
@droidmonkey droidmonkey added this to the v2.7.2 milestone Jul 11, 2022
@droidmonkey droidmonkey changed the title 1Password.opvault [1PW 7] - Import - Filepicker - „Open” greyed out - Import not possible Document need for 1Password to be installed to import on macOS Jul 11, 2022
@agsola
Copy link

agsola commented Aug 8, 2022

Yah I thought we fixed this, we require 1PW to be installed on the system so that the "package" is registered. The old rename trick was before the fix.

I can confirm this.
I had to go back to my old computer with 1Password installed in order to be able to import. No other solution worked (including changing extensions).
With 1password installed, no additional action required. Just worked out of the box.

@metawops
Copy link

Unfortunately, for me it does not work.

I get the Read Database did not produce an instance Unable to decode masterKey: Malformed OpData01 due to a failed HMAC error after successfully selecting the .opvault package (looks like a file but is a folder) and entering my master password. (And my master password does not include any "special" characters, just letters, numbers and normal punctuation marks that are on any keyboard.)

I'm on macOS 12.6 (Monterey) with 1Password 6.8.9 installed and created a new local vault in which I copied all my ~1170 entries of my main vault. I then set up sync to a folder for that new local vault and got the .opvault directory.
I'm using KeePassXC 2.7.1 (latest release as of this writing).

Interesting observation, though: when I right click on the .opvault entry in Finder and select "Open with ..." and choose KeePassXC to open it and enter my master password I then get another error message: Unable to open file /Users/stefan/1PasswordLocalVault.opvault. 🤷‍♂️

So, still no go for me. Any help/hints/ideas appreciated! 🙏

@droidmonkey
Copy link
Member

You can only open opvault from the Import menu. You need to put the 1password password in when opening. The error you received in the first part of your message means your opvault is either corrupt or you entered the wrong password.

@metawops
Copy link

You can only open opvault from the Import menu. You need to put the 1password password in when opening. The error you received in the first part of your message means your opvault is either corrupt or you entered the wrong password.

Actually, no.

The process I described in my comment above was made on an m1 Pro Max Apple Silicon MacBook Pro.

I did the exact same thing now on my Intel based iMac and everything worked like a charm!
So, my .opvault file is not corrupt and the password worked fine, too.

So it smells like it has something to do with the Apple Silicon build of KeePassXC I used on that M1 MacBook Pro.
Sounds weird, I know. But that's the only difference. On the Intel iMac with the Intel build of KeePassXC everything worked. 🤷‍♂️

@droidmonkey
Copy link
Member

droidmonkey commented Sep 17, 2022

Cool glad it worked but there is no code difference between the two platforms. Either way opvault format is no longer a thing in 1password so this import method is going away soon.

And yes that error message is output because decryption failed which means one of the two things I mentioned. Barring a compete failure in the decryption algorithm itself, which is very very unlikely.

@nodevnul
Copy link
Author

nodevnul commented Sep 17, 2022 via email

@droidmonkey
Copy link
Member

Nothing stops you from downloading an older version of KeePassXC from our releases page. Carrying dead code around is not in our best interest, especially when it's somewhat flaky and for a now unsupported feature.

@nodevnul
Copy link
Author

nodevnul commented Sep 17, 2022 via email

@nodevnul
Copy link
Author

nodevnul commented Oct 11, 2022 via email

@phoerious phoerious removed this from the v2.7.2 milestone Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants