Closed alexbigkid closed 6 years ago
This happens on a lot of casks I try to install now (seems to be on all casks with .dmg
disk images)… I first noticed it when I tried to install github
[-desktop], adding a HOMEBREW_CASK_OPTS=--no-quarantine
environment variable seemed to fix it for a while, but now even that is failing when a depends_on cask:
is used that relies on a .dmg
.
@alexbigkid : your log tells me that the quarantine attribute somehow disappears between the download and staging steps. As there are no errors logged, and brew cask doctor
clearly states that your system can run Swift, I'd need to see what the script itself prints to console.
Please open a terminal, and run the script manually:
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift /Users/abk/Library/Caches/Homebrew/downloads/9830ac8a5256756d2643fbdb6a47ba0eb019c3816fc4366049f2483999b2ee4f--googlechrome.dmg https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg https://www.google.com/chrome/
Immediately after this,
echo $?
should return 0
. If not, please copy the return code and any console output here.
@danielbayley: if your brew cask doctor
is similar to the OP's, please paste the full log of brew cask install --debug
here.
Thanks in advance to both of you!
Exactly the same error here
brew cask reinstall --debug astro
So far I cannot reproduce this on Sierra.
@melmass, can you run this line in a Terminal and paste both the output and exit code?
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift /Users/imac/Library/Caches/Homebrew/downloads/90b87ef304c429d25069fecfb2f01425d03a0b66dfe2041520b1144e19557039--Astro-4135.dmg https://pexlabs-updates-xvuif5mcicazzducz2j2xy3lki.s3-us-west-2.amazonaws.com/Astro-4135.dmg https://www.helloastro.com/
EDIT: and this line too?
/usr/bin/xattr -p com.apple.quarantine /Users/imac/Library/Caches/Homebrew/downloads/90b87ef304c429d25069fecfb2f01425d03a0b66dfe2041520b1144e19557039--Astro-4135.dmg
The swift one returns:
exit $?
returns 0
The xattr:
Traceback (most recent call last):
File "/usr/bin/xattr-2.7", line 7, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
Well this helped me. Seems like a frequent error on OSX.
All information below assume you are working at system level python (/System/Library/Frameworks/Python.framework)
Here is what I have done:
sudo find /System -iname "*pkg_resources*"
It returned:
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py
/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources
I did not knew OSX had multiple python version:
python --version
Python 2.6.9
To switch to the right python version:
defaults write com.apple.versioner.python Version 2.7
python --version
Python 2.7.10
Running your xattr command again:
/usr/bin/xattr -p com.apple.quarantine /Users/imac/Library/Caches/Homebrew/downloads/90b87ef304c429d25069fecfb2f01425d03a0b66dfe2041520b1144e19557039--Astro-4135.dmg
returned
0081;5bab6775;Homebrew\x20Cask;8D3DC7AA-5377-4C40-B54C-39582CF268A1
brew cask reinstall astro
==> Satisfying dependencies
==> Downloading https://pexlabs-updates-xvuif5mcicazzducz2j2xy3lki.s3-us-west-2.amazonaws.com/Astro-4135.dmg
Already downloaded: /Users/imac/Library/Caches/Homebrew/downloads/90b87ef304c429d25069fecfb2f01425d03a0b66dfe2041520b1144e19557039--Astro-4135.dmg
==> Verifying SHA-256 checksum for Cask 'astro'.
==> Installing Cask astro
==> Purging files for version 3.0.15,4135 of Cask astro
Error: /Users/imac/Library/Caches/Homebrew/downloads/90b87ef304c429d25069fecfb2f01425d03a0b66dfe2041520b1144e19557039--Astro-4135.dmg was not quarantined properly.
@amyspark Sorry, I have been busy! google-chrome
cask actually just installed fine (with HOMEBREW_CASK_OPTS=--no-quarantine
set in my .zshenv
), but I am getting a lot of xattr
errors with other casks…
@danielbayley Installs that use --no-quarantine
don’t help, because they don’t narrow the problem.
@amyspark @danielbayley I can actually install any cask using no-quarantine
forgot to mention. But disabling gatekeeper screws a lot of apps because they are being run in App Translocation a macOS security mechanism for apps that are not properly installed.
@melMass I've already fixed the translocation bug, but we haven't cut a stable version with the fix yet and it was released in 1.7.5. About the Python bug - I'll add another integrity check to verify we have a working version of xattr
before quarantining.
Not sure what you mean but I'm still not able to install casks after brew update
@melMass We've already fixed the translocation bug in Homebrew/brew#4852; as for your xattr
issue, Homebrew/brew#4990 disables quarantining if xattr
doesn't work properly.
If you're still getting lease post an updated brew cask doctor
and the stacktrace you get.
Argh, I've deleted the branch without merging. I'll reopen.
I have done just that on another repo 🤒 ... 😃
General troubleshooting steps
--force
and the issue is still present.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
cannot install google-chrome
Command that failed
Output of command with
--force --verbose --debug
Output of
brew cask doctor
Output of
brew tap