Homebrew-cask: Wireshark fails to uninstall (password required)

Created on 12 May 2017  路  6Comments  路  Source: Homebrew/homebrew-cask

General troubleshooting steps

Description of issue

Running brew cask uninstall wireshark, version 2.0.2, returns with error "Username and password must be provided." during #<Pathname:/usr/sbin/dseditgroup> -o delete access_bpf

Output of your command with --verbose --debug

jb@jb-mbp:~ % brew cask uninstall wireshark --verbose --debug
==> Uninstalling Cask wireshark
==> Uninstalling Cask wireshark
==> Un-installing artifacts
==> Determining which artifacts are present in Cask wireshark
==> 3 artifact/s defined
#<Hbc::Artifact::Uninstall:0x007fc938c02598>
#<Hbc::Artifact::Pkg:0x007fc938c02638>
#<Hbc::Artifact::PostflightBlock:0x007fc938c024f8>
==> Un-installing artifact of class Hbc::Artifact::Uninstall
==> Running uninstall process for wireshark; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Executing: ["/bin/chmod", "--", "+x", "/usr/sbin/dseditgroup"]
==> Executing: ["/usr/sbin/dseditgroup", "-o", "delete", "access_bpf"]
==> Username and password must be provided.
Error: Command failed to execute!

==> Failed command:
#<Pathname:/usr/sbin/dseditgroup> -o delete access_bpf

==> Standard Output of failed command:


==> Standard Error of failed command:
Username and password must be provided.


==> Exit status of failed command:
#<Process::Status: pid 34208 exit 64>
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:65:in `assert_success'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:36:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/system_command.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:182:in `uninstall_script'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:34:in `block (2 levels) in dispatch_uninstall_directives'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:32:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:32:in `block in dispatch_uninstall_directives'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:31:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb:31:in `dispatch_uninstall_directives'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/artifact/uninstall.rb:7:in `uninstall_phase'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:349:in `block in uninstall_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:346:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:346:in `uninstall_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:331:in `uninstall'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:20:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:9:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb:9:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:115:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:158:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:92:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:163:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:163:in `rescue in process'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:92:in `<main>'

Output of brew cask doctor

