-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/gopls: On ANY network error, error says GOPROXY=off
#53676
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
Comments
If
|
If there was an underlying network issue, I think Except certain cases where module download is explicitly requested (e.g. Users who want gopls to behave differently can try I think there should be other errors during the initial workspace loading. Can you please capture the log from the gopls start and share the log? @golang/tools-team we need to improve this error reporting - in particular, I think we should rewrite or hide error messages that include |
Change https://go.dev/cl/419500 mentions this issue: |
Per the explanation at golang/go#54069, allow network access whenever loading the workspace. Enable one test that exercises this behavior. More tests will be added in subsequent CLs. Updates golang/go#47540 Updates golang/go#53676 Updates golang/go#54069 Change-Id: I9c3bb19d36702bc6b8051bee6b7cddaec5b97c0c Reviewed-on: https://go-review.googlesource.com/c/tools/+/419500 Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> gopls-CI: kokoro <[email protected]>
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
I tried to use the LSP. By mistake, the process had no network access.
What did you expect to see?
The LSP should indicate that there is a network error.
What did you see instead?
The LSP indicated that
GOPROXY=off
, which made me assume the binaries are was using where messed up or readingGOPROXY
from some obscure place:The logs also indicate the same (though have a single mention of network error between a dozen of the following):
In reality,
GOPROXY
was unset; the error message is completely wrong here.See: NixOS/nixpkgs#177632
Reproducing tips
You can repro this by running gopls in a network namespace with not real network access:
You can also repro this by allowing
gopls
to have network access, but without access to/etc/resolv.conf
:Also yields:
Finally, even when
gopls
has network access and can read/etc/resolv.conf
, but has not access to/etc/ssl/certs/ca-certificates.crt
, it will also show the same error:The text was updated successfully, but these errors were encountered: