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

Failed to install Helper Tool - Authorization failure #6

Closed
rluvaton opened this issue Mar 5, 2022 · 2 comments
Closed

Failed to install Helper Tool - Authorization failure #6

rluvaton opened this issue Mar 5, 2022 · 2 comments

Comments

@rluvaton
Copy link

rluvaton commented Mar 5, 2022

When I run the sample from Xcode and click install after entering the password I get an authorization failure

image

The state that calls the install function:

} else { // Registered: no | Registration file: no | Helper tool: no
self.installedField.stringValue = "No"
self.installOrUpdateButton.isEnabled = true
self.installOrUpdateButton.title = "Install"
self.installOrUpdateButton.action = #selector(ViewController.install)
self.installOrUpdateButton.toolTip = nil
self.uninstallButton.isEnabled = false
self.versionField.stringValue = ""
self.runButton.isEnabled = false
}

Env

Machine: Macbook Pro M1 Max
OS: macOS Monterey 12.2.1
XCode: Version 13.2.1 (13C100)

$ swift --version
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: arm64-apple-macosx12.0
@rluvaton rluvaton changed the title Fail to install Helper Tool - Authorization failure Failed to install Helper Tool - Authorization failure Mar 5, 2022
@rluvaton
Copy link
Author

rluvaton commented Mar 5, 2022

The issue was fixed somehow,
What I did that may help:

  1. Uncheck the Based on dependency analysis in the Run Script in the Build Phases
  2. Run the Swift Authorization Helper Tool

@rluvaton rluvaton closed this as completed Mar 5, 2022
@jakaplan
Copy link
Contributor

jakaplan commented Mar 6, 2022

Thanks for the report. Unfortunately I can't see how unchecking that box would make a difference as the documentation for the underlying error you encountered is:

The request required authorization (i.e. adding a job to the kSMDomainSystemLaunchd domain) but the AuthorizationRef did not contain the required right.

The required right should be always present, the code path used by the sample unconditionally adds it.

When you said "Run the Swift Authorization Helper Tool" what do you mean by that?

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

2 participants