Scirpt insomnia.globals.set(,) not set variable when use base global environment
Expected Behavior
when using base global environment in script insomnia.globals.set("global", "abc123") variable name global must set to value "abc123" like collection variable
like this
Actual Behavior
global variable not exist
Reproduction Steps
- create new collection
- create global environment and use them
- create new request
GET https://example.com - set after request
insomnia.globals.set("pre-global", "abc123")
- send request 6.check global environment
Is there an existing issue for this?
- [x] I have searched the issue tracker for this problem.
Which sync method do you use?
- [ ] Git sync.
- [x] Insomnia Cloud sync.
- [ ] Local only
Additional Information
this work in 11.1.0 but not in 11.2.0
my full test script is
insomnia.globals.set("global", "abc123")
insomnia.baseGlobals.set("base-global", "abc123")
insomnia.environment.set("env", "abc123")
insomnia.baseEnvironment.set("base-env", "abc123")
the environment work fine in both case
this happen in pre-request and after-request
current work around is create "sub" globel environment to allow command to set variable to.
Insomnia Version
11.2.0
What operating system are you using?
Windows
Operating System Version
Windows 11 24H2
Installation method
download from insomnia.rest
Last Known Working Insomnia version
11.1.0
it is also happening to me, just test it, deleted the current value of a "sessionId" I used to fill during a login call and the value today is never updated.
Same issue after updating to 11.2.0
Fix in https://github.com/Kong/insomnia/pull/8790 which will be available in V11.3