GPGServices not working (timeout)

Scott's Avatar


05 Jan, 2012 07:13 AM


I haven't tried to use GPGServices for a while, but had a need to today - any attempt to encrypt/sign/whatever text met with the application complaining that it couldn't be done and the following error message in the system.log:

Jan 5 18:06:21 x GPGServices[2211]: -[__NSCFSet addObject:]: attempt to insert nil
Jan 5 18:06:21 x GPGServices[2211]: (

    0   CoreFoundation                      0x00007fff91cc7286 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff8bce4d5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff91cc70ba +[NSException raise:format:arguments:] + 106
    3   CoreFoundation                      0x00007fff91cc7044 +[NSException raise:format:] + 116
    4   CoreFoundation                      0x00007fff91ca0463 -[__NSCFSet addObject:] + 147
    5   GPGServices                         0x000000010000663b +[GPGServices myPrivateKeys] + 367
    6   GPGServices                         0x000000010000811f -[KeyChooserDataSource getPrivateKeys] + 33
    7   GPGServices                         0x0000000100008519 -[KeyChooserDataSource init] + 127
    8   AppKit                              0x00007fff8ed51bcf -[NSCustomObject nibInstantiate] + 418
    9   AppKit                              0x00007fff8ed519ba -[NSIBObjectData instantiateObject:] + 303
    10  AppKit                              0x00007fff8ed50c19 -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 347
    11  AppKit                              0x00007fff8ed4752f loadNib + 322
    12  AppKit                              0x00007fff8ed46a28 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
    13  AppKit                              0x00007fff8ed46943 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
    14  AppKit                              0x00007fff8ef35bc6 -[NSWindowController loadWindow] + 221
    15  AppKit                              0x00007fff8ef35981 -[NSWindowController window] + 75
    16  AppKit                              0x00007fff8ef357ef -[NSWindowController showWindow:] + 40
    17  GPGServices                         0x00000001000067bb -[RecipientWindowController runModal] + 69
    18  GPGServices                         0x0000000100003924 -[GPGServices encryptTextString:] + 134
    19  GPGServices                         0x0000000100001de4 -[GPGServices dealWithPasteboard:userData:mode:error:] + 457
    20  AppKit                              0x00007fff8f2986b7 -[NSServiceListener _doInvokeServiceIn:msg:pb:userData:error:unhide:] + 1020
    21  AppKit                              0x00007fff8f298241 _NSServiceMasterCallBack + 120
    22  CoreFoundation                      0x00007fff91d24735 __CFServiceControllerMessagePortCallBack + 629
    23  CoreFoundation                      0x00007fff91d18bb9 __CFMessagePortPerform + 729
    24  CoreFoundation                      0x00007fff91c2611c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 44
    25  CoreFoundation                      0x00007fff91c25e4b __CFRunLoopDoSource1 + 155
    26  CoreFoundation                      0x00007fff91c5c587 __CFRunLoopRun + 1895
    27  CoreFoundation                      0x00007fff91c5bae6 CFRunLoopRunSpecific + 230
    28  HIToolbox                           0x00007fff8db7a3d3 RunCurrentEventLoopInMode + 277
    29  HIToolbox                           0x00007fff8db8158f ReceiveNextEventCommon + 181
    30  HIToolbox                           0x00007fff8db814ca BlockUntilNextEventMatchingListInMode + 62
    31  AppKit                              0x00007fff8ed3f3f1 _DPSNextEvent + 659
    32  AppKit                              0x00007fff8ed3ecf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
    33  AppKit                              0x00007fff8ed3b62d -[NSApplication run] + 470
    34  AppKit                              0x00007fff8efba80c NSApplicationMain + 867
    35  GPGServices                         0x0000000100001554 start + 52

At first I thought this was a gpg-agent issue, as I noticed that it wasn't running on my workstation at the office -- but that didn't seem to be it (gpg-agent is running fine at home, but, incidentally, the --launchd flag causes an error, even though that seems to be what the plist asks for for launchd control)

Haven't tried rebooting, as I really hate that solution to problems (especially with loads of sessions that would die...)..

  1. 1 Posted by Alex on 05 Jan, 2012 07:32 AM

    Alex's Avatar

    I've added Jeff to this discussion. He's currently working on GPGServices...

  2. 2 Posted by Jeff on 05 Jan, 2012 07:48 AM

    Jeff's Avatar

    There was another recent problem in myPrivateKeys that ultimately reduced to some issue in the keychain. Does this key work from the command line and/or GPGMail? I'll get around to cleaning up the error checking eventually.

  3. 3 Posted by Scott on 05 Jan, 2012 07:51 AM

    Scott's Avatar

    All works fine for command line work, as well as and even Postbox (which talks to the gpg agent and uses gpg) -- as far as I can tell it's only the Services menu/functionality which has the problem.

  4. 4 Posted by Alex on 14 Jan, 2012 11:53 PM

    Alex's Avatar

    There is a new GPGServices test version, maybe this one is working?

  5. 5 Posted by Scott A. McInty... on 15 Jan, 2012 12:37 AM

    Scott A. McIntyre's Avatar

    Good news and bad.

    Good: Services seem to be invoked; I selected a block of text in
    TextWrangler, selected Encrypt from services, chose some recipients,
    opted to sign, chose my secret key, and the text was suitably replaced
    with a block of ASCII armoured text. However, attempting to *decrypt*
    that text results is empty results -- it seems that what actually gets
    encrypted/signed is "nothing" and what you end up with is a fully ASCII
    armoured and signed block of nothing. I verified this on the command
    line with gpg -d on the same AA text, same result, original text is gone...

    Alex wrote:

  6. 6 Posted by Alex on 15 Jan, 2012 01:29 AM

    Alex's Avatar

    Hi Scott,

    good to hear that. It's a known bug that TextWrangler is not working with GPGServices (although the new version should work with it now). Could you try to test GPGServices with TextEdit please?

    @Jeff: could you have a look again at the TextWrangler issue? I can confirm Scotts problem.

    Best regards, Alex

  7. 7 Posted by Scott A. McInty... on 15 Jan, 2012 01:33 AM

    Scott A. McIntyre's Avatar

    You're right, it works with TextEdit -- however, it does NOT work with
    Evernote. It goes off to GPGServices and asks about keys and whatnot,
    but it never changes the text window in Evernote with the AA material.
    Perhaps related to whatever is happening in TextWrangler.

    Alex wrote:

  8. 8 Posted by Jeff on 15 Jan, 2012 02:11 AM

    Jeff's Avatar

    As a rule, I don't use any non-GPLed Mac software, except for a very few I like and have lying around, like TextMate, which might eventually disappear. If you can find a reproducible "instability in mac software" like the "\r\n" issue, then I'm happy to address it, but I'm not interested in supporting commercial products broadly speaking.

    Activists in Egypt, Iran, etc. aren't likely to be using anything besides TextEdit, if they even owned a Mac. If someone like that asks, then I'll figure out how to pirate the program and provide support, but that's a different world. And I'd tell them not to depend on idiots like myself. ;)

    In short, tell me why it doesn't work, and I'll fix it, but I cannot debug issues involving most closed source software.

    In the abstract, there might be some general interacting with the cut & paste buffer that GPGServices could do, but I cannot foresee how this might be considered "user friendly", which is our raison de etre.

  9. Support Staff 9 Posted by Steve on 15 Jan, 2012 12:43 PM

    Steve's Avatar

    Hi all,
    just FYI: We have tickets for those problems:

    Third party apps:

    Feel free to contribute / subscribe to those tickets as well :)

    All the best, steve

  10. 10 Posted by Scott A. McInty... on 16 Jan, 2012 09:07 PM

    Scott A. McIntyre's Avatar

    Understood Jeff - as a (volunteer) developer you've got to draw a line
    somewhere. The only reason that I even noticed/picked up on this was
    that I used to do this many many times per day with GPGTools (well,
    before it was called that) and TextWrangler. It was only relatively
    recently that this combination CEASED working, and as TextWrangler
    hasn't gone through any updates in a while, I thought perhaps there was
    a glitch with the dynamic GPGTools/Services.

    As an aside, activists in the United States, Europe, Oceana (Operation*,
    WikiLeaks supporters, "us", etc.) are likely to be using their Macs, and
    non-GPL software, and all sorts of social media apps -- but, yeah, I
    agree with your desire to do right by the things you CAN investigate and
    it makes sense draw a support-line somewhere. Thanks very much for the
    work you've been doing!

    Jeff wrote:

  11. Support Staff 11 Posted by Steve on 17 Jan, 2012 09:17 AM

    Steve's Avatar

    Hey Scott, Jeff's got a point and though I basically agree with what he writes, if one of the GPGTools softwares does not play nicely with commercial third-party software we are very happy about any user feedback and appreciate you taking the time to inform us about this.

    We will try to solve this, but (as always) I can't promise any ETAs.

    Have a very nice day :)

  12. Support Staff 12 Posted by Steve on 29 Jan, 2012 02:42 PM

    Steve's Avatar

    @all I'm closing this. Feel free to subscribe to the according tickets if you want to stay up-to-date.

    All the best, steve

  13. Steve closed this discussion on 29 Jan, 2012 02:42 PM.

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

Keyboard shortcuts


? 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