Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11 - "Couldn't communicate with a helper application." when attempting to add Swift Package

Tags:

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

like image 826
Oliver Pearmain Avatar asked Mar 25 '20 21:03

Oliver Pearmain


2 Answers

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.

like image 114
Oliver Pearmain Avatar answered Sep 17 '22 11:09

Oliver Pearmain


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

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

like image 37
Bogdan Avatar answered Sep 21 '22 11:09

Bogdan