mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5528] [bug] Environment variables fully overridden when changing Environment during pending request #2133
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#2133
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 @jakfalter on GitHub (Oct 29, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5528
Originally assigned to: @nivedin on GitHub.
Is there an existing issue for this?
N/A
Current behavior
Switching Environments during an active request will completely overwrite all (both current and initial) environment variable values with the values from the Environment that has been selected before. This is a critical data loss issue - user data in environments can be accidentally corrupted by switching environments at the wrong time.
Expected Behavior
Environment variable values should never be updated during request execution.
Steps to reproduce
test-variableand set it toABCin Environment A andDEFin Environment B.Here is how it looks in the Database
Now check the contents of Environment A,
test-variableis now overwritten withDEFWe can confirm the same by looking into the database
Hoppscotch Version
Server: Self hosted 2025.6.1
Client: MacOS Desktop 2025.6.1
Interceptor
N/A
Browsers Affected
N/A
Operating System
MacOS
Additional Information
N/A
@kbamponsem commented on GitHub (Oct 30, 2025):
I could also add on this issue that the
pw.env.setisn't working anymore.My particular case:
I call it in a Post-request script to set some envs after my API call and they are not set.
Thanks.
@jamesgeorge007 commented on GitHub (Nov 3, 2025):
Hi @kbamponsem, could you confirm if this is reproducible in the latest version?
@jamesgeorge007 commented on GitHub (Nov 13, 2025):
Closing since this is fixed in the latest release.