[GH-ISSUE #4592] [bug]: Inconsistency with global and environment / secret and public Variables that have the same name #1696

Open
opened 2026-03-16 21:27:25 +03:00 by kerem · 0 comments
Owner

Originally created by @Ben-Nipp on GitHub (Dec 5, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4592

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

There is an inconsistency between how Hoppscotch requests are made when you have multiple variables with the same name in your current environment and global environment.

When actually making requests the following variable priority is used:

  1. Secret Global Variable (Used First)
  2. Secret Environment Variable
  3. Public Environment Variable
  4. Public Global Variable

However when hovering over the variable in the request in Hoppscotch it will sometimes show a different variable then the one it actually uses. In my testing it appears to display as if its using the following priority

  1. Secret Environment Variable
  2. Public Environment Variable
  3. Secret Global Variable
  4. Public Global Variable

Steps to reproduce

  1. Setup a secret variable in your global environment
  2. Setup either a secret or public variable with the same name in your current non-global environment
  3. Use that newly created variable in a request
  4. Hover over the variable in the request
  5. Tool tip should show the variable in your non-global environment
  6. Make request
  7. Request will actually use the variable in your global environment

Environment

Production

Version

Local

Originally created by @Ben-Nipp on GitHub (Dec 5, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4592 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior There is an inconsistency between how Hoppscotch requests are made when you have multiple variables with the same name in your current environment and global environment. When actually making requests the following variable priority is used: 1. Secret Global Variable (Used First) 2. Secret Environment Variable 3. Public Environment Variable 4. Public Global Variable However when hovering over the variable in the request in Hoppscotch it will sometimes show a different variable then the one it actually uses. In my testing it appears to display as if its using the following priority 1. Secret Environment Variable 2. Public Environment Variable 3. Secret Global Variable 4. Public Global Variable ### Steps to reproduce 1. Setup a secret variable in your global environment 2. Setup either a secret or public variable with the same name in your current non-global environment 3. Use that newly created variable in a request 4. Hover over the variable in the request 5. Tool tip should show the variable in your non-global environment 7. Make request 8. Request will actually use the variable in your global environment ### Environment Production ### Version Local
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1696
No description provided.