quasi-duplicate agilekeychains in dropbox

Options
ethangutmann
ethangutmann
Community Member
edited May 2017 in Mac

I have my keychain synced using dropbox between two Macs (10.12.4) and two iOS devices (10.3.1), and just recently noticed that (a) some passwords I expected to be in my keychain/vault were not on some computers, and (b) I seem to have two 1Password.agilekeychain packages (one file has a capital p, one has a lowercase p in the filename.)

On one of my computers I have my dropbox folder on a separate HFS+ case-sensitive file system which is symlinked from my home directory (which is on a standard case-preserving HFS+). I suspect this is the root of the problem, but I wonder if there could also be a bug in 1Password wherein at different points in the code it defaults to "1Password" or "1password", thus creating / updating the keychain on a case-sensitive filesystem can create duplicates?? These computers have both used multiple versions of 1Password over time, so it could even be that this bug was in an older version and has since been fixed.

Can anyone advice on the best way to:

  • Merge the two keychain/vaults without losing or creating hundreds of duplicate (or is there something better to do)
  • Keep this from happening again (do I have to move the dropbox folder off the case-sensitive filesystem?)
  • Something else I'm not even thinking of?

Thanks!
Ethan


1Password Version: 6.7.1
Extension Version: 4.6.5
OS Version: 10.12.4 (iOS 10.3.1)
Sync Type: Dropbox

