mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 08:45:58 +03:00
[GH-ISSUE #5523] [bug]: crypto.subtle is missing in Pre-request script envrironment. #2130
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liudonghua123 on GitHub (Oct 29, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5523
Is there an existing issue for this?
Platform
Desktop App
Browser
Chrome
Operating System
Windows
Bug Description
When I tried to use hmacSHA256 like the following code in pre-request scripts. The web crypto module is missing.
And the crypto.subtle module is normal in browser web or node environment.
Deployment Type
Hoppscotch Cloud
Version
The latest v25.9.1-0 version.
@liudonghua123 commented on GitHub (Oct 29, 2025):
Maybe it's related to https://github.com/hoppscotch/hoppscotch/issues/3353, https://github.com/AndrewBastin/faraday-cage/issues/1, https://github.com/authts/oidc-client-ts/issues/1550.
@liudonghua123 commented on GitHub (Oct 29, 2025):
Maybe use https to fix it? The crypto.subtle is only available in
Secure context.https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle
@liudonghua123 commented on GitHub (Oct 30, 2025):
Currently, I am using
import CryptoJS from 'https://esm.run/crypto-js@4.2.0';to replace the functionality ofcrypto.subtle. However, I would prefer to usecrypto.subtle.@jamesgeorge007 commented on GitHub (Nov 6, 2025):
Hi, thanks for reporting. We're aware of certain limitations with the native crypto module. ESM imports offer an alternative approach. Ongoing scripting improvements are tracked in https://github.com/hoppscotch/hoppscotch/discussions/5221.
You can continue to use the native
cryptomodule by opting out of theExperimental scripting sandbox.Closing this issue in favour of #2015.