Skip to content

After connection failure, panic #948

@qiulaidongfeng

Description

@qiulaidongfeng

How To Reproduce:
nvm install 10.22.0,Downloading npm version 6.14.6 timeout

Expected Behavior:
Tell me it's timed out

Actual behavior:
Downloading node.js version 10.22.0 (64-bit)...
Complete
Creating D:\nodejs\temp

Downloading npm version 6.14.6... Error while downloading https://github.com/npm/cli/archive/v6.14.6.zip - Get "https://github.com/npm/cli/archive/v6.14.6.zip": read tcp 192.168.1.252:53924->140.82.114.4:443: wsarecv: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0xc6b53d]

goroutine 1 [running]:
nvm/web.Download({0x120ac030, 0x2e}, {0x1200e540, 0x1e}, {0x122e6d90, 0x6})
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/web/web.go:90 +0x44d
nvm/web.GetNpm({0x12018da1, 0x9}, {0x122e6d90, 0x6})
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/web/web.go:257 +0x39d
main.install({0x120180e8, 0x7}, {0xcd9d26, 0x2})
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:364 +0x9d9
main.main()
C:/Users/corey/OneDrive/Documents/workspace/libraries/oss/coreybutler/nvm-windows/src/nvm.go:87 +0xaea

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs better error messageNVM4W would benefit from a better error/failure message.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions