tradle / react-native-crypto

partial implementation of node's `crypto` for react-native
MIT License
372 stars 85 forks source link

TypeError: Cannot read property 'random' of undefined #61

Closed eldhomt closed 3 years ago

eldhomt commented 3 years ago

I am trying to use an XMPP server as signalling server for webRTC audio and video chat. So I am using 'stanza' library to communicate with XMPP server. In order to signal the server, I am using 'Jingle'. But after setting up the react-native environment for 'stanza', I am getting the following error in the console.

[Fri Aug 06 2021 09:47:13.865]  LOG      There was an error collecting entropy from the browser:
[Fri Aug 06 2021 09:47:13.866]  LOG      [TypeError: undefined is not an object (evaluating 'sjcl.random')]
[Fri Aug 06 2021 09:47:13.867]  LOG      Running "webrtcApp" with {"rootTag":1}

React-native version is 0.62.2 I have gone through the issues at https://github.com/tradle/react-native-crypto/issues/10. But that doesn't work for me.

Can somebody help me to sort this out, as I am trying it for weeks?