Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.92k stars 10.7k forks source link

omni-disk-sweeper un/installation issues #910

Closed junkblocker closed 9 years ago

junkblocker commented 11 years ago

First through a script:

% brew cask install omni-disk-sweeper
==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
######################################################################## 100.0%
Agree Y/N? y
2013-08-12 11:45:50.568 hdiutil[85512:3303]   handleRequest request: An exception was caught while attempting to create a return message, and will be squashed: [NSMachPort sendBeforeDate:] destination port invalid
hdiutil: mount failed - No child processes
Error: Unimplemented element

Then on the command line:

% brew cask install omni-disk-sweeper
Error: Cask for omni-disk-sweeper is already installed. Use `--force` to install anyways.

% brew cask uninstall omni-disk-sweeper
Error: undefined method `basename' for nil:NilClass
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:16:in `unlink_app'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:12:in `unlink'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:12:in `each'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:12:in `unlink'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/cli/uninstall.rb:8:in `run'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/cli/uninstall.rb:5:in `each'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/cli/uninstall.rb:5:in `run'
/usr/brew/Cellar/brew-cask/0.15.0/rubylib/cask/cli.rb:21:in `process'
/usr/brew/bin/brew-cask.rb:6
/usr/brew/Library/brew.rb:51:in `require'
/usr/brew/Library/brew.rb:51:in `require?'
/usr/brew/Library/brew.rb:101

% brew cask install omni-disk-sweeper
Error: Cask for omni-disk-sweeper is already installed. Use `--force` to install anyways.

% rm -rf /opt/homebrew-cask/Caskroom/omni-disk-sweeper

% brew cask uninstall omni-disk-sweeper
Error: omni-disk-sweeper is not installed

% brew cask install omni-disk-sweeper
==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
Already downloaded: /Library/Caches/Homebrew/omni-disk-sweeper-1.8
Agree Y/N? Y
Error: Unimplemented element
phinze commented 11 years ago

Hi there! Sorry you hit some trouble. :fire: :frowning:

I get that unimplemented element message when I try to install too. And I think the half-installed state is confusing the uninstaller, which is definitely a bug.

The entirety of the omni-disk-sweeper cask is located at /opt/homebrew-cask/Caskroom/omni-disk-sweeper so if you rm -rf that the cask will be effectively uninstalled.

I'll look into this more later and follow up on this ticket when I've isolated the uninstaller bug.

phinze commented 11 years ago

Oh and also we should figure what is up with omnidisksweeper too. :ok_hand:

anglepoised commented 11 years ago

Looks like it may be all packages from Omni Group (it is for me, at least), so omni-disk-sweeper, omni-graffle-pro, omni-outliner, omni-focus, omni-graffle-standard and omni-web.

Running brew cask install omni-foo a second time (to get the "Error: Cask for omni-foo is already installed. Use --force to install anyways.") and then a third time with --force (eg. brew cask install --force omni-foo) generally works, but not always. Seems to depend on the Cask. Skipping the second step and going straight to --force after the initial attempt doesn't work for me; need to do the second unforced attempt.

Here's my session, in case it's useful (kind of long - sorry!). Despite the "Error: undefined method `basename' for nil:NilClass" error, OmniGraffle Standard did install, but there was no symlink. All tested on a fresh Mountain Lion install running in a VM with only XCode, Command Line Tools, hombrew and homebrew-cask installed.

% brew cask search omni
==> We need to make Caskroom for the first time at /opt/homebrew-cask/Caskroom
==> We'll set permissions properly so we won't need sudo in the future
Password:
omni-disk-sweeper      omni-focus         omni-graffle-pro       omni-graffle-standard  omni-outliner      omni-web
% brew cask install omni-disk-sweeper
==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-disk-sweeper
Error: Cask for omni-disk-sweeper is already installed. Use `--force` to install anyways.
% brew cask install --force omni-disk-sweeper
==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
Already downloaded: /Library/Caches/Homebrew/omni-disk-sweeper-1.8
==> Success! omni-disk-sweeper installed to /opt/homebrew-cask/Caskroom/omni-disk-sweeper/1.8
==> Linking OmniDiskSweeper.app to /Users/test/Applications/OmniDiskSweeper.app

% brew cask install omni-focus
==> Downloading http://www.omnigroup.com/download/latest/omnifocus
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-focus
Error: Cask for omni-focus is already installed. Use `--force` to install anyways.
% brew cask install --force omni-focus
==> Downloading http://www.omnigroup.com/download/latest/omnifocus
Already downloaded: /Library/Caches/Homebrew/omni-focus-latest
==> Success! omni-focus installed to /opt/homebrew-cask/Caskroom/omni-focus/latest
==> Linking OmniFocus.app to /Users/test/Applications/OmniFocus.app

% brew cask install omni-graffle-pro
==> Downloading http://www.omnigroup.com/download/latest/omnigrafflePro
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-graffle-pro
Error: Cask for omni-graffle-pro is already installed. Use `--force` to install anyways.
% brew cask install --force omni-graffle-pro
==> Downloading http://www.omnigroup.com/download/latest/omnigrafflePro
Already downloaded: /Library/Caches/Homebrew/omni-graffle-pro-latest
==> Success! omni-graffle-pro installed to /opt/homebrew-cask/Caskroom/omni-graffle-pro/latest
==> Linking OmniGraffle Professional to /Users/test/Applications/OmniGraffle Professional

% brew cask install omni-graffle-standard
==> Downloading https://www.omnigroup.com/download/latest/omnigraffle
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-graffle-standard
Error: Cask for omni-graffle-standard is already installed. Use `--force` to install anyways.
% brew cask install --force omni-graffle-standard
==> Downloading https://www.omnigroup.com/download/latest/omnigraffle
Already downloaded: /Library/Caches/Homebrew/omni-graffle-standard-latest
==> Success! omni-graffle-standard installed to /opt/homebrew-cask/Caskroom/omni-graffle-standard/latest
Error: undefined method `basename' for nil:NilClass
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:24:in `link_app'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:8:in `link'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:8:in `each'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/app_linker.rb:8:in `link'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/cli/install.rb:9:in `run'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/cli/install.rb:5:in `each'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/cli/install.rb:5:in `run'
/usr/local/Cellar/brew-cask/0.15.0/rubylib/cask/cli.rb:21:in `process'
/usr/local/bin/brew-cask.rb:6
/usr/local/Library/brew.rb:51:in `require'
/usr/local/Library/brew.rb:51:in `require?'
/usr/local/Library/brew.rb:101

% brew cask install omni-outliner
==> Downloading http://www.omnigroup.com/download/latest/omnioutlinerpro
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-outliner
Error: Cask for omni-outliner is already installed. Use `--force` to install anyways.
% brew cask install --force omni-outliner
==> Downloading http://www.omnigroup.com/download/latest/omnioutlinerpro
Already downloaded: /Library/Caches/Homebrew/omni-outliner-latest
==> Success! omni-outliner installed to /opt/homebrew-cask/Caskroom/omni-outliner/latest
==> Linking OmniOutliner Professional.app to /Users/test/Applications/OmniOutliner Professional.app

% brew cask install omni-web
==> Downloading http://www.omnigroup.com/download/latest/omniweb
######################################################################## 100.0%
Agree Y/N? Y
Error: Unimplemented element
% brew cask install omni-web
Error: Cask for omni-web is already installed. Use `--force` to install anyways.
% brew cask install --force omni-web
==> Downloading http://www.omnigroup.com/download/latest/omniweb
Already downloaded: /Library/Caches/Homebrew/omni-web-latest
==> Success! omni-web installed to /opt/homebrew-cask/Caskroom/omni-web/latest
==> Linking OmniWeb.app to /Users/test/Applications/OmniWeb.app

% brew doctor
Your system is ready to brew.
% brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: 95557e1255754c1ef65062728b46deb490aba24e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: single-core 64-bit arrandale
OS X: 10.8.2-x86_64
Xcode: 4.6.3
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: N/A
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
dpo commented 11 years ago

I'm getting the same error message with my first home-made cask. Everything is up to date. Has there been any progress on this?

nanoxd commented 11 years ago

The "unimplemented element" is stemming form the plist parser. Once it runs Parser#parse, if it errors out if spits out the else statement.

dergachev commented 10 years ago

Here's what I got today:

brew cask install omni-disk-sweeper
#    ==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
#    ######################################################################## 100.0%
#    Error: SHA1 mismatch
#    Expected: 8061c4d7ee18549f976119146f28e67180141069
#    Actual: 31e517c280652745e5be707d0daf716151faccc8
nanoxd commented 10 years ago

@dergachev This is a different error signifying that the file at the url has changed. I have fixed the issue though; Do a brew update && brew cask install omni-disk-sweeper to verify

dergachev commented 10 years ago

@NanoXD thanks for taking a stab at fixing it. Here's the error I get now:

brew update
#    Updated Homebrew from 0747d053 to 355a263a.
#    ==> New Formulae
#    phinze/cask/genymotion                       phinze/cask/pastor
#    phinze/cask/iterm2-beta                          shunit2
#    phinze/cask/obsidian-menu-bar-mountain-lion
#    ==> Updated Formulae
#    jmeter                mysql-cluster              phinze/cask/airmail-beta       subversion
#    jsvc                  open-vcdiff            phinze/cask/brew-cask      swfmill
#    libgcrypt             passenger              phinze/cask/omni-disk-sweeper  tinysvm
#    libmpdclient              percona-toolkit            phinze/cask/pkg
#    msmtp                 phinze/cask/air-server         sqlite

brew cask install omni-disk-sweeper
#    ==> Downloading http://www.omnigroup.com/download/latest/omnidisksweeper
#    ######################################################################## 100.0%
#    Error: uh oh, could not identify primary container for /Library/Caches/Homebrew/omni-disk-sweeper-latest

head -n 10 /Library/Caches/Homebrew/omni-disk-sweeper-latest
#    <!DOCTYPE html>
#    <!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
#    <!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
#    <!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
#    <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
#        <head>
#            <meta charset="utf-8">
#            <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
#    
#            <title>More Software - The Omni Group</title>
nanoxd commented 10 years ago

@dergachev They changed the URL for the application again :facepunch:. I've updated the URL to reflect their change. Let me know if you have any more problems.

dergachev commented 10 years ago

@NanoXD now I get the "Unimplemented element" error that others are seeing.

brew update
#    Updated Homebrew from 355a263a to dcd2907e.
#    ==> New Formulae
#    phinze/cask/iphoney             phinze/cask/time-machine-scheduler-beta
#    ==> Updated Formulae
#    mtr                   phinze/cask/omni-disk-sweeper  sphinx
#    phinze/cask/instacast         scons                  sqlite

brew cask install omni-disk-sweeper
#    ==> Downloading http://www.omnigroup.com/download/latest/OmniDiskSweeper
#    Already downloaded: /Library/Caches/Homebrew/omni-disk-sweeper-latest
#    Error: uh oh, could not identify primary container for /Library/Caches/Homebrew/omni-disk-sweeper-latest

rm /Library/Caches/Homebrew/omni-disk-sweeper-latest

brew cask install omni-disk-sweeper
#    ==> Downloading http://www.omnigroup.com/download/latest/OmniDiskSweeper
#    ######################################################################## 100.0%
#    Error: Unimplemented element
nanoxd commented 10 years ago

@dergachev :partly_sunny: Usually to bypass that error, you just try it again.

dergachev commented 10 years ago

@NanoXD Hah worked!!

vitorgalvao commented 9 years ago

Can’t reproduce. If someone is still encountering this problem, feel free to reply with a comment.