[GH-ISSUE #3421] [bug]: environment variable updates need page reload to be picked up #1149

Closed
opened 2026-03-16 18:51:44 +03:00 by kerem · 1 comment
Owner

Originally created by @TheScientist on GitHub (Oct 5, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3421

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I set an env variable through the tests script of a request and want to use that updated variable in another request, I first need to reload the page/pwa.
Same seems to be necessary when changing the environment variable through the environments view, when that environment is currently selected.

Steps to reproduce

  1. Execute request with test script setting a environment variable (e.g. read token from authentication request)
  2. Open request that uses this environment variable
  3. Check value of environment variable

IS: old variable value
Should: variable value set by first request test

Environment

Production

Version

Self-hosted

Originally created by @TheScientist on GitHub (Oct 5, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3421 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I set an env variable through the tests script of a request and want to use that updated variable in another request, I first need to reload the page/pwa. Same seems to be necessary when changing the environment variable through the environments view, when that environment is currently selected. ### Steps to reproduce 1. Execute request with test script setting a environment variable (e.g. read token from authentication request) 2. Open request that uses this environment variable 3. Check value of environment variable IS: old variable value Should: variable value set by first request test ### Environment Production ### Version Self-hosted
kerem 2026-03-16 18:51:44 +03:00
Author
Owner

@titeipa commented on GitHub (Dec 14, 2023):

We had the same issue and it turns out it was a misconfiguration problem.
The websocket url was not configured correctly and it didn't connect. I presume websocket is used to update the frontend real time.
The variable is:
VITE_BACKEND_WS_URL=wss://localhost:3170/graphql
Make sure the protocol is correct and set to wss in case you use https.

<!-- gh-comment-id:1855734235 --> @titeipa commented on GitHub (Dec 14, 2023): We had the same issue and it turns out it was a misconfiguration problem. The websocket url was not configured correctly and it didn't connect. I presume websocket is used to update the frontend real time. The variable is: VITE_BACKEND_WS_URL=wss://localhost:3170/graphql Make sure the protocol is correct and set to wss in case you use https.
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#1149
No description provided.