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

On macOS Big Sur, after codesign Xcode and try to login to my account, got "Couldn’t communicate with a helper application" #340

Open
hyouuu opened this issue Nov 15, 2020 · 38 comments

Comments

@hyouuu
Copy link

hyouuu commented Nov 15, 2020

Before codesigning, signing into my account worked normally, but after codesign it kept showing the "Couldn’t communicate with a helper application" error - I've tried restarting, delete Xcode and reinstall etc.

Posting here to try to confirm if others are experiencing the same problem on macOS Big Sur. If so, I guess there's no way to use XVim2 normally as it requires codesign? My thinking is keeping 2 copies of Xcode, one untouched to build to devices or upload to App Store, and another one codesigned to use XVim2.

Any ideas and suggestions appreciated!

@zoroD
Copy link

zoroD commented Nov 24, 2020

Same issue here

1 similar comment
@Cokile
Copy link

Cokile commented Dec 4, 2020

Same issue here

@nvowell
Copy link

nvowell commented Dec 7, 2020

I just started having this issue today after having Big Sur installed for a while with everything working fine. I deleted/reinstalled Xcode and command line tools several times and after a few tries it just started working again. Maybe this will help someone.

@gerram
Copy link

gerram commented Dec 7, 2020

I just started having this issue today after having Big Sur installed for a while with everything working fine. I deleted/reinstalled Xcode and command line tools several times and after a few tries it just started working again. Maybe this will help someone.

This issue appears after signing Xcode files by your XCodeSigner cert that needed XVim2.

@langrisser1981
Copy link

same issue here

@Cokile
Copy link

Cokile commented Dec 8, 2020

Seems duplicated with #323

@pebble8888
Copy link
Member

@hyouuu

My thinking is keeping 2 copies of Xcode, one untouched to build to devices or upload to App Store, and another one codesigned to use XVim2.

I agree with you.

@xiifain
Copy link

xiifain commented Dec 30, 2020

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

@gerram
Copy link

gerram commented Dec 30, 2020

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

It is the same in Xcode 12.3. You can download IDE only one time and make duplicate for keeping without your signing.

@iamWing
Copy link

iamWing commented Jan 4, 2021

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

It is the same in Xcode 12.3. You can download IDE only one time and make duplicate for keeping without your signing.

Sorry for a dumb question but what are the steps for this? Is it just duplicate the Xcode.app from application folder and rename it to something else?

@gerram
Copy link

gerram commented Jan 4, 2021

You should to download Xcode from Download part of Apple site (not through App Store app). It has name as Xcode_12.3.xip or Xcode_12.2.xip. It is archived Xcode.app. After unarchiving, you get archive + unpacked Xcode.app.

@xiifain
Copy link

xiifain commented Jan 4, 2021

Download the Xcode.xip from this link https://developer.apple.com/download/more/

After the download is finished, unpack the Xcode and rename the app before moving the app to Applications folder.

Then Codesign to the renamed app and build to the renamed app.

@gerram
Copy link

gerram commented Jan 4, 2021

I keep signed by my cert Xcode.app in Application folder and clear (with signed by Apple cert) in other folder. (Example in Download/XCodeClear/)

@iamWing
Copy link

iamWing commented Jan 4, 2021

@gerram @xiifain Thanks guys. I'll give it a try.

@Cokile
Copy link

Cokile commented Jan 26, 2021

I resolve this issue by downgrading the MacOS from Big Sur to Catalina, since XVim2 is more useful to me and the latest Xcode is compatible with Catalina.

@openingapps
Copy link

openingapps commented Jan 27, 2021

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

It is the same in Xcode 12.3. You can download IDE only one time and make duplicate for keeping without your signing.

And the same in xcode 12.4

Just to verify, the strategy of having two copies of xcode worked for me. The steps were much easier than I thought they would be. To download a copy of the app:

  1. Download from https://developer.apple.com/download/more/
  2. Put the downloaded .xip file in a working directory somewhere
    2b) If you want two copies, then use two working directories
  3. cd to the directory and type "xip -x filename" (22 GB)
  4. After 20-30 minutes, you will get a directory called Xcode.app will appear in the current directory (31GB)
  5. Rename the Xcode.app directory to something_else.app and move it to /Applications
  6. You're good to go. Run your new app like you would any other.
  7. As was already pointed out, you probably shouldn't run both copies at the same time!

