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: `go get`: 'unexpected end of JSON input' for module missing /v3 suffix #30494

Closed
iiinsomnia opened this issue Mar 1, 2019 · 6 comments

Comments

@iiinsomnia
Copy link

commented Mar 1, 2019

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

$ go version
v1.12

The module yiigo has tag v3.0.0, but when I run go get github.com/iiinsomnia/yiigo, it gets the v2.1.0 and when I run go get github.com/iiinsomnia/yiigo@v3.0.0, it shows: go get github.com/iiinsomnia/yiigo@v3.0.0: unexpected end of JSON input

@iiinsomnia iiinsomnia changed the title `go mod` : unexpected end of JSON input `go get` : unexpected end of JSON input Mar 1, 2019

@bradfitz bradfitz changed the title `go get` : unexpected end of JSON input cmd/go: `go get` : unexpected end of JSON input Mar 1, 2019

@bradfitz bradfitz added this to the Go1.13 milestone Mar 1, 2019

@bradfitz

This comment has been minimized.

Copy link
Member

commented Mar 1, 2019

/cc @bcmills

@bcmills

This comment has been minimized.

Copy link
Member

commented Mar 2, 2019

The reason you can't go get it is because the module path doesn't end in /v3. See https://golang.org/cmd/go/#hdr-Module_compatibility_and_semantic_versioning.

That said, we should definitely produce a clearer diagnostic message in this case.

CC @jayconrod

@bcmills bcmills changed the title cmd/go: `go get` : unexpected end of JSON input cmd/go: `go get`: unexpected end of JSON input for module missing /v3 suffix Mar 2, 2019

@bcmills bcmills added the modules label Mar 2, 2019

@bcmills bcmills changed the title cmd/go: `go get`: unexpected end of JSON input for module missing /v3 suffix cmd/go: `go get`: 'unexpected end of JSON input' for module missing /v3 suffix Mar 2, 2019

@jayconrod jayconrod self-assigned this Mar 4, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

Please fill out the complete issue template: in particular, the output of go env would be helpful (particularly GOPROXY).

I see a successful download rather than unexpected end of JSON input using go 1.12.1, which suggests that the problem may actually be within a proxy that you are fetching from.


example.com$ go1.12.1 mod init example.com
go: creating new go.mod: module example.com

example.com$ go1.12.1 get github.com/iiinsomnia/yiigo@v3.0.0
go: finding github.com/iiinsomnia/yiigo v3.0.0
go: finding github.com/pelletier/go-toml v1.2.1-0.20181124002727-27c6b39a135b
go: finding github.com/go-sql-driver/mysql v1.4.1-0.20190217072658-972a708cf979
go: finding github.com/jmoiron/sqlx v1.2.1-0.20181024163419-82935fac6c1a
go: finding github.com/gomodule/redigo v1.7.1-0.20190226174433-b47395aa1766
go: finding go.uber.org/zap v1.9.2-0.20190215012540-d2a364dac1d9
go: finding gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
go: finding gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3
go: finding vitess.io/vitess v3.0.0-rc.3.0.20190228015701-4e3faef0886e+incompatible
go: finding github.com/go-sql-driver/mysql v1.4.0
go: finding github.com/mattn/go-sqlite3 v1.9.0
go: finding go.mongodb.org/mongo-driver v1.0.0-rc1
go: finding github.com/lib/pq v1.0.0
go: downloading github.com/iiinsomnia/yiigo v0.0.0-20190228072520-b72a3640dd06
go: extracting github.com/iiinsomnia/yiigo v0.0.0-20190228072520-b72a3640dd06
go: downloading go.uber.org/zap v1.9.2-0.20190215012540-d2a364dac1d9
go: downloading go.mongodb.org/mongo-driver v1.0.0-rc1
go: downloading vitess.io/vitess v3.0.0-rc.3.0.20190228015701-4e3faef0886e+incompatible
go: downloading github.com/gomodule/redigo v1.7.1-0.20190226174433-b47395aa1766
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3
go: downloading github.com/pelletier/go-toml v1.2.1-0.20181124002727-27c6b39a135b
go: downloading gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
go: downloading github.com/go-sql-driver/mysql v1.4.1-0.20190217072658-972a708cf979
go: extracting gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3
go: extracting gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
go: extracting github.com/gomodule/redigo v1.7.1-0.20190226174433-b47395aa1766
go: downloading github.com/jmoiron/sqlx v1.2.1-0.20181024163419-82935fac6c1a
go: extracting github.com/pelletier/go-toml v1.2.1-0.20181124002727-27c6b39a135b
go: extracting github.com/go-sql-driver/mysql v1.4.1-0.20190217072658-972a708cf979
go: extracting github.com/jmoiron/sqlx v1.2.1-0.20181024163419-82935fac6c1a
go: extracting go.uber.org/zap v1.9.2-0.20190215012540-d2a364dac1d9
go: finding go.uber.org/multierr v1.1.0
go: finding go.uber.org/atomic v1.3.2
go: downloading go.uber.org/multierr v1.1.0
go: downloading go.uber.org/atomic v1.3.2
go: extracting go.uber.org/atomic v1.3.2
go: extracting go.uber.org/multierr v1.1.0
go: extracting go.mongodb.org/mongo-driver v1.0.0-rc1
go: finding github.com/go-stack/stack v1.8.0
go: finding github.com/golang/snappy v0.0.1
go: finding github.com/xdg/scram latest
go: finding github.com/xdg/stringprep v1.0.0
go: downloading github.com/go-stack/stack v1.8.0
go: downloading github.com/golang/snappy v0.0.1
go: extracting github.com/go-stack/stack v1.8.0
go: extracting github.com/golang/snappy v0.0.1
go: downloading github.com/xdg/stringprep v1.0.0
go: downloading github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
go: extracting github.com/xdg/stringprep v1.0.0
go: extracting github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
go: finding golang.org/x/sync/semaphore latest
go: finding golang.org/x/sync latest
go: downloading golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
go: extracting golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
go: extracting vitess.io/vitess v3.0.0-rc.3.0.20190228015701-4e3faef0886e+incompatible
go: finding golang.org/x/net/context latest
go: finding golang.org/x/net latest
go: downloading golang.org/x/net v0.0.0-20190327214358-63eda1eb0650
go: extracting golang.org/x/net v0.0.0-20190327214358-63eda1eb0650
go: finding golang.org/x/text v0.3.0
go: finding golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: finding golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading golang.org/x/text v0.3.0
go: downloading golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
go: extracting golang.org/x/text v0.3.0

example.com$ go env

@bcmills

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

However, #30499 is closely related.

@bcmills

This comment has been minimized.

Copy link
Member

commented Mar 28, 2019

#29262 is probably also related, and might make the result dependent on previous fetches from the same underlying repository.

@gopherbot

This comment has been minimized.

Copy link

commented Apr 28, 2019

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.)

@gopherbot gopherbot closed this Apr 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.