cypto.getRandomValues() not supported

Hey, I am new to both React Native and Snack. I was using the Traversy Media tutorial to help me get a feel for it and making the starting program. However, about halfway through, I have run into a problem. When I try to generate a UUID for a new string, the debugger says “Device: (3:1602) UUID: This browser does not seem to support crypto.getRandomValues(). If you need to support this browser, please provide a custom random number generator through options.rng.” I am currently using Firefox, and the android emulator is having this problem. This problem also occurs when I run it on my Android Phone. How can I fix this?

Traversy Media Video: React Native Crash Course - YouTube (29:03)

Hi

You might want to upvote the following feature request:

I’m not sure why it’s working in the video, but instead of waiting for crypto.getRandomValues() to be implemented, you could use a different UUID module:

import uuid from 'uuid-random';

console.log(uuid());
1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.