Bug report: cannot install firefox #28684

Closed
filipesperandio opened this Issue Jan 6, 2017 · 11 comments

Projects

None yet

4 participants

@filipesperandio

Description of issue

Error with language trying to install Firefox.
Same results when specifying the language or not: brew cask install firefox --language=en

I am based in Brazil, my locale is set to en_CA though, not sure where pt_BR is coming from.

Output of `brew cask install firefox --verbose`
Error: 'pt_BR' cannot be parsed to a Locale while loading 'firefox' from '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/firefox.rb'
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

If this doesn’t fix the problem, please report this bug:
  https://github.com/caskroom/homebrew-cask#reporting-bugs

/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:23:in `rescue in load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:19:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:11:in `load_from_file'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:20:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/tapped.rb:15:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc.rb:57:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:110:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
Error: Kernel.exit
Output of `brew doctor`
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your XQuartz (2.7.7) is outdated.
Please install XQuartz 2.7.9 (or delete the current version).
XQuartz can be updated using Homebrew-Cask by running
  brew cask reinstall xquartz

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  boot2docker
  docker
  docker-machine
  nspr

Warning: Some directories in your path end in a slash.
Directories in your path should not end in a slash. This can break other
doctor checks. The following directories should be edited:
  /usr/local/Cellar/android-sdk/24.4.1_1//tools/
  /usr/local/Cellar/android-sdk/24.4.1_1//tools/
  /usr/local/Cellar/android-sdk/24.4.1_1//tools/
  /opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/
  /Users/filipe/Applications/Firefox.app/Contents/MacOS/
  /opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/
  /Users/filipe/Applications/Firefox.app/Contents/MacOS/
  /opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/
  /Users/filipe/Applications/Firefox.app/Contents/MacOS/

Warning: Broken symlinks were found. Remove them with `brew prune`:
  /usr/local/bin/aapt
  /usr/local/etc/bash_completion.d/brew_bash_completion.sh

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
  brew install gd gmp@4 mpfr@2 openssl@1.1 webp

Run `brew missing` for more details.
Output of `brew cask doctor`
==> macOS Release:
10.11.6
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 1.1.6-25-g1c710ad
Homebrew/homebrew-core (git revision 74063; last commit 2017-01-06)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local/Homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew.git
==> Homebrew-Cask Version:
Homebrew-Cask 1.1.6-25-g1c710ad
caskroom/homebrew-cask (git revision ee78; last commit 2017-01-07)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/filipe/Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-fonts
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions
==> Homebrew-Cask Default Tap Cask Count:
3501
==> 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-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/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-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/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-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
RUBYOPT=""
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Users/filipe/.gem/ruby/2.3.0/bin:/Users/filipe/.rubies/ruby-2.3.0/lib/ruby/gems/2.3.0/bin:/Users/filipe/.rubies/ruby-2.3.0/bin:/usr/local/opt/coreutils:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:./node_modules/.bin:/Users/filipe/node_modules/.bin:/Users/filipe/Dropbox/bin:/Users/filipe/bin:/Users/filipe/.dots/bin:/usr/local/Cellar/android-sdk/24.4.1_1//bin:/usr/local/Cellar/android-sdk/24.4.1_1//tools/:/usr/local/Cellar/android-sdk/24.4.1_1//platform-tools:/usr/local/opt/coreutils:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:./node_modules/.bin:/Users/filipe/node_modules/.bin:/Users/filipe/Dropbox/bin:/Users/filipe/bin:/Users/filipe/.dots/bin:/usr/local/Cellar/android-sdk/24.4.1_1//bin:/usr/local/Cellar/android-sdk/24.4.1_1//tools/:/usr/local/Cellar/android-sdk/24.4.1_1//platform-tools:/usr/local/opt/coreutils/libexec/gnubin):/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:./node_modules/.bin:/Users/filipe/node_modules/.bin:/Users/filipe/Dropbox/bin:/Users/filipe/bin:/Users/filipe/.dots/bin:/usr/local/Cellar/android-sdk/24.4.1_1//bin:/usr/local/Cellar/android-sdk/24.4.1_1//tools/:/usr/local/Cellar/android-sdk/24.4.1_1//platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/:/Users/filipe/Applications/Firefox.app/Contents/MacOS/:/opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/:/Users/filipe/Applications/Firefox.app/Contents/MacOS/:/opt/homebrew-cask/Caskroom/genymotion/2.2.2/Genymotion.app/Contents/MacOS/:/Users/filipe/Applications/Firefox.app/Contents/MacOS/:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-boneyard/cmd:/usr/local/Homebrew/Library/Homebrew/cask/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_CA.UTF-8"
@miccal
Member
miccal commented Jan 7, 2017

Cannot reproduce:

-bash-4.4.5- /Users/raesy [> brew cask install firefox --language=pt
==> Downloading https://ftp.mozilla.org/pub/firefox/releases/50.1.0/mac/pt-PT/Firefox%2050.1.0.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask firefox
==> Moving App 'Firefox.app' to '/Applications/Firefox.app'
🍺  firefox was successfully installed!

The only significant difference in your setup and mine is:

==> Homebrew-Cask Staging Location:
/opt/homebrew-cask/Caskroom
@vitorgalvao
Member

@filipesperandio What’s the output of echo $HOMEBREW_CASK_OPTS?

@neutric
Contributor
neutric commented Jan 7, 2017

@miccal Isn't his case a little different though? He chose a locale that is not listed in the Cask (en_CA) and pt_BR, which also isn't listed, is probably brought into the mix by his Timezone or Language & Region settings in macOS. I am not familiar with the inner workings of brew cask install, so can't chime in on why the default locale en is not chosen in his case.

@miccal
Member
miccal commented Jan 7, 2017

@neutric the OP said he ran brew cask install firefox --language=en (which is equivalent to brew cask install firefox) and it failed - I used pt just as an example.

@filipesperandio what language specifically are you trying to install?

@filipesperandio

@vitorgalvao

$ echo $HOMEBREW_CASK_OPTS
--caskroom=/opt/homebrew-cask/Caskroom

@miccal: @neutric is kinda right... If you see my brew doctor output, you will see LANG=en_CA.UTF-8.
I expect brew cask to pick this one if I don't specify anything, but the result is the error pointing to pt_BR... and even if I especify --language=en the error is still the same one.

For what it is worth, I want to install an english version

@miccal
Member
miccal commented Jan 9, 2017 edited

brew cask does not choose a language based on LANG. What happens if you run brew cask install --force firefox?

@filipesperandio

How is the language selected though?

Despite of the arguments I pass (--language=en, --force), I always get:

$ brew cask install --force firefox
Error: 'pt_BR' cannot be parsed to a Locale while loading 'firefox' from '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/firefox.rb'
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

If this doesn’t fix the problem, please report this bug:
  https://github.com/caskroom/homebrew-cask#reporting-bugs

/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:23:in `rescue in load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:19:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:11:in `load_from_file'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:20:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/tapped.rb:15:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc.rb:57:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:110:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'
@miccal
Member
miccal commented Jan 10, 2017

@filipesperandio the language is selected with the flag --language= for Casks that have the language stanza.

This is weird since pt_BR is not a part of firefox.rb.

Does this happen when you install anything else via brew cask? Try running brew cask install operadriver (because it is just a small binary which is completely removed by brew cask uninstall operadriver) and report back if it works.

@filipesperandio

I understand --language, my question is more about how is it selected when I don't pass anything. Should it always fallback to the default language if not specified? Or does brew cask try to select what it thinks is best for the user?

Operadriver goes fine, but I notice it does not have anything on language on its formula.

$ brew cask install operadriver
==> Downloading https://github.com/operasoftware/operachromiumdriver/releases/download/v0.2.2/operadriver_mac64.zip
######################################################################## 100.0%
==> Verifying checksum for Cask operadriver
==> Symlinking Binary 'operadriver' to '/usr/local/bin/operadriver'
🍺  operadriver was successfully installed!

... and it is not related exclusively to firefox, I think it is to everything that has language specs:

$ brew cask install world-of-tanks
Error: 'pt_BR' cannot be parsed to a Locale while loading 'world-of-tanks' from '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/world-of-tanks.rb'
Follow the instructions here:
  https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md

If this doesn’t fix the problem, please report this bug:
  https://github.com/caskroom/homebrew-cask#reporting-bugs

/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:23:in `rescue in load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:19:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cask_loader.rb:11:in `load_from_file'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/path_base.rb:20:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/source/tapped.rb:15:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc.rb:57:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:19:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:10:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:110:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:149:in `process'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/brew-cask.rb:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/brew.rb:24:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'

I've also removed all language entries on firefox formula, made some adjustments and I could install it with success.
Maybe I you help me understand how language works I could have some insights about this problem.

@miccal
Member
miccal commented Jan 21, 2017

Closing due to lack of reproducibility.

@miccal miccal closed this Jan 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment