Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rare v4 UUIDs have one digit extra #11

Closed
dertseha opened this Issue Sep 5, 2012 · 11 comments

Comments

Projects
None yet
7 participants

dertseha commented Sep 5, 2012

I've experienced that about one or two v4 UUIDs out of 1000 (created through unit test) have 33 digits instead of 32.

Examples are from a few test runs:

  • 2a2ca832a1434f3cb810057b7e60685cf
  • b6454385524142aa961008d27e1520b61
  • cfd4d3f2293d4cb4af1006e9bc4025345
  • bc93e33cfbe8409f861002a8e3a9b65d0

I haven't investigated further, but wanted to give you a heads up.

A few recent ones that have been generated for me with an extra digit.

2650ad81-5157-4c3d-a9100-005cf206fde2
784f10cb-884b-4dd7-99100-c9be5a89d57e
dc2b01f4-2787-42ba-bd100-26ea69a65571
8c357875-cc91-4038-82100-438f6f7bc7da

All seem to have a '100' that ends the 4th group.

@dominykas dominykas added a commit to dominykas/uuid-js that referenced this issue Apr 26, 2013

@dominykas dominykas fixing issue #11: generating random integers correctly a5ce4c8

👍 I have also seen this bug. The patch from @dymonaz corrects it.

@pnegri pnegri added a commit that referenced this issue Feb 25, 2014

@pnegri pnegri Merge pull request #12 from dymonaz/master
Fixing issue #11: generating random integers correctly
32d4aac

Just saw it too:
UUID.create().toString() gave
'0630715f-2766-4782-ab100-e7ba8c7b2d07'

garex commented Oct 20, 2014

@pnegri Let's then close this issue.

Contributor

dominykas commented Oct 20, 2014

Just use a different module.

I did end up using a different module. Why would you close this issue? It's still broken. At the very least the function could generate a uuid and check that it's valid and keep regenerating them until it gets a valid one.

garex commented Oct 21, 2014

Guys, dont' #12 fixes this?
If it fixes — then this issue must be closed.
Why do we need to use something another, if this works? Or not works? Then you suggest to use also broken solution as PR was in /dev/null? I dont' understand. Pls clarify.

This fix went in April 2013. I experienced this issue March 2014. I was using the version on npm not the version on github. I'm guessing the issue is that the module on npm is 3 years old and should be updated. Maybe an issue should be opened up for that.

garex commented Oct 21, 2014

created #13

Owner

pnegri commented Oct 21, 2014

Will update the npm guys!

@pnegri pnegri closed this Oct 21, 2014

garex commented Oct 21, 2014

Patrick, tnx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment