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

x/website: go-import meta tags not served for golang.org/x subrepos in china #47905

Closed
DemonsLu opened this issue Aug 23, 2021 · 8 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@DemonsLu
Copy link

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

go version go1.17 darwin/amd64

Does this issue reproduce with the latest release?

yes.

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

GOHOSTARCH="amd64"
GOHOSTOS="darwin"

What did you do?

  1. use go mod init xxx to create a mod file.
  2. go get golang.org/x/sys

PS: My go env variable GOPROXY setting is direct, and my IP address is in Hong Kong. When I curl this link https://golang.org/x/sys?go-get=1, I got this response: <a href="https://golang.google.cn/x/sys?go-get=1">Found</a>.
So I curl https://golang.google.cn/x/sys?go-get=1 again, and then got the error open _content/x/sys: no such file or directory in html response.

What did you expect to see?

Dependencies can be downloaded normally

What did you see instead?

Got error message: go get: unrecognized import path "golang.org/x/sys": reading https://golang.org/x/sys?go-get=1: 404 Not Found

@gopherbot gopherbot added this to the Unreleased milestone Aug 23, 2021
@michaelolson1996
Copy link

I believe they are migrating to a new domain, not sure if this helps but this is the new domain https://pkg.go.dev/golang.org/x/sys

@DemonsLu
Copy link
Author

Thank for your apply, michaelolson.

I see golang.org is migrating to the new domain, but the official promised that the migration should not affect dependent downloads. And the reason why I open this issue is that I want to use a third-party libraries, which imports golang.org/x/sys/unix package.

When I executed the go get ${third_party}, I got golang.org/x/sys/unix: unrecognized import path "golang.org/x/sys": reading https://golang.org/x/sys?go-get=1: 404 Not Found error. So I couldn't get this third-party dependency now.

And I think this is a big problem if open-source library which import the golang.org/x/sys/xxx package cannot download.

@changkun
Copy link
Member

It may because of the IP detection in the China region, since the go-imports tag is still in the HTML response (https://golang.org/x/sys):

<meta name="go-import" content="golang.org/x/sys git https://go.googlesource.com/sys">

Are you using a VPN?

@DemonsLu
Copy link
Author

I am not using VPN.

I agree this problem may because of the IP detection.The HTML response of the url https://golang.org/x/sys is this for me.

<a href="https://golang.google.cn/x/sys">Found</a>.

And the HTML response of this url golang.google.cn/x/sys is not contain the go-imports tag. So I got the reading https://golang.org/x/sys?go-get=1: 404 Not Found error.

@seankhliao seankhliao changed the title x/sys: cannot download golang.org/x/sys dependency x/website: go-import meta tags not served for golang.org/x subrepos in china Aug 23, 2021
@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 23, 2021
@seankhliao
Copy link
Member

cc @dmitshur @rsc

@dmitshur
Copy link
Contributor

CL 344289 will fix the problem due to redirection.

@DemonsLu
Copy link
Author

Now it looks working fine, I can find the go-import metadata in golang.org/x.

Thanks a lot.

@dmitshur
Copy link
Contributor

Thanks for verifying. Closing as fixed (see related issue #47808 which has more details).
(Thanks for fixing @rsc!)

@golang golang locked and limited conversation to collaborators Aug 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants