Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Seeing multiple-value uuid.NewV4() in single-value context error messages #430

Closed
SimonRuaGitHub opened this issue Mar 16, 2021 · 6 comments
Labels

Comments

@SimonRuaGitHub
Copy link

SimonRuaGitHub commented Mar 16, 2021

It is necessary to use another third party provider for uuid usage since the satori go.uuid repo is dead now. This triggering compile error in the following code lines.

Note: Although error is not visible when using go mod since it points to last release version, it is better to solve this issue, since redis broadcast artifact might be a good option for some people

..\..\go\src\github.com\googollee\go-socket.io\redis_broadcast.go:126:21: multiple-value uuid.NewV4() in single-value context ..\..\go\src\github.com\googollee\go-socket.io\redis_broadcast.go:358:26: multiple-value uuid.NewV4() in single-value context ..\..\go\src\github.com\googollee\go-socket.io\redis_broadcast.go:459:26: multiple-value uuid.NewV4() in single-value context ..\..\go\src\github.com\googollee\go-socket.io\redis_broadcast.go:497:26: multiple-value uuid.NewV4() in single-value context

Satori repo is dead

@smhmh
Copy link

smhmh commented Apr 10, 2021

I has this problem too!

@sshaplygin sshaplygin added the bug label Apr 14, 2021
@arrayindex-dev
Copy link

arrayindex-dev commented Apr 16, 2021

I made a fix.

The problem was that the uuid.NewV4() makes 2 variables, and uuid.Must() just panics on an error.

Fixed with uuid.Must(uuid.NewV4()).String()

@ghost
Copy link

ghost commented Apr 29, 2021

@arrayindex-dev you should probably consider migrating off of satori uuid. That repo has gone unmaintained for almost three years now. See the link in the reporter posted.

@arrayindex-dev
Copy link

@arrayindex-dev you should probably consider migrating off of satori uuid. That repo has gone unmaintained for almost three years now. See the link in the reporter posted.

Unfortunately this repo is being used in some production environments. Migrating off satori uuid would cause problems.

However, I agree that using Google uuid would be a better choice.

@ghost
Copy link

ghost commented May 1, 2021

Thanks for the response @arrayindex-dev

I should inform you that the version in use today is subject to a serious vulnerability where periodically the library will produce a UUID that has mostly 0's in it. https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMSATORIGOUUID-72488

The maintainer hasn't bothered to release this fix via a tag. While yes migrating off of libraries always sucks, the unfortunate reality is that you are creating a problem for your users by not migrating away from a dead library. I think you should reconsider your position.

Luckily, there's a fork of satori/go.uuid that's a drop in replacement and is actually maintained. https://github.com/gofrs/uuid. This should at least make it easier to migrate.

@sshaplygin
Copy link
Collaborator

Fixed into v1.4.5 release

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

No branches or pull requests

4 participants