Description
When executing version v1.9.0
of the library, an exception is thrown at this line: global.expo.modules.ExpoCrypto.getRandomValues(array)
.
Here's the full error log:
ERROR Error: Exception in HostFunction: unordered_map::at: key not found, js engine: hermes
I am utilizing this package alongside randombytes.
The array
variable, which originates from randombytes
, is initialized at this location.
Additional context that might be helpful:
-
I'm running the app on an iOS simulator using the command:
npx expo start -c
. -
Buffer
support was added with:npm install buffer
.And it's being shimmed in the following manner:
import { Buffer } from "buffer"; global.Buffer = Buffer;
For further clarity, I've tracked the function call in version v1.8.0
, and it ultimately leads to global.ExpoModules.ExpoRandom.getRandomBase64String(byteLength);
, which runs without any hitches.
For now, I've reverted to using v1.8.0
. Appreciate the efforts behind this library, and I hope this information aids in resolving the issue.