1Password.agilekeychain is overwritten with older keychain

Paul Hachmang
Paul Hachmang
Community Member

I'm tying to set up the sync between multiple computer here at the office, but I'm having trouble getting everything to work.

I've got a keychain, which is the most recent keychain I could find.

All 1Passwords use the latest version 5.1 Agile store.

  1. I uninstall 1password as completely as possible (used https://guides.agilebits.com/1password-mac-kb/5/en/topic/starting-over)
    cd ~/Library/Containers/ && ls | grep '1Pass|agile|2BUA8' | tr "\n" "\0" | xargs -0 rm -r
    cd ~/Library/Application\ Support/ && ls | grep '1Pass|agile|2BUA8' | tr "\n" "\0" | xargs -0 rm -r
    cd ~/Library/Preferences/ && ls | grep '1Pass|agile|2BUA8' | tr "\n" "\0" | xargs -0 rm -r

  2. I copy the 1Password.agilekeychain to a new (!) location on our Google Drive / Dropbox (used both, same problem).

  3. I wait for the file to upload to the could service.

  4. I open up 1Password and point to the agilekeychain. Everything looks fine. 1password doesn't update the keychain as long as I don't change anything, as I expect. In this keychain there are some passwords deleted, changed, etc. So I check for that file.

Now I go to another computer which had the problem with the old keychain. I check in the keychain package contents to see if it is synced properly, which is seems to be done properly.

Now I run step 1 on the other Mac, make sure is everything deleted. Now when I start 1password it indicates that is new and asks me to point to the agilekeychain. I select the newly synced keychain (with the correct data), it asks me to put in the password.

Now when I look up certain entries, they immediately contain old data (!). The sync service (Google Drive or Dropbox) start syncing like a maniac and one minute later I have wrong data on the original system..

Also, when I shut down all 1passwords (and mini's) and replace the agilekeychain with the correct one and I start up 1password it doesn't load the correct information back in?

I'm getting frustrated with this :(

Comments

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @Paul Hachmang,

    Well to state the obvious something certainly isn't right.

    If those are your exact steps then I do have a couple of questions.

    1. The guide has steps for quitting 1Password mini beforehand and rebooting your Mac afterwards to ensure nothing has remained in memory or been cached. Are you following all the steps?
    2. How do you have your systems configured as your commands don't return the expected results on a default system. For me I would need to alter the grep component to either grep or grep -E, otherwise it returns nothing.

    My next proposal is a little more convoluted so probably best to check the simple parts first. Certainly it should not be possible at all for an entirely fresh copy of 1Password to revert to old passwords.

    It might take a couple of posts but we will eventually resolve the issue.

  • Paul Hachmang
    Paul Hachmang
    Community Member

    Hi @littlebobbytables,

    1Password Mini wasn't running, made sure of that.
    To be honest, I haven't rebooted the macs.. Could that be it? What is causing this? Are there still some processes running or something, some things still cached?

  • Stephen_C
    Stephen_C
    Community Member

    To be honest, I haven't rebooted the macs.. Could that be it?

    Yes, with Yosemite it's quite possible. I strongly recommend rebooting.

    Stephen

  • littlebobbytables
    littlebobbytables
    1Password Alumni

    Hi @Paul Hachmang,

    I stand right next to Stephen_C here. OS X has had some pretty aggressive caching for the last few versions and the easiest way to ensure it isn't a factor is a good reboot. Messing around with my own system I've even once managed to reach a state where I could unlock a vault that shouldn't have existed any more.

    I can't say for certain that this is the cause but it would be prudent to eliminate it as a potential reason.

  • Paul Hachmang
    Paul Hachmang
    Community Member

    Macbook, has the following data, not set up on other systems yet:

    Keychain in finder:

    Everything is synced properly:

    Now, on to the iMac:

    • Google Drive has synced properly.
    • The edit date of the 1password keychain seems to match Google Drive.
      @littlebobbytables Thanks for the -E suggestion.

    Cleaning up the iMac:

    It immediately loads the faulty database and the 1password keychain is immediately rewritten. There are now 1013 items v.s. 1010 items on the Macbook, the size of the keychain has increased from 11,4MB to 11,8MB

    Next: search the whole disk for 1Pass|agilebits|2BUA8: find / | grep -E '1Pass|agilebits|2BUA8'

    Found some additional commands and ran the following commands to clean up some more files:
    cd ~/Library/Containers/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Application\ Support/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Preferences/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Caches/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Saved\ Application\ State/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Logs/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv cd ~/Library/Application\ Scripts/ && ls | grep -E '1Pass|agilebits|2BUA8' | tr "\n" "\0" | xargs -0 rm -rv

    • Reboot:
      killall -u $USER cfprefsd

    • Delete the keychain, remove it from the trash

    • Start up Google Drive, lets it sync the good keychain again (correct one is loaded and is indeed 11,4MB)
    • Load it in 1password again... Same problem...

    Does sync work properly?
    find 1Password.agilekeychain -maxdepth 10 -type f | wc -l
    Macbook: 1647
    iMac: 1646 (one file difference?)

    Other sync service?
    We've tried Dropbox as well, but the same problem occurred (haven't tested this thoroughly). I can also try to set up 1password on the iMac first and then sync it to the Macbook.

    I'm starting to think the keychain is broken in some way or something..

  • Paul Hachmang
    Paul Hachmang
    Community Member

    Start up Google Drive, lets it sync the good keychain again (correct one is loaded and is indeed 11,4MB)

    Well it seemed to have synced wrong, because 11,4 MB wasn't the right amount.. As the first screenshot pointed out, it should have been 11,8MB. So there might have been some sync issues? But that doesn't explain why the other computer is just syncing old data?

  • Hi @Paul Hachmang,

    This is really strange. I can't see anything in what you're doing that looks in any way shape or form wrong. The fact that 1Password is treating you like a new user when starting it up means it didn't find a local database, so it's starting clean.

    If possible, I'd like to get some Diagnostics Reports from these Macs. You can generate these by following the instructions on this page. Email them to support+forums@agilebits.com, and include a link to this thread. Mark each one as being from the Mac that either works correctly, or from the Mac that messes everything up. You should get an email back with a ticket ID. Feel free to copy/paste that onto this forum thread.

    Obviously you're a pretty technical user. Feel free to have a look in the Diagnostics Report yourself. The interesting bits will be in the Mini's logs. That's where I'm expecting to see something that gives us an idea of what's going on here and how to rectify it.

    Looking forward to hearing from you.

    Rick

  • Paul Hachmang
    Paul Hachmang
    Community Member

    @rickfillion Thanks for the suggestion. I solved it in the following way:

    1. Create a new (almost) empty 1Password database.
    2. Sync the database with everyone
    3. Add the correct keychain as a secondary database
    4. Export the correct keychain to the exchange format (1pif)
    5. Delete the secondary database
    6. Import the files into the empty database
    7. TADA, everything works.
  • That's great to hear, @Paul Hachmang. Thanks for posting your steps. :)

    Rick

This discussion has been closed.