Now that you have two copies of xcode, you can:

  • Use one copy xcode with xvim installed. You can edit and run as you always have in the past.
  • Use a clean copy of xcode (without xvim) for anything that requires you to log in to your apple account.

Most operations in xcode do not require you to log in. For me, I only need the clean copy of xcode when:

  • I want to upload something to the app store
  • I am testing on a new device, and I need to generate a new keychain entry.

@Cokile
Copy link

Cokile commented Jan 31, 2021

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

I think it's a system-wise security mechanism introduced in Big Sur rather than a Xcode issue, since XVim2 and Xcode 12.3 both work in Catalina on my Mac.

@michaeleisel
Copy link

would it be possible to only sign certain parts of xcode so that things still work?

@cstlex
Copy link

cstlex commented Feb 11, 2021

Has anyone tried replacing signature with certificates for mac development/distribution certificate?
If that works we should start replacing signature with the ones that apple provide

@r-plus
Copy link
Member

r-plus commented Feb 13, 2021

FYI: next version of Xcode 12.5 required Big Sur.
https://xcodereleases.com/

@adudenamedruby
Copy link

I hope this is not the death of xvim. I have no problem with multiple versions of Xcode (I have like 4 on my system anyway), but, seriously, coding in one xcode and running in a second is super annoying. lol

@openingapps
Copy link

The 2-copy work-around is not as bad as you think. You can edit xvim and run you app in the same copy of xcode.

The only time you will require the non-xvim version of xcode is when you need to sign in to an Apple account. For me, this occurs only when:

  • I want to upload something to the App Store
  • I am running on a new test device, and I need to generate a new key-chain entry.

@hanleylee
Copy link

I meet this problem, too. And currently I use 2-copy work-around as simple solution. Hope a better solution occurs!

@Climax777
Copy link

The 2-copy work-around is not as bad as you think. You can edit xvim and run you app in the same copy of xcode.

The only time you will require the non-xvim version of xcode is when you need to sign in to an Apple account. For me, this occurs only when:

  • I want to upload something to the App Store
  • I am running on a new test device, and I need to generate a new key-chain entry.

Care to elaborate? Because I want to run on my iPhone, but required the vanilla xcode to sign my app in order to run it. How can I "Deploy" to my iphone during development with the xvim version?

@openingapps
Copy link

Hi Climax777,

For me, I only needed to sign for the first time I use a new device -- and I used "vanilla xcode" to do that. But after the first time, I don't need to sign if I just want to run on my local iphone (through the USB cable).

I'm wondering if you have an Apple developer account or not. I think if you don't have a developer account, you need to generate some sort of local authentication. Maybe that is what is tripping you up??

@r-plus
Copy link
Member

r-plus commented Apr 3, 2021

Hi guys

I'm testing new workaround for this issue by using MacForge https://github.com/MacEnhance/MacForge that is BigSur supported (but not yet support Apple Silicon?) plugin loader like the SIMBL.
I'll push it as pull request after refactoring.

  • MacForge can inject XVim to Apple signed version of Xcode to resolve this issue.
  • But MacForge required disabling SIP and Library Validation to work on recently macOS (probably this instruction is difficult for someone especially not familiar to mac and CLI. Additionally, this means disabling macOS security feature, do it at your own risk.)
  • Not required adding Xcode UUID to Info.plist for loading XVim when Apple release new version of Xcode. (MacForge/SIMBL will not check UUID)

Some refs about SIP:

@Climax777
Copy link

Hi Climax777,

For me, I only needed to sign for the first time I use a new device -- and I used "vanilla xcode" to do that. But after the first time, I don't need to sign if I just want to run on my local iphone (through the USB cable).

I'm wondering if you have an Apple developer account or not. I think if you don't have a developer account, you need to generate some sort of local authentication. Maybe that is what is tripping you up??

The key was to first sign it like you said. It works a treat now. Thanks! A side note, VSCode's swift editing features are really great. I use a combination of both.

@tklebanoff
Copy link

software developers in year 2044: "has anybody figured out how to go back to xcode version 12.4? I need it to support my old arm architecture box which got dropped in 2030"

yeah but then you will break xvim

@TMTBO
Copy link

TMTBO commented Apr 21, 2021

Hi guys

