adur1990 / Pass-for-macOS

macOS wrapper for pass, the standard UNIX password manager
BSD 3-Clause "New" or "Revised" License
112 stars 8 forks source link

Just not working #49

Closed AnotherProksY closed 3 years ago

AnotherProksY commented 3 years ago

Describe the bug

Pass for Mac OS do not save passwords in system clipboard.

To Reproduce

  1. Click on icon in Menu Bar
  2. Choose password
  3. Click on it or tap enter

Expected behavior

It will save password to system clipboard.

Screenshots

Preview

Desktop (please complete the following information)

Additional information

It works fine on the same setup on Intel, but not on M1.

adur1990 commented 3 years ago

Thank you for pointing out this issue. Unforrunately, I have no M1 based Mac. However, recent news pointed out that there is an issue with Universal Clipboard with M1 Macs. Could you try turning Universal Clipboard off and see if the issue persists?

AnotherProksY commented 3 years ago

Still not working after disabling Handoff feature :(

adur1990 commented 3 years ago

Hi,

I update Pass for macOS today. Could you update and check if it is still not working?

AnotherProksY commented 3 years ago

Hi!

Still doesn't work with or without Handoff. Two problems:

  1. I can't click on the selected password in the popup menu (no effect, endless press)
  2. I can't select it with tab + enter (tab to select an option + enter to actually press to save the password)

When I use Enter, the popup menu disappears as if clicked out outside the window.

This behaviour were here before update too.

adur1990 commented 3 years ago

This is strange. And you say using an Intel Mac it works for you? Unfortunately, I have no M1 Mac to look into this deeper. Could you use the Console.app and send me a console dump filtered by de.artursterz.passformacos? Maybe I can find something there.

AnotherProksY commented 3 years ago

Sure.

Mouse click in Safari pop-up shows this error:

identifier=de.artursterz.passformacos.extension, pid=5497, auid=501, euid=501, binary_path=/Applications/Pass for macOS.app/Contents/PlugIns/extension.appex/Contents/MacOS/extension attempted to call TCCAccessRequest for kTCCServiceAccessibility without the recommended com.apple.private.tcc.manager.check-by-audit-token entitlement

And 5 same error messages after previous error:

RBSStateCapture remove item called for untracked item 541-96603-122245 (target:[xpcservice<de.artursterz.passformacos.extension([app<application.com.apple.Safari.3420439.3420446(501)>:96603])(501)>:5497])
adur1990 commented 3 years ago

Okay, this tells me, that for some reason macOS on your system thinks that Pass for macOS should have the entitlement for the Accessibility features in macOS. However, Pass for macOS does not require these features at all, so I am not sure why this happens. Maybe Apple changed some APIs I am using for M1 Macs, but I don't know.

Some things to test:

  1. Open your system preferences, go to the Security settings and open the Privacy tab. Ideally, Pass for macOS should not appear in any of the sections. If it does for you, I would try to remove it entirely from any privacy section.
  2. Does you regular pass installation work from your Terminal? If not, make sure it does.
  3. Please run codesign --verify --verbose /Applications/Pass\ for\ macOS.app/ in your Terminal and check if the signature is detected correctly. Maybe you can post the results here.
  4. Please check, that Pass for macOS passes all system policies with the following command: spctl --assess --verbose /Applications/Pass\ for\ macOS.app/
  5. Finally, try to ad-hoc code-sign Pass for macOS for your self with the follwing command: codesign --force --deep -s - /Applications/Pass\ for\ macOS.app

I will have access to a M1 Mac on friday. I will test Pass for macOS there and see if I can find out anything else.

AnotherProksY commented 3 years ago
  1. Privacy tab is empty
  2. Yes, it does
  3. Output of the codesign --verify --verbose /Applications/Pass\ for\ macOS.app/:
    /Applications/Pass for macOS.app/: valid on disk
    /Applications/Pass for macOS.app/: satisfies its Designated Requirement
  4. Output of the spctl --assess --verbose /Applications/Pass\ for\ macOS.app/:
    objc[14913]: Class SPExecutionPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class AppWrapper is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class AppWrapperPolicyResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class AppWrapperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class SPLog is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class MIS is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class SPExecutionHistoryItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class SPExecutionPolicyItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class SPDeveloperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    objc[14913]: Class GKScanResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
    /Applications/Pass for macOS.app/: accepted
    source=Developer ID
  5. Output of the codesign --force --deep -s - /Applications/Pass\ for\ macOS.app:
    /Applications/Pass for macOS.app: replacing existing signature

Hope this helps!

adur1990 commented 3 years ago

Hi,

I had today the chance to get my hands on a M1 Mac and I think I found the problem, which is quite stupid. Turns out, that the default installation path for software installed with brew is different on M1 Macs. This results in the problem, that the pinentry program can not be found.

So, here is my proposed solution:

  1. As we messed with your installation, I would ask you to completely remove your current Pass for macOS installation and download it again either with homebrew or using the Github Releases page (or, of course, build it your self).
  2. Then, in the README, I wrote

    pinentry-program /usr/local/bin/pinentry-mac to ~/.gnupg/gpg-agent.conf

Please run which pinentry-mac in your terminal and replace the new path with the old path in your ~/.gnupg/gpg-agent.conf

  1. Reload the GPG-Agent with gpgconf --kill gpg-agent

Now give it try. Hopefully, it will work now. Please let me know whether it is working or not, so I can adjust the README accordingly.

adur1990 commented 3 years ago

Sorry, accidentally closed the issue.

AnotherProksY commented 3 years ago

I don't think that problem relates to pinentry, because it worked some time before several Big Sur updates. It already was set with correct path in gpg-agent.conf.

The actual problem with click behaviour. It seems that it can't select an option when I click or use Enter.

dtrainych commented 3 years ago

Hello. I have M1 MacBook and I have no problems at all. If you installed pinentry from Homebrew, gpg-agent.conf must look like this pinentry-program /opt/homebrew/bin/pinentry-mac.

Offtop. @adur1990 it is possible to do search for login field in whole password file and not only on second line?

adur1990 commented 3 years ago

@dimarei I'm glad it is working for you. Regarding the password file organisation: no, it is not. But you can create a feature request if you would like to see this feature.

adur1990 commented 3 years ago

I am closing this issue due to inactivity. Feel free to open it again.

alpaca1thunder commented 3 years ago

I am closing this issue due to inactivity. Feel free to open it again.

Having the same issue on my M1 machine, would love to help test any solutions. Pass for macOS is able to list the passwords in both the tray icon and through Safari, but the fields don't get filled/nothing gets copied to the keyboard.

adur1990 commented 3 years ago

Hello @meowmix3, could you try to go though all the above steps, so I can pin-point the problem?

adur1990 commented 3 years ago

I'm closing this issue again due to inactivity. Please feel free to re-open it.

falcaopetri commented 2 years ago

The pinentry setup proposed in https://github.com/adur1990/Pass-for-macOS/issues/49#issuecomment-829872340 fixed the issue in my M1 (I actually used the commands from README#Requirements).

@adur1990, my suggestion though is to improve README so this required step is made more explicit, since it's currently written within in a long full of commands paragraph.