Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

Costas Zarifis

Tutorials, code snippets, hacks and more... Random Number Generator Error Image

So, if you decide to use in one of your projects, you might come accross the following error:

ERROR [karma]: [Error: error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded]

followed by a long and scary stack traceback. Not to worry there's a fix for that!

Open the file:


Go to line 734 (it might actually be a couple of lines above or below that, look around!) and replace the following snippet:

if (crypto.randomBytes) {
} else { ....

with this:

if (crypto.pseudoRandomBytes) {
} else {

That's it! It should be good to go now!

About the author

Costas Zarifis


comments powered by Disqus