Bcrypto panics when rebuilded by electron.
From my investigation it seems that electron replaces openssl with boressl and this causes some incompatibilities. It seems that requiring of native random passes and doesn't fallback to node version.
I've mitigated it with (ELECTRON env is set by user , not electron itself):
if(process && process.env.ELECTRON) {
return require("bcrypto/lib/node/random").randomBytes(length);
} else {
return require("bcrypto/lib/random").randomBytes(length);
}
bcrypto 4.2.8