heroku / legacy-cli

Heroku CLI
https://cli.heroku.com
MIT License
1.37k stars 380 forks source link

[windows] Error installing Toolbelt v4 #1854

Open ryanwalters opened 8 years ago

ryanwalters commented 8 years ago

I'm on Windows 7. I've been having issues with the CLI recently so I reinstalled from the downloadable.

After installing, I ran the command heroku login:

heroku-cli: Installing Toolbelt v4... done
For more information on Toolbelt v4: https://github.com/heroku/heroku-cli
!   Heroku client internal error.
!   Search for help at: htps://help.heroku.com
!   Or report a bug at: https://github.com/heroku/heroku/issues/new

Error:      Invalid argument - "C:\...\AppData\Local/heroku/heroku-cli.exe" version (errno::EINVAL)
Command:    heroku login
Version:    heroku/toolbelt/3.42.25 (i386-mingw32) ruby/2.1.7
Error ID:   337bdb9823f94e7faaba19624a1add33

More information in C:/.../.heroku/error.log

error.log

Heroku client internal error.
Invalid argument - "C:\...\AppData\Local/heroku/heroku-cli.exe" version
C:/Utils/Heroku/lib/heroku/jsplugin.rb:108:in ``'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:108:in `version'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:149:in `setup'
C:/Utils/Heroku/lib/heroku/cli.rb:24:in `start'
C:/Utils/Heroku/bin/heroku:29:in `<main>'

Subsequent attempts to heroku login

Heroku client internal error.
Invalid argument - "C:\...\AppData\Local/heroku/heroku-cli.exe" commands --json
C:/Utils/Heroku/lib/heroku/jsplugin.rb:88:in ``'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:88:in `commands_info'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:60:in `commands'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:226:in `find_command'
C:/Utils/Heroku/lib/heroku/jsplugin.rb:13:in `try_takeover'
C:/Utils/Heroku/lib/heroku/cli.rb:25:in `start'
C:/Utils/Heroku/bin/heroku:29:in `<main>'

How can I fix heroku-cli?

jdx commented 8 years ago

Is C:\... literally what it says?

ryanwalters commented 8 years ago

No, it points to my user folder.

jdx commented 8 years ago

does it have any strange characters? what happens if you run set LOCALAPPDATA=C:\heroku?

ryanwalters commented 8 years ago

No strange characters. Running set LOCALAPPDATA=C:\heroku has no effect, the same errors occur.

jdx commented 8 years ago

try reinstalling, you have an old version

ryanwalters commented 8 years ago

After reinstalling, running heroku login generates the same error. The only difference being the version (3.42.27 vs 3.42.25) and Error ID.

Error:      Invalid argument - "C:\...\AppData\Local/heroku/heroku-cli.exe" version (errno::EINVAL)
Command:    heroku login
Version:    heroku/toolbelt/3.42.27 (i386-mingw32) ruby/2.1.7
Error ID:   0755e40010a74960818e5e50de1ca81a
ransombriggs commented 8 years ago

@ryanwalters Sorry for the delayed response, but I think this may be a variation on issues from here heroku/heroku-cli#84 . Could you try running heroku login from the Command Prompt rather than mingw and see if that works? If it does, then you can switch back to mingw and continue working. There are known issues with heroku login and mingw. The root cause of this problem is that stdin is not a real terminal, so we cannot turn off the echo during the password request.

JimmyRare commented 8 years ago

I have the same error using cmd.exe. Doesn't matter if I run the login command or any other.

ransombriggs commented 8 years ago

@ryanwalters Are you running BitDefender antivirus software, a user encountered an error like this who had BitDefender installed, which started blocking this executable.

esegura commented 8 years ago

FWIW, this is exactly what I just run into. Bitdefender botched an update (reported 'Gen:Variant.Midie.8641') and I had to reinstall from scratch, since I was getting 'panic' on further updates. Even reinstalling failed at first, I had to add an exception for heroku-cli.exe. Thanks Bitdefender!