Beta Error - Unable to sign emails

Pertinax77's Avatar

Pertinax77

14 Dec, 2014 06:22 PM

Hi

On trying to send a signed email (using Apple Mail with GPGMail plug-in active) I receive the following
error message:

gpg: problem with the agent: No pinentry
gpg: skipped "0AF3BCFE53DE223D5D7C546453C8B27223A0D738": Operation cancelled
gpg: signing failed: Operation cancelled

Could someone please suggest a solution? I have the GPGMail beta installed (2.5b3).

Sandeep

  1. Support Staff 1 Posted by Luke Le on 14 Dec, 2014 07:34 PM

    Luke Le's Avatar

    Hi Pertinax,

    we're sorry you're running into this problem.
    The solution is to log off and log back on, but would it be possible to run the following commands first?

    ps aux | grep -i pinentry
    ps aux | grep gpg
    

    Thanks.

  2. 2 Posted by Pertinax77 on 14 Dec, 2014 08:06 PM

    Pertinax77's Avatar

    OK the results are (srm is the root user)

    srm 8407 0.0 0.0 2433796 544 s000 R+ 8:04pm 0:00.00 grep -i pinentry
    srm 717 0.0 0.1 2495796 2900 ?? S Wed02am 0:10.46 /Library/Application Support/GPGTools/org.gpgtools.Libmacgpg.xpc
    srm 456 0.0 0.0 2536464 708 ?? Ss Tue11pm 0:30.30 /usr/local/MacGPG2/bin/gpg-agent --daemon
    srm 388 0.0 0.0 2436440 4 ?? S Tue11pm 0:00.01 /bin/bash /usr/local/MacGPG2/libexec/shutdown-gpg-agent
    srm 8409 0.0 0.0 2432772 648 s000 S+ 8:04pm 0:00.00 grep gpg

  3. Support Staff 3 Posted by Luke Le on 14 Dec, 2014 08:10 PM

    Luke Le's Avatar

    If you have gdb installed, would yo mind running the following commands as well:

    gdb /usr/local/MacGPG2/bin/gpg-agent 456
    

    and then

    info threads
    bt
    
  4. 4 Posted by Pertinax77 on 14 Dec, 2014 08:32 PM

    Pertinax77's Avatar

    I don't think gdb exists and I've read it has been discontinued by Apple. Should I install it (via Macports or Homebrew)?

  5. Support Staff 5 Posted by Luke Le on 14 Dec, 2014 08:39 PM

    Luke Le's Avatar

    Ah, my bad.

    do you have lldb by any chance?

  6. 6 Posted by Pertinax77 on 14 Dec, 2014 08:52 PM

    Pertinax77's Avatar

    yes

  7. Support Staff 7 Posted by Luke Le on 14 Dec, 2014 08:54 PM

    Luke Le's Avatar

    perfect! Than the following commands should work:

    process attach --pid 456
    thread list
    thread backtrace
    

    Please post the output, it might finally give us an idea why this is happening.

    Thank you very much for the help!

  8. 8 Posted by Pertinax77 on 14 Dec, 2014 09:30 PM

    Pertinax77's Avatar

    OK here is the output in lldb

    (lldb) process attach --pid 456
    error: attach failed: lost connection

  9. Support Staff 9 Posted by Luke Le on 14 Dec, 2014 10:00 PM

    Luke Le's Avatar

    hmm.. seems like the pid 456 is no longer a valid process.
    Could you run

    ps aux | grep -i gpg-agent
    

    again and replace 456 with the pid you see from that output?
    Oh and is the error still happening?

  10. 10 Posted by Pertinax77 on 14 Dec, 2014 10:06 PM

    Pertinax77's Avatar

    (lldb) process attach --pid 396
    Process 396 stopped
    Executable module set to "/usr/local/MacGPG2/bin/gpg-agent".
    Architecture set to: x86_64-apple-macosx.
    (lldb) thread list
    Process 396 stopped
    * thread #1: tid = 0x0d2a, 0x00007fff925043f6 libsystem_kernel.dylib`__select + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    (lldb) thread backtrace
    * thread #1: tid = 0x0d2a, 0x00007fff925043f6 libsystem_kernel.dylib`__select + 10, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
      * frame #0: 0x00007fff925043f6 libsystem_kernel.dylib`__select + 10
        frame #1: 0x000000010011010c libpth.20.0.27.dylib`__pth_sched_eventmanager + 1909
        frame #2: 0x000000010010f8f8 libpth.20.0.27.dylib`__pth_scheduler + 1082
        frame #3: 0x00000001001119f5 libpth.20.0.27.dylib`pth_spawn_trampoline + 27
        frame #4: 0x000000010010edda libpth.20.0.27.dylib`pth_mctx_set_bootstrap + 126
        frame #5: 0x000000010010ed5c libpth.20.0.27.dylib`pth_mctx_set_trampoline + 37
        frame #6: 0x00007fff9016ff2d libsystem_platform.dylib`_sigtramp + 45
        frame #7: 0x00007fff92504727 libsystem_kernel.dylib`__sigsuspend + 11
    (lldb)

  11. Support Staff 11 Posted by Luke Le on 14 Dec, 2014 10:59 PM

    Luke Le's Avatar

    Thanks, unfortunately it's the same I'm seeing here.

    What does the following command say:

    echo "HELLO" | /usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac
    
  12. 12 Posted by Pertinax77 on 14 Dec, 2014 11:48 PM

    Pertinax77's Avatar

    OK Your orders please
    ERR 83886355 unknown command

  13. Support Staff 13 Posted by Luke Le on 15 Dec, 2014 06:53 AM

    Luke Le's Avatar

    So that's working as well.
    And when you try to sign an email, it's still not working?

    If so, would you mind coming into our live chat?
    http://www.hipchat.com/gi8zHW4K3

    It'd be great to try some more things.

  14. 14 Posted by Pertinax77 on 15 Dec, 2014 10:05 AM

    Pertinax77's Avatar

    Strangely, signatures seem to be working again - I sent an email today (using Apple Mail) and a signature was attached.

    Do you have a way of checking the status of GPG on the system?

  15. 15 Posted by Pertinax77 on 15 Dec, 2014 10:21 AM

    Pertinax77's Avatar

    Hi

    Signatures do seem to be working again but I don't know what caused the problem in the first place.

    Here is the output from running those initial two commands you gave me.

    ~ srm$ ps aux | grep gpg
    srm 443 0.0 0.0 2435416 4 ?? S 8:56pm 0:00.01 /bin/bash /usr/local/MacGPG2/libexec/shutdown-gpg-agent
    srm 396 0.0 0.0 2486264 856 ?? Ss 8:56pm 0:01.41 gpg-agent --daemon
    srm 382 0.0 0.1 2496164 3612 ?? S 8:56pm 0:01.80 /Library/Application Support/GPGTools/org.gpgtools.Libmacgpg.xpc
    srm 1906 0.0 0.0 2432772 644 s000 S+ 10:18am 0:00.00 grep gpg

    Is it possible that the keychain could have been compromised?

  16. Pertinax77 closed this discussion on 21 Dec, 2014 03:47 PM.

  17. Steve re-opened this discussion on 24 Dec, 2014 08:42 AM

  18. Support Staff 16 Posted by Steve on 24 Dec, 2014 08:42 AM

    Steve's Avatar

    Hi Pertinax,

    I don't think the keychain had been compromised. But it would indeed be interesting to know what went wrong in the first place.

    Please make sure to let us know should this behavior re-occur.

    All the best,
    steve

  19. Steve closed this discussion on 24 Dec, 2014 08:42 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac