Multiple Profiles: Use `firefox` instead of `firefox-bin` when launching from command line

Options
Stevan_1
Stevan_1
Community Member
edited September 2014 in Mac

Dear Support team,

I recently installed Firefox 32.0.2 with multiple profiles (private and work) and have setup an .app that opens the respective profile (/Applications/Firefox.app/Contents/MacOS/firefox-bin -P Work -no-remote). The .app is in the Applications folder. However, 1Password does not seem to like this and returns the error message. Un- and re-installing the extension does not do the trick. How can I make 1Password work as it's supposed to? ;-)

Thanks and best
Stevan

Comments

  • khad
    khad
    1Password Alumni
    Options

    For security, 1Password checks each browser's code signature before it fills to protect you from a malicious app masquerading as a legitimate browser. I wonder if the .app you created is causing the problem. How did you create the .app bundle? If it isn't launching the "real" Firefox.app separately, that is likely the problem.

    Please let me know.

    Cheers!

  • Stevan_1
    Stevan_1
    Community Member
    Options

    Thanks for the explanation. I used the Automator with the above-mentioned command. So, it's probably a new .app that launches FireFox.app?

  • khad
    khad
    1Password Alumni
    edited September 2014
    Options

    Hm. I would think so. Let's do a quick test. :)

    I wouldn't recommend leaving it disabled, but just for the sake of troubleshooting I'd be curious if disabling Preferences > Advanced > Verify browser code signature makes a difference.

  • Stevan_1
    Stevan_1
    Community Member
    Options

    Works with disabled browser code signature. So, what can I do to make it work without having to turn off browser verification? ;-)

  • khad
    khad
    1Password Alumni
    Options

    Does it work if you simply launch the same command from the Terminal (with code signature verification enabled)?

    /Applications/Firefox.app/Contents/MacOS/firefox-bin -P Work -no-remote
    
  • Stevan_1
    Stevan_1
    Community Member
    edited September 2014
    Options

    Does not work, either. However, if I open the "normal" Firefox app and select the corresponding profile manually from the profile manager, it works. But that is exactly what I don't want to do, because I want to use 2 profiles in parallel...

  • sjk
    sjk
    1Password Alumni
    edited September 2014
    Options

    Hi Stevan ( @Stevan_1 ),

    Do you have unmodified Firefox 32 installed as /Application/Firefox.app and a separate Automator application also installed in the system /Applications folder that runs the

    /Applications/Firefox.app/Contents/MacOS/firefox-bin -P Work -no-remote
    

    command? And when you run the Automator application it opens Firefox with the Work profile, but 1Password filling only works with it when the Verify browser code signature option is disabled?

    Please correct me if that's not accurate and, if possible, post a screenshot of Automator with your custom application opened in it.

    Thanks!

  • Stevan_1
    Stevan_1
    Community Member
    Options

    @sjk: 100% as you wrote it. See screenshot attached. Thanks!

  • khad
    khad
    1Password Alumni
    edited September 2014
    Options

    Thanks for confirming, @Stevan_1‌!

    My understanding of profiles in Firefox is that they are not intended to be used for much more than troubleshooting. The fact that they don't exist anywhere in the UI certainly seems like circumstantial evidence for that theory. Additionally, Mozilla has stated this explicitly in their support document "Use the Profile Manager to create and remove Firefox profiles":

    Note: You normally don't need to create a new Firefox profile unless you are troubleshooting a specific problem with Firefox.

    For now, I think your options are

    1. Launch the Firefox and select the profile from the list as it sounds like that doesn't cause the problem with the code signature.

    2. Or you could disable code signature verification if you were with familiar and comfortable with the risks associated with doing so.

    What is strange is that I wouldn't guess that the command line switch to launch a specific profile would affect the code signature, but it seems to be doing exactly that. I will mention this to the developers to see what we can do on our end (if anything).

  • khad
    khad
    1Password Alumni
    Options

    Part of the problem may be running multiple profiles at once. I don't think 1Password mini can identify the process that is connected if the process creates multiple connections.

    It is odd that even simply using the command line to force the profile manager (without specifying a particular profile)…

    /Applications/Firefox.app/Contents/MacOS/firefox-bin -P
    

    …produces a different result from unchecking the box to "Use the selected profile without asking at startup" and just double-clicking the Firefox.app in Finder.

  • Stevan_1
    Stevan_1
    Community Member
    Options

    @khad: It's strange indeed. I prefer to use 2 profiles at the same time, one for work and one privately. Since I am mainly using the work profile I just launch Firefox the normal way and select that one, so that 1Password integration works. For the private one, it's then copy&paste... Really curious about developers' feedback! Thank you, guys!

  • sjk
    sjk
    1Password Alumni
    Options

    Hey Stevan ( @Stevan_1),

    As @khad mentioned in post #10:

    What is strange is that I wouldn't guess that the command line switch to launch a specific profile would affect the code signature, but it seems to be doing exactly that.

    Looks like this is the core issue:

    codesign -vvvv /Applications/Firefox.app/Contents/MacOS/firefox-bin /Applications/Firefox.app/Contents/MacOS/firefox-bin: code object is not signed at all In architecture: x86_64

    I'm not familiar with details of code signing, but it seems firefox-bin needs to be code signed before it could interact with 1Password while Verify browser code signature is enabled, regardless of how many Firefox profiles are open.

    I've found a third option that you'll likely be most satisfied with, if there are no ill effects. Simply use:

    /Applications/Firefox.app/Contents/MacOS/firefox

    … instead of:

    /Applications/Firefox.app/Contents/MacOS/firefox-bin

    In some basic testing, 1Password worked fine in multiple open Firefox profiles and with Verify browser code signature enabled. I didn't spot any problems. Of course if Firefox is the default browser, the order profiles are opened/closed in can determine which is considered the current default. Things like that are general profile handling issues, not something specific to 1Password.

    I hope you're able to make this work for you!

  • Stevan_1
    Stevan_1
    Community Member
    Options

    @sjk: Yes, that seams to work just fine. Do you, by any chance, have a resource stating the difference between "firefox-bin" and "firefox"? Thanks so much, solved the my problem.

  • sjk
    sjk
    1Password Alumni
    Options

    Glad to hear you got that working, Stevan!

    On the firefox(1) - Linux man page it says:

    firefox is a simple shell script that will set up the environment for the actual executable, firefox-bin.

    But that's not true on OS X, where they appear to be functionally identical even though the file sizes differ:

    -rwxr-xr-x@ 1 user admin 58000 Sep 24 22:24 firefox -rwxr-xr-x@ 1 user admin 44164 Sep 24 22:24 firefox-bin

    There's some recent discussion here:

    658850 – Avoid duplicating "firefox" as "firefox-bin"

    And these older topics:

    firefox vs. firefox-bin (on a Mac) • mozillaZine Forums

    firefox-bin? (Mac OSX) • mozillaZine Forums

    Maybe poking around in Google search results for things like firefox bin vs firefox mac would reveal more. :)

  • Stevan_1
    Stevan_1
    Community Member
    Options

    @sjk: Once again, thank you! Great support (also thanks to @khad) and solved this particular issue ;-)

  • khad
    khad
    1Password Alumni
    Options

    That is great news! Thanks for letting us know all is well. I guess I was up too late and didn't even check the code signature (or lack thereof) for firefox-bin. It all makes sense now. :)

    If we can be of further assistance, please let us know. We are always here to help!

This discussion has been closed.