I'm testing new workaround for this issue by using MacForge https://github.com/MacEnhance/MacForge that is BigSur supported (but not yet support Apple Silicon?) plugin loader like the SIMBL.
I'll push it as pull request after refactoring.

  • MacForge can inject XVim to Apple signed version of Xcode to resolve this issue.
  • But MacForge required disabling SIP and Library Validation to work on recently macOS (probably this instruction is difficult for someone especially not familiar to mac and CLI. Additionally, this means disabling macOS security feature, do it at your own risk.)
  • Not required adding Xcode UUID to Info.plist for loading XVim when Apple release new version of Xcode. (MacForge/SIMBL will not check UUID)

Some refs about SIP:

Hello, do you tried on Macbook Pro with M1? Xcode can not load xvim2 plugin(master branch)

It works now! Only beta version of Macforge support M1 machines!

@r-plus
Copy link
Member

r-plus commented Apr 21, 2021

@TMTBO stable version (1.1.0) of MacForge not yet supported Apple Silicon.

@r-plus
Copy link
Member

r-plus commented Apr 21, 2021

By the way, if you disable "Library Validation" macOS system level, original Apple signed Xcode + traditional Xcode plugin system will work well.

  1. sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true
  2. then reboot your mac.
  3. uninstall XVim2 from MacForge plugin directory make uninstall
  4. build XVim2 for Xcode plugin system
    make

This way is not required MacForge.


sorry, also required disabling SIP.

@r-plus
Copy link
Member

r-plus commented Apr 21, 2021

I'll add this table to readme when all filled.

Xcode OS security configuration loading system x64 arm64
re-codesign (has Apple ID login problem on BigSur) any Xcode Plugin
remove codesign (don't use! this occur tccd problem) ❌ (could not open Xcode)
original disable library-validation
disable library-validation and SIP
SIMBL MacForge 1.1.0 not yet support M1
Tested on macOS 11.2.3, Xcode 12.4

@r-plus
Copy link
Member

r-plus commented Apr 21, 2021

all filled.
original Xcode, disable library-validation and SIP, Xcode Plugin combination works well on M1.

@superarts
Copy link

Good job @r-plus! Thanks Apple for not supporting VIM natively, and the bad plugin support.

@yingmu52
Copy link

is this issue is fixed in XCode 12.3 ? Because I do not want to download 2 versions of xcode just to get VIM running.

It is the same in Xcode 12.3. You can download IDE only one time and make duplicate for keeping without your signing.

And the same in xcode 12.4

Just to verify, the strategy of having two copies of xcode worked for me. The steps were much easier than I thought they would be. To download a copy of the app:

  1. Download from https://developer.apple.com/download/more/
  2. Put the downloaded .xip file in a working directory somewhere
    2b) If you want two copies, then use two working directories
  3. cd to the directory and type "xip -x filename" (22 GB)
  4. After 20-30 minutes, you will get a directory called Xcode.app will appear in the current directory (31GB)
  5. Rename the Xcode.app directory to something_else.app and move it to /Applications
  6. You're good to go. Run your new app like you would any other.
  7. As was already pointed out, you probably shouldn't run both copies at the same time!

Now that you have two copies of xcode, you can:

  • Use one copy xcode with xvim installed. You can edit and run as you always have in the past.
  • Use a clean copy of xcode (without xvim) for anything that requires you to log in to your apple account.

Most operations in xcode do not require you to log in. For me, I only need the clean copy of xcode when:

  • I want to upload something to the app store
  • I am testing on a new device, and I need to generate a new keychain entry.

this did the trick. thanks

@MajkCajk
Copy link

MajkCajk commented Jun 3, 2021

I resolve it with new pure installation of XCode, run projects on all my HW devices for the first time and then add XVim. After that, it runs without problem 👍 Thank you guys, this thread helped me.

@thilo-hub
Copy link

Going back to an earlier question, do we need to code sign EVERY executable in Xcode?

The error message look suspiciously, like a separate process is trying to authenticate itself before talking to apple.

communicate with a helper application<<

If we just don't sign this "helper", if anybody knows which that could be, wouldn't that solve the issue?

If you have a suspicion, I'm happy to experiment

@superarts
Copy link

I resolve it with new pure installation of XCode, run projects on all my HW devices for the first time and then add XVim. After that, it runs without problem 👍 Thank you guys, this thread helped me.

You may still want to keep an original version as Xcode sign you out automatically from time to time.

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

No branches or pull requests