Search code examples
react-nativeexporeact-native-webview

crypto.getRandomValues() not supported


I'm getting this error with npm [email protected] when I try to generate a QR code with react-native-qrcode-generator

I'm using react-native with an expo managed workflow. And the thing is it works on iOS, and i only get the error on Android

I searched for a solution myself and I tried installing react-native-get-random-values but that also didn't work.

Any thoughts?


Solution

  • I just had the same issue on android. Works fine on iOS.

    I solved it with:

    1. Uninstall the existing one npm uninstall react-native-webview
    2. Use expo install react-native-webview instead.