heroku / legacy-cli

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

Updating... ! Heroku client internal error - Update hash signature mismatch #1934

Open Madsvj opened 8 years ago

Madsvj commented 8 years ago

Hi.

I'm running heroku on windows and while updating heroku

heroku-cli: Updating... ! Heroku client internal error.

I get this error:

    Error:       Update hash signature mismatch (Heroku::Command::CommandFailed)
    Command:     heroku config --help
    Version:     heroku/toolbelt/3.42.40 (i386-mingw32) ruby/2.1.7
    Error ID:    2b30f2a7520245ec862ae4ff2b8fb490

The following is my /.heroku/error.log

Heroku client internal error.
Update hash signature mismatch
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:10:in `error'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:132:in `block (2 levels) in update'
C:/Program Files (x86)/Heroku/ruby-2.1.7/lib/ruby/2.1.0/tmpdir.rb:88:in `mktmpdir'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:121:in `block in update'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:88:in `wait_for_lock'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:117:in `update'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:105:in `rescue in autoupdate'
C:/Program Files (x86)/Heroku/lib/heroku/updater.rb:101:in `autoupdate'
C:/Program Files (x86)/Heroku/lib/heroku/cli.rb:35:in `start'
C:/Program Files (x86)/Heroku/bin/heroku:29:in `<main>'

Googling suggests using a proxy server, but that didn't seem to work for me. And I have no problems installing addons, or similar connections based problems.

\ Windows version:

OS Name: Microsoft Windows 7 Enterprise OS Version: 6.1.7601 Service Pack 1 Build 7601

ransombriggs commented 8 years ago

@Madsvj Could you run the update command as follows to enable debugging for me?

set HEROKU_DEBUG=1
heroku update
Madsvj commented 8 years ago

Of course @ransombriggs

Here is what it returns:

(venv) C:\Users\Bc0655\businesszone>set HEROKU_DEBUG=1

(venv) C:\Users\Bc0655\businesszone>heroku update
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: commands
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: update
2016/04/20 14:11:29 GET /master/manifest.json HTTP/1.1
Host: cli-assets.heroku.com

heroku-cli: Updating plugins... no plugins to update.
truncating error log...
cleaning up tmp dirs...
heroku-cli: Updating... !    Update hash signature mismatch

hope that helps you

ransombriggs commented 8 years ago

@Madsvj could you re-install the toolbelt from https://toolbelt.heroku.com/ ? I failed to replicate your problem on my local machine, but re-installing should get you back to a good install.

Madsvj commented 8 years ago

@ransombriggs just tried that.

And I still get:

(venv) C:\Users\Bc0655\businesszone>set heroku_DEBUG=1

(venv) C:\Users\Bc0655\businesszone>heroku update
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: commands
heroku-cli/4.29.4-8a30ba5 (386-windows) go1.6.1 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: update
2016/04/21 08:56:02 GET /master/manifest.json HTTP/1.1
Host: cli-assets.heroku.com

heroku-cli: Updating plugins... no plugins to update.
truncating error log...
cleaning up tmp dirs...
heroku-cli: Updating... !    Update hash signature mismatch

:/

ransombriggs commented 8 years ago

@Madsvj I was digging into the code this morning and found a bug where we were accidentally suppressing a non-200 error code in the updater code. We shipped an update to the installer so that the error will propagate properly and it should provide more insight into why you are receiving this error. Sorry for the inconvenience, but could you please download the installer again? This will not fix your problem, but should at least give us a better idea of why it is failing.

ransombriggs commented 8 years ago

@Madsvj Are you using antivirus software? We have had issues recently with BitDefender & 360 antivirus products recently, but it usually manifests itself differently.

Madsvj commented 8 years ago

@ransombriggs - just came back from a short vacation. I downloaded the new installer and I now get:

(venv) C:\Users\Bc0655\businesszone>set heroku_debug=1

(venv) C:\Users\Bc0655\businesszone>heroku update
heroku-cli/4.30.0-2dfc0f4 (386-windows) go1.6.2 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.30.0-2dfc0f4 (386-windows) go1.6.2 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: version
heroku-cli/4.30.0-2dfc0f4 (386-windows) go1.6.2 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: commands
heroku-cli/4.30.0-2dfc0f4 (386-windows) go1.6.2 C:\Users\Bc0655\AppData\Local\heroku\heroku-cli.exe cmd: update
2016/04/25 09:41:55 GET /master/manifest.json HTTP/1.1
Host: cli-assets.heroku.com

heroku-cli: Updating plugins... !
 ?    Error installing package.
 ?    npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Bc0655\AppData\Local\heroku\package.json'
 ?    npm WARN heroku No description
 ?    npm WARN heroku No repository field.
 ?    npm WARN heroku No README data
 ?    npm WARN heroku No license field.
 ?    npm ERR! Windows_NT 6.1.7601
 ?    npm ERR! argv "C:\\Users\\Bc0655\\AppData\\Local\\heroku\\node-5.10.1-windows-386\\node.exe" "C:\\Users\\Bc0655\\AppData\\Local\\heroku\\npm-3.8.5\\cli.js" "install" "heroku-
apps@2.0.2"
 ?    npm ERR! node v5.10.1
 ?    npm ERR! npm  v3.8.5
 ?    npm ERR! path C:\Users\Bc0655\AppData\Local\heroku\node_modules\heroku-git
 ?    npm ERR! code EPERM
 ?    npm ERR! errno -4048
 ?    npm ERR! syscall rename
 ?
 ?    npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\heroku-git' -> 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\.h
eroku-git.DELETE'
 ?    npm ERR!     at moveAway (C:\Users\Bc0655\AppData\Local\heroku\npm-3.8.5\lib\install\action\finalize.js:38:5)
 ?    npm ERR!     at destStatted (C:\Users\Bc0655\AppData\Local\heroku\npm-3.8.5\lib\install\action\finalize.js:27:7)
 ?    npm ERR!     at FSReqWrap.oncomplete (fs.js:82:15)
 ?    npm ERR!
 ?    npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\heroku-git' -> 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\.h
eroku-git.DELETE'
 ?    npm ERR!     at Error (native)
 ?    npm ERR!  [Error: EPERM: operation not permitted, rename 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\heroku-git' -> 'C:\Users\Bc0655\AppData\Local\heroku\node_modules\
.heroku-git.DELETE']
 ?    npm ERR!
 ?    npm ERR! Please try running this command again as root/Administrator.
 ?
 ?    npm ERR! Please include the following file with any support request:
 ?    npm ERR!     C:\Users\Bc0655\AppData\Local\heroku\npm-debug.log
 ?
 ?    Try running again with GODE_DEBUG=info to see more output.
goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
        /usr/local/Cellar/go/1.6.2/libexec/src/runtime/debug/stack.go:24 +0x80
runtime/debug.PrintStack()
        /usr/local/Cellar/go/1.6.2/libexec/src/runtime/debug/stack.go:16 +0x1a
main.WarnIfError(0x30f50018, 0x10f63978)
        /Users/jdickey/src/github.com/heroku/cli/io.go:142 +0x1d8
main.updatePlugins.func1()
        /Users/jdickey/src/github.com/heroku/cli/update.go:83 +0x21c
main.action(0x7d0e80, 0x1c, 0x0, 0x0, 0x82b084)
        /Users/jdickey/src/github.com/heroku/cli/io.go:288 +0x157
main.updatePlugins()
        /Users/jdickey/src/github.com/heroku/cli/update.go:93 +0x3d
main.Update(0x82b52c, 0x6, 0x7a27b0, 0xa)
        /Users/jdickey/src/github.com/heroku/cli/update.go:67 +0x64
main.glob.func8(0x10fc6480)
        /Users/jdickey/src/github.com/heroku/cli/update.go:44 +0x150
main.(*Cli).Run(0x954b30, 0x10f4a100, 0x2, 0x2, 0x0)
        /Users/jdickey/src/github.com/heroku/cli/cli.go:83 +0x485
main.main()
        /Users/jdickey/src/github.com/heroku/cli/main.go:102 +0x105
 done. Updated 3 packages.
truncating error log...
cleaning up tmp dirs...
heroku-cli: Updating... !    Update hash signature mismatch

It seems like something is very weird here. It might be a security thing.

To answer your other question: I'm using heroku from a big coorperation, so yes I'm using antivirus. We use symantic endpoint protection

ransombriggs commented 8 years ago

@Madsvj Sorry for the delay in response, but are you able to create exceptions ? We are currently working on getting this fixed with the anti-virus providers, but it has been slow going.

Madsvj commented 8 years ago

@ransombriggs I can only imagine how slow that kind of process is.

I'm not sure whether I can, and if how. But I can probably get some help on that internally.

I'm guessing it is just cli-assets.heroku.com that has to be marked as safe?

jayagl commented 8 years ago

+1

Similar strange error on Windows 10. Tried reinstalling after deleting any traces of Heroku (no folder found in AppData/Local) but no good. Running CMD in Admin mode. It's very strange because it's looking for '/home/ubuntu' on a Windows machine.

Error below:

$ heroku
panic: mkdir H:: The system cannot find the path specified.

goroutine 1 [running]:
panic(0x738fa0, 0x12f00a60)
        /usr/local/go/src/runtime/panic.go:481 +0x326
main.must(0xe44388, 0x12f00a60)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/io.go:188 +0x44
main.configHome(0x0, 0x0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:66 +0x17d
main.init()
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:27 +0x390
panic: mkdir H:: The system cannot find the path specified.

goroutine 1 [running]:
panic(0x738fa0, 0x12c04a60)
        /usr/local/go/src/runtime/panic.go:481 +0x326
main.must(0x2644388, 0x12c04a60)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/io.go:188 +0x44
main.configHome(0x0, 0x0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:66 +0x17d
main.init()
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:27 +0x390
panic: mkdir H:: The system cannot find the path specified.

goroutine 1 [running]:
panic(0x738fa0, 0x12c08580)
        /usr/local/go/src/runtime/panic.go:481 +0x326
main.must(0x32c44370, 0x12c08580)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/io.go:188 +0x44
main.configHome(0x0, 0x0)
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:66 +0x17d
main.init()
        /home/ubuntu/.go_workspace/src/github.com/heroku/cli/filesystem.go:27 +0x390