jb@jb-mbp:~ % brew cask doctor
==> Homebrew-Cask Version
Homebrew-Cask 1.2.0-66-g459fef3b09
caskroom/homebrew-cask (git revision 17bf0; last commit 2017-05-12)
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3620 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-drivers (90 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-eid (7 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts (1106 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions (161 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-boneyard (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-fuse (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-games (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-python (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services (0 casks)
/usr/local/Homebrew/Library/Taps/vitorgalvao/homebrew-tiny-scripts (0 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin16
/Library/Ruby/Site/2.0.0/universal-darwin16
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16
==> Environment Variables
LC_CTYPE="de_DE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
PATH="~/.opam/system/bin:~/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle/cmd:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/tcsh"

Most helpful comment

Not sure, but I still got this after running a successful brew update & clean:

$ brew update && brew upgrade && brew cleanup && brew cask cleanup; brew doctor
[...SNIP...]
$ brew cask reinstall wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
Warning: Calling Hbc::DSL#license is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:18:in `block in load'

==> Uninstalling Cask wireshark
==> Running uninstall process for wireshark; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Username and password m
==> ust be provided.
Error: Command failed to execute!

==> Failed command:
/usr/sbin/dseditgroup -o delete access_bpf

==> Standard Output of failed command:


==> Standard Error of failed command:
Username and password must be provided.


==> Exit status of failed command:
#<Process::Status: pid 59555 exit 64>
Error: Install incomplete.

Running the following got my machine state unstuck to install & reinstall cleanly:

$ rm -rf /Applications/Wireshark.app /usr/local/Caskroom/wireshark
$ sudo /usr/sbin/dseditgroup -o delete access_bpf
# Now brew thinks it's been uninstalled due to missing .app & cask dir
$ brew cask uninstall wireshark
Error: Cask 'wireshark' is not installed.
Error: Uninstall incomplete.
# Install & re-install now work!
$ brew cask install wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
==> Installing Cask wireshark
==> Running installer for wireshark; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Wireshark 2.4.0 Intel 64
==> installer: Upgrading at base path /
==> installer: The upgrade was successful.
馃嵑  wireshark was successfully installed!

$ brew cask reinstall wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
==> Uninstalling Cask wireshark
==> Group record below will be deleted:
==> Running uninstall process for wireshark; your password may be necessary
==> Removing launchctl service org.wireshark.ChmodBPF
==> Uninstalling packages:
org.wireshark.ChmodBPF.pkg
org.wireshark.cli.pkg
org.wireshark.Wireshark.pkg
==> Removing files:
/private/etc/manpaths.d/Wireshark
/private/etc/paths.d/Wireshark
/usr/local/bin/capinfos
/usr/local/bin/dftest
/usr/local/bin/dumpcap
/usr/local/bin/editcap
/usr/local/bin/mergecap
/usr/local/bin/randpkt
/usr/local/bin/rawshark
/usr/local/bin/text2pcap
/usr/local/bin/tshark
/usr/local/bin/wireshark
==> Installing Cask wireshark
==> Running installer for wireshark; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Wireshark 2.4.0 Intel 64
==> installer: Installing at base path /
==> installer: The install was successful.
馃嵑  wireshark was successfully installed!

All 6 comments

Uninstall for wireshark was a previous issue https://github.com/caskroom/homebrew-cask/issues/31694 that was resolved but an issue https://github.com/caskroom/homebrew-cask/issues/32300 with uninstall_preflight currently prevents that solution from working correctly.

Is this problem fixed? Seems the mentioned issue has been marked closed and PR merged, but same error( I've compared the debug log especially the call stacks, almost exactly same except line number ) still happening in my environment. Is it better to open a new issue?
==> Homebrew-Cask Version
Homebrew-Cask 1.2.1-143-gdaa678862
caskroom/homebrew-cask (git revision 171bb; last commit 2017-06-02)

EDIT: After manually rm -rf /Applications/Wireshark.app /usr/local/Caskroom/wireshark && brew cask install wireshark, the problem disappear, brew cask uninstall wireshark no longer trigger the problem. Not sure previous whether its' triggered by the old installation, which is 2.2.5.

Not sure, but I still got this after running a successful brew update & clean:

$ brew update && brew upgrade && brew cleanup && brew cask cleanup; brew doctor
[...SNIP...]
$ brew cask reinstall wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
Warning: Calling Hbc::DSL#license is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:18:in `block in load'

==> Uninstalling Cask wireshark
==> Running uninstall process for wireshark; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Username and password m
==> ust be provided.
Error: Command failed to execute!

==> Failed command:
/usr/sbin/dseditgroup -o delete access_bpf

==> Standard Output of failed command:


==> Standard Error of failed command:
Username and password must be provided.


==> Exit status of failed command:
#<Process::Status: pid 59555 exit 64>
Error: Install incomplete.

Running the following got my machine state unstuck to install & reinstall cleanly:

$ rm -rf /Applications/Wireshark.app /usr/local/Caskroom/wireshark
$ sudo /usr/sbin/dseditgroup -o delete access_bpf
# Now brew thinks it's been uninstalled due to missing .app & cask dir
$ brew cask uninstall wireshark
Error: Cask 'wireshark' is not installed.
Error: Uninstall incomplete.
# Install & re-install now work!
$ brew cask install wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
==> Installing Cask wireshark
==> Running installer for wireshark; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Wireshark 2.4.0 Intel 64
==> installer: Upgrading at base path /
==> installer: The upgrade was successful.
馃嵑  wireshark was successfully installed!

$ brew cask reinstall wireshark
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.0%20Intel%2064.dmg
Already downloaded: /Users/jcuzella/Library/Caches/Homebrew/Cask/wireshark--2.4.0.dmg
==> Verifying checksum for Cask wireshark
==> Uninstalling Cask wireshark
==> Group record below will be deleted:
==> Running uninstall process for wireshark; your password may be necessary
==> Removing launchctl service org.wireshark.ChmodBPF
==> Uninstalling packages:
org.wireshark.ChmodBPF.pkg
org.wireshark.cli.pkg
org.wireshark.Wireshark.pkg
==> Removing files:
/private/etc/manpaths.d/Wireshark
/private/etc/paths.d/Wireshark
/usr/local/bin/capinfos
/usr/local/bin/dftest
/usr/local/bin/dumpcap
/usr/local/bin/editcap
/usr/local/bin/mergecap
/usr/local/bin/randpkt
/usr/local/bin/rawshark
/usr/local/bin/text2pcap
/usr/local/bin/tshark
/usr/local/bin/wireshark
==> Installing Cask wireshark
==> Running installer for wireshark; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> installer: Package name is Wireshark 2.4.0 Intel 64
==> installer: Installing at base path /
==> installer: The install was successful.
馃嵑  wireshark was successfully installed!

Thanks @trinitronx! Worked perfectly for me.

I'm following the instructions above, but running into an issue:

```mbpro: jcw$ rm -rf /Applications/Wireshark.app /usr/local/Caskroom/wireshark
mbpro: jcw$ sudo /usr/sbin/dseditgroup -o delete access_bpf
Password:
Group record below will be deleted:
dsAttrTypeStandard:GeneratedUID -
73D6FD63-4EC0-43D9-8E53-FF0CDEADF576
dsAttrTypeStandard:RecordName -
access_bpf
dsAttrTypeStandard:AppleMetaNodeLocation -
/Local/Default
dsAttrTypeStandard:GroupMembers -
E4B0CFDD-0E4F-438F-BCD1-3ADF6A4B2E27
FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000
dsAttrTypeStandard:PrimaryGroupID -
501
dsAttrTypeStandard:RecordType -
dsRecTypeStandard:Groups
dsAttrTypeStandard:GroupMembership -
jcw
root
mbpro: jcw$ brew cask uninstall wireshark
Error: Cask 'wireshark' is not installed.
mbpro: jcw$ brew cask install wireshark
Error: Cask 'wireshark' conflicts with 'wireshark-chmodbpf'.
mbpro: jcw$ brew cask uninstall wireshark-chmodbpf
==> Uninstalling Cask wireshark-chmodbpf
==> Running uninstall process for wireshark-chmodbpf; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Group not found.
Error: Command failed to execute!

==> Failed command:
/usr/sbin/dseditgroup -o delete access_bpf

==> Standard Output of failed command:

==> Standard Error of failed command:
Group not found.

==> Exit status of failed command:

mbpro: jcw$
```

Any ideas?

Was this page helpful?
0 / 5 - 0 ratings