24

I am having problems when I attempt to add a new Swift Package to my project.

On Xcode 11.3.1 I receive a "Couldn't communicate with a helper application." error message.

PS with Xcode 11.4 the error message has changed to "Communication with the service was interrupted."

enter image description here

Crash Report

Having looked in the console app I can see a com.apple.dt.Xcode.sourcecontrol.Git crash is occuring. I've uploaded the crash report here...

https://gist.github.com/OliverPearmain/0320f34d6381d1bb7900ff266fc8d703

2
  • I have the exact same problem. First, I thought Little Snitch blocks some outgoing connection related to Git but it wasn't the case.
    – farkasseb
    Apr 1, 2020 at 6:41
  • I've signed in to my GitHub account in Xcode with a Personal access token. This way I can work around this issue by searching the library from the list but the original issue didn't go away.
    – farkasseb
    Apr 1, 2020 at 6:53

3 Answers 3

64

I've finally worked out what this was. I had something in my ~/.gitconfig file which Xcode obviously did't like.

I worked this out by removing the ~/.gitconfig and then retrying (and it worked). Then I tried removing parts of the ~/.gitconfig contents bit by bit.

Evntually I idenitified that this was the section causing the issue.

[includeIf "gitdir:~/some/path/"]
    path = "~/some/path/.gitconfig_include"

This section works in other contexts. No idea why it causes Xcode to barf.

9
  • 4
    Thanks! I can confirm that removing every includeIf config fixes the problem. Reported as FB7652466.
    – farkasseb
    Apr 6, 2020 at 4:31
  • 3
    Thank you so much!!! Just one more question though… How the hell did you get to this! x_x Jul 23, 2020 at 21:38
  • 2
    Live saver! Also filed a bug (FB8951172) Dec 24, 2020 at 8:29
  • 1
    Fired a radar 39442348
    – EkkoG
    Apr 5, 2021 at 14:17
  • 6
    This issue still exists in Xcode 13 :(
    – Junfeng
    Sep 25, 2021 at 15:28
1

In my case the issue was caused by empty email line in ~/.gitconfig.

Changing "email = " to "email = example.email.com" helped.

1

Had a stale entry in my ~/.gitconfig with difftool set to an app that I don't have now.

Removed the entry, reopened Xcode, problem gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.