Homebrew-cask: OverSight hangs on install

Created on 14 Apr 2017  ·  12Comments  ·  Source: Homebrew/homebrew-cask

General troubleshooting steps

Description of issue

OverSight has just been updated to use the new CLI install method.

However, brew cask install oversight hangs. The installation is performed correctly, but it just hangs on the last message. brew cask uninstall oversight works fine, though, as does running the install command without HBC.

Output of brew cask install oversight --verbose --debug

==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Downloading
==> Downloading https://bitbucket.org/objective-see/deploy/downloads/OverSight_1.1.0.zip
Already downloaded: /Users/vitor/Library/Caches/Homebrew/Cask/oversight--1.1.0.zip
==> Downloaded to -> /Users/vitor/Library/Caches/Homebrew/Cask/oversight--1.1.0.zip
==> Verifying download
==> Determining which verifications to run for Cask oversight
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask oversight
==> SHA256 checksums match
==> Hbc::Installer#stage
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Checking container class Hbc::Container::Ttf
==> Checking container class Hbc::Container::Otf
==> Checking container class Hbc::Container::Air
==> Checking container class Hbc::Container::Cab
==> Checking container class Hbc::Container::Dmg
==> Executing: ["/usr/bin/hdiutil", "imageinfo", "/Users/vitor/Library/Caches/Homebrew/Cask/oversight--1.1.0.zip"]
==> Checking container class Hbc::Container::SevenZip
==> Checking container class Hbc::Container::Sit
==> Checking container class Hbc::Container::Rar
==> Checking container class Hbc::Container::Zip
==> Using container class Hbc::Container::Zip for /Users/vitor/Library/Caches/Homebrew/Cask/oversight--1.1.0.zip
==> Executing: ["/usr/bin/ditto", "-x", "-k", "--", "/Users/vitor/Library/Caches/Homebrew/Cask/oversight--1.1.0.zip", "/var/folders/y0/vby4vtn93xs117r8zygfd9t80000gn/T/d20170414-25127-1rs52cw"]
==> Creating metadata directory /usr/local/Caskroom/oversight/.metadata/1.1.0/20170414132747.499
==> Creating metadata subdirectory /usr/local/Caskroom/oversight/.metadata/1.1.0/20170414132747.499/Casks
==> Installing artifacts
==> Determining which artifacts are present in Cask oversight
==> 2 artifact/s defined
#<Hbc::Artifact::Installer:0x007f95c4109c10>
#<Hbc::Artifact::Uninstall:0x007f95c4109af8>
==> Installing artifact of class Hbc::Artifact::Installer
==> Running installer script /usr/local/Caskroom/oversight/1.1.0/OverSight_Installer.app/Contents/MacOS/OverSight_Installer
==> Executing: ["/bin/chmod", "--", "+x", "/usr/local/Caskroom/oversight/1.1.0/OverSight_Installer.app/Contents/MacOS/OverSight_Installer"]
==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/local/Caskroom/oversight/1.1.0/OverSight_Installer.app/Contents/MacOS/OverSight_Installer", "-install"]
==> OVERSIGHT: install ok!

Then it stays there, hanged.

Output of brew cask doctor

==> Homebrew-Cask Version
Homebrew-Cask 1.1.12-38-g30582a5f
caskroom/homebrew-cask (git revision 280cf; last commit 2017-04-14)
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask (12 files, 563.6MB)
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3633 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-drivers (48 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 (177 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (0 casks)
/usr/local/Homebrew/Library/Taps/laurent22/homebrew-massren (0 casks)
/usr/local/Homebrew/Library/Taps/neovim/homebrew-neovim (0 casks)
/usr/local/Homebrew/Library/Taps/vitorgalvao/homebrew-geotoad (0 casks)
/usr/local/Homebrew/Library/Taps/vitorgalvao/homebrew-tinyscripts (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
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LC_CTYPE="UTF-8"
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/zsh"
bug help wanted

Most helpful comment

I don't know if it helps you guys fix this but I found out that while the install via brew cask for this hangs, open the gui of oversight and deactivate "headless mode" and the installation will continue successfully. I don`t know if it can be triggered in headless mode from the beginning or if there is another workaround for this.

Hope that helps.

All 12 comments

I can reproduce this. I didn't even notice when I was testing this in a VM. :anguished:

@vitorgalvao I've tried installing BlockBlock and RansomWhere, they both work fine. Running the OverSight install in a shell script without HBC also works fine. I'm not sure what is causing this. Do you want a PR to revert back to installer manual:?

@commitay This looks like a bug in the core, so we should instead try to figure out the cause and fix it.

I don't know if you already noticed this, but, when I install it using HBC, Oversight starts up straight away (just as it does with a manual CLI install), as the icon appears in the top bar, but of course it hangs. If I then click on it and press Quit, HBC immediately says 🍺 oversight was successfully installed! and exits.

I don't know if you already noticed this, but, when I install it using HBC, Oversight starts up straight away (just as it does with a manual CLI install), as the icon appears in the top bar, but of course it hangs. If I then click on it and press Quit, HBC immediately says 🍺 oversight was successfully installed! and exits.

I just re-read this, @vitorgalvao, so basically my fix wasn't a fix, since this is was simply caused by a GUI app blocking the terminal. But why does it not block when running stand-alone?

@reitermarkus Not necessarily the GUI app doing the blocking. Oversight starts automatically on install, wether from HBC or not.

It might be something like: install → start GUI → do tasks (cleanup?) → finish install. Then step four (finish install) waits for step three (do tasks (cleanup?)) before firing, but since step three never ends (HBC’s fault?), step four never happens.

Then maybe when the GUI app exits it always makes the same checks as step three (hence why they might be cleanup related) and in this case step four is interpreting them as coming from the install script, when in fact they happened for another reason.

I don't know if it helps you guys fix this but I found out that while the install via brew cask for this hangs, open the gui of oversight and deactivate "headless mode" and the installation will continue successfully. I don`t know if it can be triggered in headless mode from the beginning or if there is another workaround for this.

Hope that helps.

Any news?

Travis log for 1.2.0

Running script.sh...

>>> brew cask _audit_modified_casks edcb6be5bda210008186f91424ce45cb5b386a49...f57ab149031c0bda90a71c510165a1efa66f9105
==> 1 modified cask: oversight
==> Downloading https://bitbucket.org/objective-see/deploy/downloads/OverSight_1.2.0.zip
==> Verifying checksum for Cask oversight
audit for oversight: passed

>>> brew cask style Casks/oversight.rb
1 file inspected, no offenses detected

>>> brew cask install Casks/oversight.rb
==> Satisfying dependencies
==> Downloading https://bitbucket.org/objective-see/deploy/downloads/OverSight_1.2.0.zip
Already downloaded: /Users/travis/Library/Caches/Homebrew/Cask/oversight--1.2.0.zip
==> Verifying checksum for Cask oversight
==> Installing Cask oversight
==> Running installer script 'OverSight_Installer.app/Contents/MacOS/OverSight_Installer'
==> OVERSIGHT: install ok!
==> 2017-09-25 10:54:44.469 OverSight Helper[6843:24854] -[__NSCFNumber length]: unrecognized selector sent to instance 0x157
==> 2017-09-25 10:54:44.513 OverSight Helper[6843:24854] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0x157'
==> *** First throw call stack:
==> (
==>     0   CoreFoundation                      0x00007fff95afc57b __exceptionPreprocess + 171
==>     1   libobjc.A.dylib                     0x00007fffaad401da objc_exception_throw + 48
==>     2   CoreFoundation                      0x00007fff95b7cf14 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
==>     3   CoreFoundation                      0x00007fff95a6fc93 ___forwarding___ + 1059
==>     4   CoreFoundation                      0x00007fff95a6f7e8 _CF_forwarding_prep_0 + 120
==>     5   CoreFoundation                      0x00007fff95a7316e __CFStringCheckAndReplace + 430
==>     6   CoreFoundation                      0x00007fff95ae0cb8 -[__NSCFString setString:] + 40
==>     7   OverSight Helper                    0x0000000107aacc04 isNewVersion + 85
==>     8   OverSight Helper                    0x0000000107ab6204 -[AppDelegate isThereAnUpdate] + 57
==>     9   libdispatch.dylib                   0x000000010865a8fc _dispatch_client_callout + 8
==>     10  libdispatch.dylib                   0x000000010866fa16 _dispatch_continuation_pop + 533
==>     11  libdispatch.dylib                   0x0000000108665a6c _dispatch_source_latch_and_call + 194
==>     12  libdispatch.dylib                   0x000000010865d13b _dispatch_source_invoke + 1248
==>     13  libdispatch.dylib                   0x0000000108669020 _dispatch_queue_override_invoke + 369
==>     14  libdispatch.dylib                   0x000000010865c6b5 _dispatch_root_queue_drain + 476
==>     15  libdispatch.dylib                   0x000000010865c48c _dispatch_worker_thread3 + 99
==>     16  libsystem_pthread.dylib             0x00000001089945a2 _pthread_wqthread + 1299
==>     17  libsystem_pthread.dylib             0x000000010899407d start_wqthread + 13
==> )
==> libc++abi.dylib: terminating with uncaught exception of type NSException
🍺  oversight was successfully installed!

I'm not sure if anybody is working on the underlying issue, but 🙏 . I'd contribute if I knew what I was doing in here

@rpearce Nobody is working on this, hence the help wanted label. We don’t know how to fix it. Best way you can help is to figure it out (ask somewhere else, do some tests, ask the developer).

@vitorgalvao @rpearce I think that this might be an issue when running from a non-bash process.

For the meantime we can add a caveat warning about this.

Thanks for the warning PR! Will be helpful to folks in the future :100:

Was this page helpful?
0 / 5 - 0 ratings