nodejs-storage: "SubtleCrypto not found" when calling getSignedUrl

Environment details

  • OS: Windows 10
  • Node.js version: 10.9.0
  • npm version: 6.2.0
  • @google-cloud/storage version: 2.5.0

Steps to reproduce

  1. Attempt the example given here

I have recently started seeing the following error when trying to get a signed url:

SubtleCrypto not found. Make sure it's an https:// website.

Following the stack trace, it seems like the node library is trying to call some sort of browser crypto library - it looks like this:

at new BrowserCrypto(C:\...\node_modules\google-auth-library\build\src\crypto\browser\crypto.js

I’ve reverted back to version 2.3.0 of the library and the bug went away, so it seems as it if was introduced somewhere between 2.3 and 2.5.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@AVaksman, the upgraded version does fix the error for me, thank you!

To upgrade I just issued: npm upgrade firebase-admin

Hey guys, I updated back to 2.5.0 to re-create the issue and have found that it’s no longer occurring… no idea what changed, but I can no longer reproduce it either, so I suppose that’s a good thing! I’ll re-open the issue if it starts showing up again.