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

github.com/gogo/protobuf version 1.3.3 Not avaailable #8469

Closed
4 tasks
TxCorpi0x opened this issue Jan 28, 2021 · 32 comments
Closed
4 tasks

github.com/gogo/protobuf version 1.3.3 Not avaailable #8469

TxCorpi0x opened this issue Jan 28, 2021 · 32 comments

Comments

@TxCorpi0x
Copy link

There is wrong version of gogo/protobuf in the go.mod file.
go mod throws this error:
go: github.com/cosmos/[email protected] requires
github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

Version 0.40.1

Simply run "go mod tidy"


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@aaronc
Copy link
Member

aaronc commented Jan 28, 2021

Please see

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

@aaronc
Copy link
Member

aaronc commented Jan 28, 2021

Unfortunately we can't make updates upstream because gogo protobuf is unmaintained so we needed to fork.

@tac0turtle
Copy link
Member

If you are still experiencing issues, please ask in the discord.

@puneetsingh166
Copy link

facing the same issue when i am tring to run github.com/cosmos/[email protected] please help.

@amaury1093
Copy link
Contributor

Please see #8469 (comment)

@Floh1234
Copy link

Floh1234 commented Jan 8, 2022

I still have this problem.
The replace line is already in every go.mod File but GO still wants to import the gogo protobuf.
please help

@tac0turtle
Copy link
Member

can you link to your go mod?

@aaronc
Copy link
Member

aaronc commented Jan 8, 2022

I think we should just update the go module path for the regen fork so we don't need a replace directive

@TWVyY3VyaW8K
Copy link

I'm experiencing the same issue with [email protected].

Error:

go: github.com/cosmos/[email protected] requires
	github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

go.mod attached -> go.mod.zip

@tac0turtle
Copy link
Member

I'm experiencing the same issue with [email protected].

Error:

go: github.com/cosmos/[email protected] requires
	github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

go.mod attached -> go.mod.zip

please place this at the bottom of your go.mod. If you have a link that is better, generally people won't download something like this and shouldn't.

@TWVyY3VyaW8K
Copy link

I'm experiencing the same issue with [email protected].
Error:

go: github.com/cosmos/[email protected] requires
	github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

go.mod attached -> go.mod.zip

please place this at the bottom of your go.mod. If you have a link that is better, generally people won't download something like this and shouldn't.

There you go, this is my go.mod:

go 1.15

module github.com/cosmos/cosmos-sdk

require (
	github.com/99designs/keyring v1.1.6
	github.com/armon/go-metrics v0.3.9
	github.com/bgentry/speakeasy v0.1.0
	github.com/btcsuite/btcd v0.22.0-beta
	github.com/coinbase/rosetta-sdk-go v0.7.0
	github.com/confio/ics23/go v0.6.6
	github.com/cosmos/btcutil v1.0.4
	github.com/cosmos/go-bip39 v1.0.0
	github.com/cosmos/iavl v0.17.3
	github.com/cosmos/ledger-cosmos-go v0.11.1
	github.com/gogo/gateway v1.1.0
	github.com/gogo/protobuf v1.3.3
	github.com/golang/mock v1.6.0
	github.com/golang/protobuf v1.5.2
	github.com/gorilla/handlers v1.5.1
	github.com/gorilla/mux v1.8.0
	github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
	github.com/grpc-ecosystem/grpc-gateway v1.16.0
	github.com/hashicorp/golang-lru v0.5.4
	github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87
	github.com/improbable-eng/grpc-web v0.14.1
	github.com/jhump/protoreflect v1.9.0
	github.com/kr/text v0.2.0 // indirect
	github.com/lib/pq v1.10.2 // indirect
	github.com/magiconair/properties v1.8.5
	github.com/mattn/go-isatty v0.0.14
	github.com/onsi/ginkgo v1.16.4 // indirect
	github.com/onsi/gomega v1.13.0 // indirect
	github.com/otiai10/copy v1.6.0
	github.com/pkg/errors v0.9.1
	github.com/prometheus/client_golang v1.11.0
	github.com/prometheus/common v0.29.0
	github.com/rakyll/statik v0.1.7
	github.com/regen-network/cosmos-proto v0.3.1
	github.com/rs/zerolog v1.23.0
	github.com/spf13/cast v1.3.1
	github.com/spf13/cobra v1.2.1
	github.com/spf13/pflag v1.0.5
	github.com/spf13/viper v1.8.1
	github.com/stretchr/testify v1.7.0
	github.com/tendermint/btcd v0.1.1
	github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15
	github.com/tendermint/go-amino v0.16.0
	github.com/tendermint/tendermint v0.34.14
	github.com/tendermint/tm-db v0.6.4
	golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
	google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71
	google.golang.org/grpc v1.42.0
	google.golang.org/protobuf v1.27.1
	gopkg.in/yaml.v2 v2.4.0
)

// latest grpc doesn't work with with our modified proto compiler, so we need to enforce
// the following version across all dependencies.
replace google.golang.org/grpc => google.golang.org/grpc v1.33.2

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

replace github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76

// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
replace github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.7.0

@tac0turtle
Copy link
Member

this looks right, what error comes from this?

Also this is a go.mod of the cosmos/cosmos-sdk. Do you have a link to your app?

@TWVyY3VyaW8K
Copy link

TWVyY3VyaW8K commented Jan 23, 2022

I'm just trying to follow this: https://docs.cosmos.network/master/run-node/interact-node.html#programmatically-via-go

This error comes from running:

go get github.com/cosmos/cosmos-sdk

The error is

go get: github.com/cosmos/[email protected] requires
    github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

@peterbourgon
Copy link

peterbourgon commented Feb 1, 2022

I think we should just update the go module path for the regen fork so we don't need a replace directive

+1000. You can't rely upon (or expect) your consumers to add specific replace directives to their go.mod files to make your module usable. If the SDK intends to use the fork, then it should definitely update the import path to the forked version throughout the repo.

@gzukel
Copy link

gzukel commented Feb 28, 2022

@TWVyY3VyaW8K I'm trying to install cosmovisor the same way and having similar issues. I'm clean in a docker file no go.mod just trying to install it with go get.

RUN go get github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor

@tac0turtle
Copy link
Member

run go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/[email protected] instead. v1.1.0 needs to be built from source

@nyetwurk
Copy link

This ticket should not have been closed. Please do not require people using this to have obscure replace directives in their go.mod files.

@tac0turtle
Copy link
Member

This ticket should not have been closed. Please do not require people using this to have obscure replace directives in their go.mod files.

we are aware and have other issues mentioning this. Robert mentioned Regen is working towards fixing this

@houshengbo
Copy link

houshengbo commented Mar 29, 2022

My experience is that after following this comment #8469 (comment), I was able to add all the dependencies correctly, by leveraging replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 in the go.mod.

However, I bumped into another issue:

github.com/tendermint/spn/x/monitoringp/keeper: module github.com/tendermint/spn@latest found (v0.1.0), but does not contain package github.com/tendermint/spn/x/monitoringp/keeper

To resolves this one, I need to add replace github.com/tendermint/spn => github.com/tendermint/spn v0.0.0-20220329145811-3be2098f04e1 into go.mod.

@YusufTaylanYuksel
Copy link

One of my private libraries uses the [email protected] and I am trying to add this library to another project as a package.
I am facing the issue even though I have the replace line in my go.mod file.

My go.mod file is like

require ( 
	.........
	github.com/cosmos/cosmos-sdk v0.45.1
	.........
)

replace (
	github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.1
	github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
)

The error I am facing during the get is like below

go get: <MY_PRIVATE_LIB> requires
	github.com/cosmos/[email protected] requires
	github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

Is there any suggestion please?

@nyetwurk
Copy link

we are aware and have other issues mentioning this. Robert mentioned Regen is working towards fixing this

Where is the ticket that is tracking this?

@julienrbrt
Copy link
Member

Where is the ticket that is tracking this?

We've migrated to cosmos/gogoproto in v0.47. This is our own fork of gogo/protobuf with multiples bugfixes. v0.47 chains won't need the replace tag (See the UPGRADING.md)

@nyetwurk
Copy link

Please keep this ticket open until it is resolved, and note which version it is resolved in.

@julienrbrt
Copy link
Member

julienrbrt commented Nov 20, 2022

Please keep this ticket open until it is resolved, and note which version it is resolved in.

This ticket is resolved but didn't precise a PR, but here it is: #13070.
However the workaround mentioned here is still valid and is what must be used for versions < 0.47.

@nyetwurk
Copy link

@nyetwurk
Copy link

nyetwurk commented Nov 20, 2022

@nyetwurk
Copy link

Again, this should stay open IMO until 0.47 is actually tagged and released.

@julienrbrt
Copy link
Member

Again, this should stay open IMO until 0.47 is actually tagged and released.

No, this isn't how we manage issues. But thanks for having linked the issue above.

@nyetwurk
Copy link

Again, this should stay open IMO until 0.47 is actually tagged and released.

No, this isn't how we manage issues. But thanks for having linked the issue above.

Understood.

v0.47.0-alpha1 fixes our issue.

@skudrow-figure
Copy link

I think we should just update the go module path for the regen fork so we don't need a replace directive

+1000. You can't rely upon (or expect) your consumers to add specific replace directives to their go.mod files to make your module usable. If the SDK intends to use the fork, then it should definitely update the import path to the forked version throughout the repo.

@peterbourgon I loved your Go + Microservices presentation at Golan UK conference - it made me switch from Python to Go.

v0.47.0-alpha1 worked for me as well

@PaulRBerg
Copy link

PaulRBerg commented Aug 17, 2023

Trying to install v0.47.3 but getting the same error. I have this in in my go.mod file:

replace (
    github.com/cosmos/cosmos-sdk => github.com/rollkit/cosmos-sdk v0.47.3-rollkit-v0.10.1-no-fraud-proofs
)

Running go mod tidy produces the following error:

go: github.com/gogo/[email protected]: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3

Is this due to Rollkit?

I was able to fix this by using the regen-network/protobuf fork, but I would prefer not to have to do that when using Cosmos SDK.

@julienrbrt
Copy link
Member

Hi!
This is indeed due to rollkit fork, the SDK does not require this replace anymore.
If you look at their go.mod you see their still use that replace. You should submit an issue to their repo instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests