Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yosemite tmux oddities #43

Closed
keith opened this issue Sep 8, 2015 · 14 comments
Closed

Yosemite tmux oddities #43

keith opened this issue Sep 8, 2015 · 14 comments

Comments

@keith
Copy link

keith commented Sep 8, 2015

After seeing the note in the README about no longer needing reattach-to-user-namespace on Yosemite I removed it from my configuration. I just noticed that without it AddressBook access from the command line is broken.

I use mutt and a very simple contacts script to access the OS X contacts database to search for mail recipients, I was finally able to narrow this down to no longer using reattach-to-user-namespace since it works in both Terminal.app and iTerm without tmux, and doesn't work inside tmux unless I'm using reattach-to-user-namespace.

Nothing particularly actionable here, I haven't tried this on El Capitan yet, but I thought it was worth documenting this one case that might still be affected by this OS bug

ChrisJohnsen added a commit that referenced this issue Sep 8, 2015
@ChrisJohnsen
Copy link
Owner

Thanks for the feedback! I have added a new entry to the “Beyond Pasteboard Access” section of Usage.md.

@keith
Copy link
Author

keith commented Sep 8, 2015

Thanks!

On Sep 8, 2015, 09:38 -0700, Chris [email protected], wrote:

Thanks for the feedback! I have added a new entry to the “Beyond Pasteboard Access” section ofUsage.md.


Reply to this email directly orview it on GitHub(#43 (comment)).

@keith
Copy link
Author

keith commented Sep 8, 2015

Worth noting that without reattach-to-user-namespace this same issue appears on El Capitan 😭

@keith
Copy link
Author

keith commented Sep 20, 2016

Just a heads up that this is still a problem on Sierra

@keith
Copy link
Author

keith commented Sep 20, 2016

It actually seems like even when building HEAD of this repo reminders and contact access is broken in tmux on Sierra 😭

@keith
Copy link
Author

keith commented Sep 21, 2016

This is easy to reproduce with these steps:

  1. Open a new Terminal.app window (without tmux)
  2. Run swift enter (the first time you will be asked for permissions):
import AddressBook
ABAddressBook.shared()

Then launch tmux, and do the same. The first time you will see some output about that call creating an object successfully. The second you will see nil.

Successful example in terminal:

screen shot 2016-09-20 at 20 19 47

Failed example in tmux:

screen shot 2016-09-20 at 20 20 06

@keith
Copy link
Author

keith commented Sep 21, 2016

The second screenshot in that last example was actually still using reattach-to-user-namespace. Without using that at all you get a tiny bit more failure logging:

  2> ABAddressBook.shared()
2016-09-20 20:21:59.441883 repl_swift[30996:94829] [access] __TCCAccessRequest_block_invoke.61: Connection invalid

@keith
Copy link
Author

keith commented Sep 21, 2016

Also possibly related: tmux/tmux#543

@keith
Copy link
Author

keith commented Sep 21, 2016

Here's the relevant syslog from the time that this fails as well:

default 20:40:46.484186 -0400   trustd  cert[2]: AnchorTrusted =(leaf)[force]> 0
default 20:40:46.485169 -0400   tccd    CSSM Exception: -2147411889 CSSMERR_CL_UNKNOWN_TAG
default 20:40:46.485223 -0400   tccd    CSSM Exception: -2147411889 CSSMERR_CL_UNKNOWN_TAG
default 20:40:46.485271 -0400   tccd    MacOS error: -67050
error   20:40:46.485320 -0400   tccd    Refusing TCCAccessRequest for service kTCCServiceAddressBook from client com.apple.Terminal in background session

@florianbeer
Copy link

I am using lbdb for contacts lookup in mutt and have the same problem. Even with reattach-to-user-namespace I don't get access to AddressBook inside tmux. In a plain terminal everything works as it should.

Just commenting here so I get a notification, in case any of you finds a solution.

@keith
Copy link
Author

keith commented Sep 24, 2016

@ChrisJohnsen can we reopen this one? If there's somewhere you think of that I can start trying to figure this out please let me know and I'll see what I can do!

@ChrisJohnsen
Copy link
Owner

Sure, it can be re-opend. Technically, this is a different problem from the initial report (then: not working unless reattached; now: not working even if reattached).

The syslog message makes me think that it might work if we could reattach to different session type. There were other session constants (VPROCMGR_SESSION_… in vproc_priv.h) in the last visible-source release, but that was back in 10.9, and some things definitely changed in the subsequent releases. The code path for non-"Background" in _vprocmgr_move_subset_to_user in libvproc.c was a bit different, so it may be difficult to re-create it.

I do not yet have Sierra installed, but those are my best guesses as to directions to investigate.

@ChrisJohnsen ChrisJohnsen reopened this Sep 24, 2016
@keith
Copy link
Author

keith commented Sep 24, 2016

Thanks, I'll look into those as soon as I can.

I can also open a new issue if you'd prefer.

Keith Smiley

On Sep 24, 2016, at 17:34, Chris Johnsen [email protected] wrote:

Sure, it can be re-opend. Technically, this is a different problem from the initial report (then: not working unless reattached; now: not working even if reattached).

The syslog message makes me think that it might work if we could reattach to different session type. There were other session constants (VPROCMGR_SESSION_… in vproc_priv.h) in the last visible-source release, but that was back in 10.9, and some things definitely changed in the subsequent releases. The code path for non-"Background" in _vprocmgr_move_subset_to_user in libvproc.c was a bit different, so it may be difficult to re-create it.

I do not yet have Sierra installed, but those are my best guesses as to directions to investigate.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@keith
Copy link
Author

keith commented Nov 7, 2016

So it seems like as of 10.12.1 (16B2555) everything is working as expected again. Reminders access and contacts access seem to be back up and running. I guess we'll just have to chalk that one up to software ¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants