google / restor

Restor is a user-friendly application to (mass) image macOS computers from a single source
Apache License 2.0
228 stars 29 forks source link

Failed to connect to helper tool #30

Closed horizontalz closed 6 years ago

horizontalz commented 6 years ago

When I launch Restor, I get a "Failed to connect to helper tool"

screen shot 2018-04-17 at 7 58 58 am
tburgin commented 6 years ago

Try quitting Restor and make sure there are no running instances of com.google.corp.restord. A command like sudo killall com.google.corp.restord would do the trick. Then try launching Restor again.

If you are still having trouble, you can try deleting the currently installed daemon. Quit Restor and sudo rm /Library/PrivilegedHelperTools/com.google.corp.restord.

horizontalz commented 6 years ago

I don't think those tools even downloaded. Where are these tools originating from?

tburgin commented 6 years ago

The helper daemon com.google.corp.restord is packaged inside of Restor.app. It is installed by Restor when your are prompted for your admin credentials. screen shot 2018-04-17 at 11 42 27 am

horizontalz commented 6 years ago

I do receive that prompt, but when I type in my credentials, it does not seem to install anything. One thing to note is that I modified the info.plist to disable the App Transport Security policy (my file server does not have https enabled).

tburgin commented 6 years ago

Ah, yeah that will do it. Modifying the Info.plist breaks Restor's code signing. Its code signature needs to be intact for the helper tool to be installed successfully.

Luckily Restor is open source. You can make any changes you like and build a version for yourself. A rough outline: Clone the source Add the desired NSAllowsArbitraryLoads keys Build and Sign

tburgin commented 6 years ago

For more context: https://github.com/google/restor/issues/9

horizontalz commented 6 years ago

I downloaded the source files and attempted to create a build but it failed. It seems to missing some files? screen shot 2018-04-17 at 3 30 39 pm

clburlison commented 6 years ago

@horizontalz if you're just trying to add NSAllowsArbitraryLoads I'm going to try to maintain a fork with that enabled here https://github.com/clburlison/restor_local_starter_pack. It has my code signing identity. If you have already ran Restor v1.5 you'll need to run sudo rm /Library/PrivilegedHelperTools/com.google.corp.restord prior to launching my version.

A rough guideline for how to build from source:

  1. pod install
  2. You have to select a development team for the Restor & com.google.corp.restord targets inside of Xcode project
  3. Update the Makefile to include your Team ID (Line 44)
  4. Build via make google_release
horizontalz commented 6 years ago

Thanks @clburlison!

tburgin commented 6 years ago

Nice, thanks @clburlison. You rock!