0

I am using the Firebase Admin SDK in a next project. I have an api endpoint that needs to get a file from the firebase storage

const file = await getStorage().bucket().file(uid+"/sample.png").createReadStream()

When I run the code, this error appears:

Error during SSR Rendering
error rendering: Error: crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported

I looked for the error message but it is always related to react native. I don't know what I am doing wrong here. The same error occurs if I try download() instead of createReadStream()

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Duc Tran
  • 3
  • 2
  • PS: I also tried this suggestion https://stackoverflow.com/questions/76294229/how-to-resolve-crypto-getrandomvalues-not-supported already but the error still occurs. – Duc Tran May 29 '23 at 10:08

0 Answers0