mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4788] [bug]: Pre request scripts don't concurrently update global variables when request is pending #1795
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#1795
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 @evanqhuang on GitHub (Feb 25, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4788
Is there an existing issue for this?
Current behavior
Testing a workflow where the request hangs until a promise is completed. It seems like the environment variables aren't updated concurrently by the pre request scripts. So when I go to execute a separate request that uses an environment variable updated by the pre request scripts of the first (pending) request, the variable has not been updated.
I would expect the behavior of pre request scripts to be executed fully before the request is sent, so that environment variables are set and updated before the request is sent, and so any following requests can use the updated environment variable even if the preceding request hasn't completed.
Steps to reproduce
In my pre request script I have
to set a random workflow_id in the global environment variables. I've verified that the
workflow_idis populated correctly in the initial request. The endpoint must hang so that the request isn't completed.In a separate request when I try to use it in the url parameters
<<workflow_id>>is still blank.Environment
Production
Version
Cloud