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

java uninstall fails when run from iTerm2: osascript ... execution error: An error of type -10810 has occurred. #6338

Closed
benfleis opened this issue Sep 26, 2014 · 1 comment

Comments

@benfleis
Copy link

Java 8 seems to be potentially breaking my Gephi install so I wanted to try older version. Unfortunately, no dice. The syslog indicates failure due to an Aqua dependency? Everything below is run via iTerm2. I re-ran from Terminal without a problem.

ben@otis /u/local (master)> brew cask uninstall java --force
==> Running uninstall process for java; your password may be necessary
==> Removing launchctl service com.oracle.java.Helper-Tool
==> Removing launchctl service com.oracle.java.Java-Updater
==> Quitting application ID com.oracle.java.Java-Updater
Error: Command failed to execute!

==> Failed command:
["/usr/bin/sudo", "-E", "--", "/usr/bin/osascript", "-e", "tell application \\\"System Events\\\" to count processes whose bundle identifier is \\\"com.oracle.java.Java-Updater\\\""]

==> Output of failed command:
36:109: execution error: An error of type -10810 has occurred. (-10810)


==> Exit status of failed command:
#<Process::Status: pid 3718 exit 1>

syslog:

Sep 26 08:18:03 otis.local sudo[4217]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl list -x com.oracle.java.Helper-Tool
Sep 26 08:18:03 otis.local sudo[4219]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl unload -w -- com.oracle.java.Helper-Tool
Sep 26 08:18:04 otis.local sudo[4221]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl remove com.oracle.java.Helper-Tool
Sep 26 08:18:05 otis.local sudo[4225]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl list -x com.oracle.java.Java-Updater
Sep 26 08:18:05 otis.local sudo[4227]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl unload -w -- com.oracle.java.Java-Updater
Sep 26 08:18:06 otis.local sudo[4230]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/bin/launchctl remove com.oracle.java.Java-Updater
Sep 26 08:18:08 otis.local sudo[4233]:      ben : TTY=ttys001 ; PWD=/Library/Caches/Homebrew ; USER=root ; COMMAND=/usr/bin/osascript -e tell application "System Events" to count processes whose bundle identifier is "com.oracle.java.Java-Updater"
Sep 26 08:18:08 otis com.apple.launchd[1]: System: Could not find requested session: Aqua
Sep 26 08:18:08 otis.local osascript[4234]: com.apple.systemevents.22384: Invalid argument
Sep 26 08:18:08 otis com.apple.launchd[1]: System: assertion failed: 13F34: launchd + 89837 [364E35A7-9FA7-3950-8494-40B49A2E7250]: 0x0
Sep 26 08:18:08 otis com.apple.launchd[1]: System: This API can only be used by a process running within an Aqua session.
Sep 26 08:18:08 otis.local osascript[4234]: spawn_via_launchd() failed, errno=5 label=com.apple.systemevents.22384 path=/System/Library/CoreServices/System Events.app/Contents/MacOS/System Events flags=0 : LaunchApplicationClient.cp #1168 LaunchApplicationViaLaunchDJobLabel() q=com.apple.main-thread
Sep 26 08:18:08 otis.local osascript[4234]: spawn_via_launchd() failed, errno=5 label=com.apple.systemevents.22384 path=/System/Library/CoreServices/System Events.app/Contents/MacOS/System Events flags=0
@rolandwalker
Copy link
Contributor

Hi!

Yes, that's a current limitation, as documented in the man page.

brew cask uninstall --force will work better in the future though, as we are revising the backend to support bookkeeping and upgrading. See #4678 and #4688, as well as #309.

I'm going to close this, as it is both documented and covered by other open issues. But feel free to comment there.

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants