insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Base environment variables not being picked up when running requests

Open stephen1274 opened this issue 7 months ago • 2 comments

Expected Behavior

The value of the variable is pulled through into the request.

Actual Behavior

The value of the variable is not pulled through into the request.

Reproduction Steps

  1. Ensure the Base Environment has the required variables Image
  2. Ensure the request has the variables in the body Image
  3. Submit the request

Is there an existing issue for this?

Which sync method do you use?

  • [ ] Git sync.
  • [ ] Insomnia Cloud sync.
  • [x] Local only

Additional Information

The console shows that the request does not include the values of the variables: Image The preview also shows no value: Image There is no conflicting variable in the Global Environment. The insomnia.Environment.db file appears to be populated with multiple instances of the Global and Base Environments whenever this occurs. Is this expected? I would assume that the environments should be unique. Image This does not appear to affect all of my collections, even when using the same Global Environment. However, I cannot identify a cause for the issue.

Insomnia Version

11.1.0

What operating system are you using?

Windows

Operating System Version

Windows 11 Enterprise, 24H2

Installation method

Unsure

Last Known Working Insomnia version

N/A

stephen1274 avatar Jun 11 '25 11:06 stephen1274

Can you check if these envs are overwritten in the pre-request script? cc @ihexxa

notjaywu avatar Jun 13 '25 03:06 notjaywu

@stephen1274 Please also check if those values are also defined at the other levels, such as parent folders, currently I cant reproduce it.

ihexxa avatar Jun 13 '25 03:06 ihexxa

Hey @stephen1274 I am going to close this as probably you've found the solution? But feel free to reopen it if it still happens.

ihexxa avatar Jun 30 '25 06:06 ihexxa

Thanks @ihexxa, I don't encounter the issue every time so will try to grab more information the next time it happens and will reopen the ticket.

stephen1274 avatar Jul 02 '25 09:07 stephen1274