Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: error while fetching dependency #57656

Closed
rajender opened this issue Jan 6, 2023 · 7 comments
Closed

cmd/go: error while fetching dependency #57656

rajender opened this issue Jan 6, 2023 · 7 comments
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@rajender
Copy link
Contributor

rajender commented Jan 6, 2023

What version of Go are you using (go version)?

$ go version
go version go1.19.4 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\rreddy\AppData\Local\go-build
set GOENV=C:\Users\rreddy\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\rreddy\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\rreddy\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.19.4
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\rreddy\AppData\Local\Temp\go-build168345287=/tmp/go-build -gno-record-gcc-switches

What did you do?

$ go get github.com/xuri/excelize/v2
go: downloading github.com/xuri/excelize/v2 v2.6.1
go: downloading github.com/xuri/excelize v1.4.1
go: github.com/xuri/excelize/v2@v2.6.1: read "https:/proxy.golang.org/@v/v2.6.1.zip": unexpected EOF

What did you expect to see?

fetching the package without errors.

What did you see instead?

go: github.com/xuri/excelize/v2@v2.6.1: read "https:/proxy.golang.org/@v/v2.6.1.zip": unexpected EOF

@seankhliao
Copy link
Member

is that unmodified output?
can you download any code without issue?
is there a proxy/mitm on your network?
are you able to get https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip with other tools?
can you give the full log of go get -x -v github.com/xuri/excelize/v2?

@bcmills
Copy link
Member

bcmills commented Jan 6, 2023

The single slash in the read "https:/proxy.golang.org/@v/v2.6.1.zip": error message seems suspicious to me — I'm not sure how it would have gotten like that.

The symptoms also seem somewhat similar to #46179. @rajender, do you have an HTTP_PROXY and/or HTTPS_PROXY configured?

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. GoCommand cmd/go modules labels Jan 6, 2023
@bcmills bcmills added this to the Backlog milestone Jan 6, 2023
@rajender
Copy link
Contributor Author

rajender commented Jan 6, 2023

@bcmills No. HTTP_PROXY and/or HTTPS_PROXY environment variables not set.

@rajender
Copy link
Contributor Author

rajender commented Jan 6, 2023

@seankhliao

Yes, It's unmodified output. I am facing issues while downloading from browser or curl also.

$ curl https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.


$ go get -x -v github.com/xuri/excelize/v2
# get https://proxy.golang.org/github.com/@v/list
# get https://proxy.golang.org/github.com/xuri/@v/list
# get https://proxy.golang.org/github.com/xuri/excelize/v2/@v/list
# get https://proxy.golang.org/github.com/xuri/excelize/@v/list
# get https://proxy.golang.org/github.com/@v/list: 404 Not Found (0.136s)
# get https://proxy.golang.org/github.com/xuri/@v/list: 404 Not Found (0.187s)
# get https://proxy.golang.org/github.com/xuri/excelize/v2/@v/list: 200 OK (0.302s)
go: downloading github.com/xuri/excelize/v2 v2.6.1
# get https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip
# get https://proxy.golang.org/github.com/xuri/excelize/@v/list: 200 OK (0.334s)
# get https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip: 200 OK (0.060s)
go: github.com/xuri/excelize/v2@v2.6.1: read "https:/proxy.golang.org/@v/v2.6.1.zip": unexpected EOF

@seankhliao
Copy link
Member

can you do curl -vLO https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip ?

@rajender
Copy link
Contributor Author

rajender commented Jan 6, 2023

$ curl -vLO https://proxy.golang.org/github.com/xuri/excelize/v2/@v/v2.6.1.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 146.112.47.14:443...
* Connected to proxy.golang.org (146.112.47.14) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
*  CApath: none
} [5 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [10 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [3172 bytes data]
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS alert, unknown CA (560):
} [2 bytes data]
* SSL certificate problem: unable to get local issuer certificate
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

@seankhliao
Copy link
Member

That is a Cisco IP address it's connecting to, not an upstream proxy address.
It would suggest that there is some network middleware which is modifying the request/response, causing the errors.
This is outside the control of Go, and you should probably contact your network operator for help.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2023
@golang golang locked and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants