You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.
It seems that golang.org/x/net/trace has been vendored using gx. This means that some packages - that have also been vendored with gx - import it with a path that looks like gx/ipfs/$HASH/go-net/trace.
In my case, I am also using a package that imports golang.org/x/net/trace with the right path. Therefore, the init functions of golang.org/x/net/trace and gx/ipfs/$HASH/go-net/trace - which are the same one - are both called.
The problem is that this function tries to register 2 handlers to the DefaultServeMux of the net/http package (i.e. https://github.com/golang/net/blob/master/trace/trace.go#L112). Thus, if it gets called twice, it will panic with the following error: http: multiple registrations for /debug/requests.
@willhite@aboodman This is because we are not importing ipfs in the normal way. Can we import ipfs in the normal way instead of using the hash version (gx)
This is the system that ipfs itself uses. The "normal" thing doesn't really work for IPFS. I can't remember why (I think that go get doesn't understand the gx-based paths).
Hi,
It seems that
golang.org/x/net/trace
has been vendored usinggx
. This means that some packages - that have also been vendored withgx
- import it with a path that looks likegx/ipfs/$HASH/go-net/trace
.In my case, I am also using a package that imports
golang.org/x/net/trace
with the right path. Therefore, theinit
functions ofgolang.org/x/net/trace
andgx/ipfs/$HASH/go-net/trace
- which are the same one - are both called.The problem is that this function tries to register 2 handlers to the
DefaultServeMux
of thenet/http
package (i.e. https://github.com/golang/net/blob/master/trace/trace.go#L112). Thus, if it gets called twice, it will panic with the following error:http: multiple registrations for /debug/requests
.For example, the following piece of code:
... will produce the following output:
The text was updated successfully, but these errors were encountered: