upgrade hangs doing autocomplete step
srfraser opened this issue ยท 15 comments
$ brew upgrade heroku
==> Upgrading 1 outdated package, with result:
heroku/brew/heroku 7.6.0 -> 7.7.0
==> Upgrading heroku/brew/heroku
==> Downloading https://cli-assets.heroku.com/heroku-v7.7.0/heroku-v7.7.0.tar.xz
######################################################################## 100.0%
==> /usr/local/Cellar/heroku/7.7.0/bin/heroku autocomplete --refresh-cache
then it just hangs.
This may be waiting for user input:
$ heroku autocomplete
heroku: Enter your login credentials
Building the autocomplete cache... ?
Email:
Confirming that it's waiting for login details, and doesn't honour a previous login
$ heroku login
โบ Warning: heroku update available from 7.6.0 to 7.7.0
heroku: Enter your login credentials
Email [*****]: ******
Password: *******
Two-factor code: ******
Logged in as ******
$ brew upgrade heroku --verbose
==> Upgrading 1 outdated package, with result:
heroku/brew/heroku 7.6.0 -> 7.7.0
==> Upgrading heroku/brew/heroku
rm /usr/local/bin/heroku
/usr/bin/sandbox-exec -f /private/tmp/homebrew20180718-11261-uph5gh.sb nice /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew:/usr/local/Homebrew/Library/Homebrew/cask/lib -- /usr/local/Homebrew/Library/Homebrew/build.rb /usr/local/Homebrew/Library/Taps/heroku/homebrew-brew/Formula/heroku.rb --verbose
==> Downloading https://cli-assets.heroku.com/heroku-v7.7.0/heroku-v7.7.0.tar.xz
Already downloaded: /Users/simon/Library/Caches/Homebrew/heroku-7.7.0.tar.xz
==> Verifying heroku-7.7.0.tar.xz checksum
tar xf /Users/simon/Library/Caches/Homebrew/heroku-7.7.0.tar.xz -C /private/tmp/heroku-20180718-11263-1e81g60
==> /usr/local/Cellar/heroku/7.7.0/bin/heroku autocomplete --refresh-cache
Building the autocomplete cache... ?
heroku: Enter your login credentials
The same happens when I try to install fresh heroku client with brew install heroku/brew/heroku. It hangs waiting for the credentials.
^I have been having the same issue with an install of a fresh heroku client
brew install heroku/brew/heroku
==> Installing heroku from heroku/brew
==> Downloading https://cli-assets.heroku.com/heroku-v7.7.1/heroku-v7.7.1.tar.xz
Already downloaded: /Users/stonesoup/Library/Caches/Homebrew/heroku-7.7.1.tar.xz
==> /usr/local/Cellar/heroku/7.7.1/bin/heroku autocomplete --refresh-cache
Confirmed. I am having the same problem. It never goes past the last command.
confirmed. I'm having the same issue. It times out.
Same. And I've confirmed that I am currently logged into heroku.
Confirmed.
==> /usr/local/Cellar/heroku/7.7.1/bin/heroku autocomplete --refresh-cache
Last 15 lines from /Users/vlad/Library/Logs/Homebrew/heroku/01.heroku:Building the autocomplete cache... ?
heroku: Enter your login credentials
Email: Building the autocomplete cache... done
/usr/local/Cellar/heroku/7.7.1/libexec/node_modules/@oclif/errors/lib/index.js:29
throw err;
^Error: timed out
at Object.error (/usr/local/Cellar/heroku/7.7.1/libexec/node_modules/@oclif/errors/lib/index.js:22:17)
at Timeout.setTimeout (/usr/local/Cellar/heroku/7.7.1/libexec/node_modules/@heroku-cli/command/lib/login.js:29:38)
at ontimeout (timers.js:427:11)
at tryOnTimeout (timers.js:289:5)
at unrefdHandle (timers.js:511:7)
at Timer.processTimers (timers.js:211:12)
Noting installation proceeds if you blindly provide your email, password and two-factor code (if enabled) when the installation hangs, and properly obscures the password/two-factor input.
heroku/brew/heroku (7.6.0) < 7.7.1
==> Upgrading 1 outdated package, with result:
heroku/brew/heroku 7.6.0 -> 7.7.1
==> Upgrading heroku/brew/heroku
==> Downloading https://cli-assets.heroku.com/heroku-v7.7.1/heroku-v7.7.1.tar.xz
Already downloaded: /Users/rtanay/Library/Caches/Homebrew/heroku-7.7.1.tar.xz
==> /usr/local/Cellar/heroku/7.7.1/bin/heroku autocomplete --refresh-cache
me@work.place
==> Caveats
To use the Heroku CLI's autocomplete:
1) Use homebrew's shell completion - https://docs.brew.sh/Shell-Completion
OR
2) Run and follow the install steps:
$ heroku autocomplete
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
๐บ /usr/local/Cellar/heroku/7.7.1: 17,136 files, 45.5MB, built in 1 minute 10 seconds
For people stuck, this method works:
curl https://cli-assets.heroku.com/install.sh | sh
Thanks @donfelicio. Your method worked.
I'd still like to continue using homebrew to manage this. I see there was 7.7.2 today, which doesn't fix this. @RasPhilCo any ideas?
I just pushed a fix, try that and let me know!
โก worked for me!
$ brew upgrade
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (heroku/brew, homebrew/cask-versions, homebrew/cask).
==> Updated Formulae
heroku/brew/heroku โ
==> Upgrading 1 outdated package, with result:
heroku/brew/heroku 7.6.1 -> 7.7.2
==> Upgrading heroku/brew/heroku
==> Downloading https://cli-assets.heroku.com/heroku-v7.7.2/heroku-v7.7.2.tar.xz
######################################################################## 100.0%
==> Caveats
To use the Heroku CLI's autocomplete --
Via homebrew's shell completion:
1) Follow homebrew's install instructions https://docs.brew.sh/Shell-Completion
2) Then run
$ heroku autocomplete --refresh-cache
OR
Use our standalone setup:
1) Run and follow the install steps:
$ heroku autocomplete
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
๐บ /usr/local/Cellar/heroku/7.7.2: 17,136 files, 45.5MB, built in 42 seconds
Also works for me. If you wanted to add it back in, would heroku auth:whoami
be a good check to see if there's an active login?
def logged_in?
system bin/"heroku", "auth:whoami"
true
rescue
false
end
if logged_in?
system bin/"heroku", "autocomplete", "bash", "--refresh-cache"
end
@srfraser good idea but it's prob more trouble then it's worth in the long run. We were attempting to save users one command run but it probably was going to generate more confusion, so I'll leave it as is for now. Since you opened this ticket and are good to go now, I'll close it on your behalf. Thanks for reporting it.