Duplicate copies confuses 1Password

On the Mac 1Password stops working with its help applications if there is a copy on another disk as can commonly occur with another backup.

Agilebits helped me with this months ago and I fortunately remembered what was going on when I was testing creating a bootable backup and 1Password failed again.

I have not run across any other app that gets confused by copies on other volumes. I would hope that this problem could be eliminated or at least diagnosed.


1Password Version: 8.7.0
Extension Version: Not Provided
OS Version: MacOS 12.3

Comments

  • PeterG_1P
    edited March 2022

    Hi @SteveLazarus, thanks for bringing this to our attention.

    Can you tell me a little more about this? I'm not sure I understand under what circumstances 1Password is getting confused. Is it when you restore from a backup? Or: are you able to provide steps we could use to reproduce the issue?

    While we typically don't recommend making manual backups of your 1Password database (since our 1Password.com service is already keeping things in sync across multiple devices for you anyway, and we don't want you to end up with conflicting copies of your data), I'd be happy to learn more about this, help you resolve the issue, and make sure it doesn't recur in the future.

  • SteveLazarus
    SteveLazarus
    Community Member

    Sorry if I wasn't clear.

    I had a copy of my boot volume such as performed by CC Cloner, Chronosync or others. That means there was an Applications and copies of 1Password in both locations. To get things to work again 1Password needs to be deleted from the backup and excluded from further backups.

  • Hey @SteveLazarus:

    Thanks for clarifying. Generally speaking, we'd recommend excluding the 1Password app itself from your backups. macOS has been known to start a copy of application from a different partition, and this can cause issues. Out of an abundance of caution, we recommend not backing up the 1Password app itself to Time Machine or similar. You can always download a replacement copy of 1Password from our website.

    Jack

  • SteveLazarus
    SteveLazarus
    Community Member

    I understand the recommendation and am following it. But, I don't technically understand why this should be an issue. There is no other application that I have seen get confused by having a backup. It would be a real pain in the lower posterior if this was a frequent problem. It seems to be that 1Password should readily be able to look only at the boot drive.

  • Hey @SteveLazarus:

    The short version is that 1Password itself can't control which version of the extension helper apps are launched by macOS if there's multiple copies. A part of macOS called launchd is asked to launch the 1Password extension helper, but if there's multiple copies of it available, it may choose the wrong one (one stored in a backup or somewhere other than the 1Password app that's currently open). If this were to happen, the main 1Password app, and the extension helper would be different versions, which could cause issues.

    Jack

  • SteveLazarus
    SteveLazarus
    Community Member

    Jack,

    Launchd uses a plist file which contains a path to the item to be launched. I would expect that path to begin with something like "/Applicatons" or "/Library" and thus reference only the startup volume. I cannot find a plist file for 1Pasword in /Library/LaunchDaemons to peruse. Please feel free to give me the long version and explain how launchd can get confused about where to find the program 😀.

    In perusing a bit more, I suspect you may be using an XPC service which is a bit more complicated than just a startup application. Again, I would appreciate better understanding.

    Steve

  • Hey @SteveLazarus:

    Making me dig here a bit! 😁 We don't put a launch daemon or launch agent plist on the system, as that's not sandbox safe. ServiceManager and LaunchServices are responsible for deciding which one we try to launch. We provide a bundle identifier of the process we'd like to launch on startup, and LaunchServices and ServiceManager take care of the rest. If multiple copies of 1Password.app exist on the system, then the extension helper launched by LaunchServices can no longer be guaranteed to be the same extension helper that's in the current copy of 1Password.app in /Applications.

    Let me know if that makes sense!

    Jack

  • SteveLazarus
    SteveLazarus
    Community Member

    Happy digging Jack! Again, I would think that you can specify running the helper from /Applications (or maybe /User/Applications.

    The question may become what is in the bundle identifier. I would hope that an app can identify it's launch directory and then use this to information to launch the help. I don't know if all bets are off with Electron.

    From a personal perspective, I have learned how to avoid the problem. From a developer perspective you need to do the usual cost/benefit analysis. My opinion is that you should be unhappy with the situation, don't know if I can make you unhappy enough to fix it .

  • @SteveLazarus

    I understand it is frustrating to have to work around this, but we've looked at it extensively and there isn't currently a better path forward.

    I don't know if all bets are off with Electron.

    The situation existed with 1Password 7 as well, which didn't use Electron. This isn't an Electron problem.

    Again, I would think that you can specify running the helper from /Applications (or maybe /User/Applications.

    We cannot; there is no mechanism for us to do that, I'm afraid. You can find Apple's docs on the system here:

    SMLoginItemSetEnabled(::) | Apple Developer Documentation

    The question may become what is in the bundle identifier.

    The bundle identifier is just a simple string that identifies the application, e.g. com.agilebits.onepassword7

    Bundle IDs | Apple Developer Documentation

    Ben

This discussion has been closed.