hyperboria / bugs

Peer-to-peer IPv6 networking, secure and near-zero-conf.
154 stars 17 forks source link

First call to Crypto.pseudoRandomBytes(10).toString('hex') can fail #101

Closed interfect closed 8 years ago

interfect commented 8 years ago

My build is failing because of this line:

https://github.com/hyperboria/cjdns/blob/master/node_build/builder.js#L135

Node is producing a "Bad argument" error inside its own SLowBuffer.toString implementation.

When I run it manually from the command line, I get the same error the first time I call Crypto.pseudoRandomBytes(10).toString('hex') but not on subsequent calls.

The build script should be updated to work around this error.

Node is 0.10.24, as downloaded by ./do for ARM.