Comments

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @ethangutmann,

    From your description (unless I misunderstood), it sounds like the problem is that you somehow ended up with two different sync files in Dropbox, so your devices are probably not all pointing to the same one. What you'll want to do first is check the sync settings in 1Password on each device:

    On each Mac:

    • Open 1Password and go to 1Password > Preferences in the menu bar.
    • Click the Sync tab.
    • Make sure it shows your Primary vault is set to sync with Dropbox.
    • If it shows a different sync option or says None, set up sync with Dropbox by following the steps here: Sync with Dropbox (Mac)
    • If Dropbox is already enabled in the sync preferences, check the file name and file path for the sync file in Dropbox.

    On each iOS device:

    • Open 1Password and go to Settings > Sync > Primary.
    • Make sure it shows the Sync Service is Dropbox.
    • If it shows a different sync service or says Start Syncing, set up sync with Dropbox by following the steps here: Sync with Dropbox (iOS)
    • If Dropbox is already enabled in the sync settings, tap "Sync Service" and check the file name and file path for the sync file in Dropbox (underneath Current Sync Method / Dropbox).

    If the problem is that some devices are syncing with a different file in Dropbox than the others, you'll need to disable the sync on those devices, then re-enable sync with Dropbox and choose the same sync file as the others. You shouldn't end up with duplicate items unless you created the same item multiple times on separate devices (in which case 1Password would see them as separate items, even if they contain the same data).

    Let us know how it goes and what you find, thanks!

  • ethangutmann
    ethangutmann
    Community Member
    Options

    Hi @Drew_AG,
    Thanks for the quick reply. My biggest concern is the case-sensitive file duplication component. Because some computers are on case-sensitive FS, and some are not, one computer shows two files (1Password.agilekeychain, and 1password.agilekeychain), but the other can't see this (case-insensitive) and iOS devices only show a single file (1Password.agilekeychain). I'm concerned because I don't know what data will get copied into the 1Password file and what may be copied into the 1password file, this feels like a bit of a weird edge case and I want to be sure there are no (known) complications to be careful of.

    The computer with the case-sensitive FS, shows that 1Password is synced using dropbox, and it refers to the uppercase P .agilekeychain directory. However, I don't know how the lowercase p file could have been created if not by 1Password. I never manually manipulate these files, though I suppose it could also be a bug in Dropbox that accidentally passed a lower-case filename at one point. In addition, within the lowercase p directory, there are files that list their modification time today (minutes ago), so I know something is still accessing that directory. Within the lowercase p vault, most of the "standard" files are not present, it only has the data/ directory, which only has the "default" directory, which has 4 .1password files and a contents.js file. The contents.js file refers to many more than 4 passwords. The uppercase P directory contains the usual (.html, a/, config/, and data/) files/directories, and the data/default directory has 400+ 1password files.

    One of my computers is not with me at present, so I'll have to check it this evening, the other is set up to sync properly (as are the iOS devices). Could it also be that on the other computer, 1Password is not set up internally with Dropbox as the Sync mechanism, but is using a vault that is stored in Dropbox (and thus is sort of synced without it knowing about it, which I imagine could also cause problems). Clearly all devices have synced at some point, because they all have most of my passwords.

    I should be clear too, that it is possible that they are still syncing correctly, but I somehow caught one when it was offline, or created a password on another computer when it was offline and haven't had it come back online yet. I haven't done extensive testing on this yet, but I do know that I have two agilekeychain files/packages with different case and am concerned about what havoc that may cause. For what it is worth, I just checked the Dropbox web interface and it only shows one directory (with an uppercase P).

    It sounds like any merging problems should be taken care of automagically at least, thanks. Still, are there any known or possible issues with case-sensitive file systems? or symlinked dropbox directories (esp. symlinked from case insensitive to case sensitive FS) The only thing I can find searching the forum / web are related to case-sensitive searches within 1Password.

    Thanks,
    Ethan

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    Hi @ethangutmann,

    When 1Password creates an Agile Keychain sync file in the local Dropbox folder, it names that file 1Password.agilekeychain (with a capital 'P'). So I don't know where the other one (with a lowercase 'p') came from, but from your description, it doesn't sound like a complete sync file. My guess is that having your Dropbox folder stored in a separate, case-sensitive filesystem and symlinked from your home directory is causing a little confusion for Dropbox, or possibly a legitimate sync issue for Dropbox due to somehow creating duplicate files with the same file name in all lowercase letters.

    If Dropbox is working correctly, then you should be able to have 1Password point to the same "1Password.agilekeychain" file from each device, and changes on one should sync to the others. But if the other filesystem & the symlinked Dropbox folder are causing a problem for Dropbox which prevents it from syncing your 1Password sync file correctly, you'll probably need to restore your Dropbox folder setup to its default configuration (i.e. the Dropbox folder is in your Mac username directory and not symlinked to another location).

    Could it also be that on the other computer, 1Password is not set up internally with Dropbox as the Sync mechanism, but is using a vault that is stored in Dropbox

    No, 1Password for Mac stores your data locally in an SQLite database file (located within the ~/Library/ directory). When syncing via Dropbox, 1Password copies data between that SQLite database and the sync file in the Dropbox folder. But regardless of whether or not you use one of the sync options, the data you see in the 1Password app is coming from the SQLite database. If that database was moved somewhere else on your Mac, the 1Password app wouldn't find it and would act as if you've never used it before (i.e. it would show you the 'Welcome' setup screen).

    are there any known or possible issues with case-sensitive file systems? or symlinked dropbox directories (esp. symlinked from case insensitive to case sensitive FS)

    That's probably a better question for the Dropbox developers/support team. I haven't heard of this specific setup before, but 1Password just creates a sync file in the local Dropbox folder on your Mac. It's up to Dropbox to sync that file to the Dropbox servers and your other devices, so the Dropbox team would have a much better idea if/how a setup like yours would interfere with that.

    But as I said above, it's probably better to just have your local Dropbox folder in the default location/configuration on your Mac instead of symlinking it to another file system which might be causing a problem.

    I hope this helps!

  • ethangutmann
    ethangutmann
    Community Member
    Options

    Thanks, that is useful insight into what is going on internally, and makes me feel a lot more comfortable removing the odd lowercase p directory. I don't have much choice in the current configuration as my dropbox folder is too large to fit in my home directory, though I'll try making sure both Dropbox and 1Password are pointed directly to the "real" Dropbox folder, instead of being pointed to the symlinked folder, and I will just use the symlink for convenience. I'll check out the home computer, make backups of everything and disabling sync, removing the lowercase p directory, then re-enableing sync on that computer (for some reason I thought 1Password worked with the Dropbox files, but maybe that was 3 or 5 major versions ago, or maybe it never did.)

    I'll report back if anything unexpected happens.

    Ethan

  • Drew_AG
    Drew_AG
    1Password Alumni
    Options

    You're very welcome, @ethangutmann! And you're right - back in 1Password 3, the .agilekeychain file was also the main database. That changed starting in 1Password 4, so the .agilekeychain is only used for syncing purposes now. Even if you deleted the .agilekeychain file from Dropbox, that would just break the sync, and your data would still be in the app.

    We're here for you if you need anything else! :)

This discussion has been closed.