Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't the environment variables in one of my Collections reference the variables in the current environment? #7539

Closed
1 task done
CCCCY98 opened this issue Jun 13, 2024 · 5 comments
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer

Comments

@CCCCY98
Copy link

CCCCY98 commented Jun 13, 2024

Expected Behavior

For example, I want to reference base_url in the api, which I can do in my other collections, but I cannot reference it in this newly created collection.

Actual Behavior

image

Reproduction Steps

No response

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

Version: Insomnia 9.2.0

What operating system are you using?

Windows

Operating System Version

Windows 10 22H2 19045.4412

Installation method

Installation package downloaded from the official website.Download Link:https://objects.githubusercontent.com/github-production-release-asset-2e65be/56899284/bf348dfb-aaac-4784-9b89-7b312015dfc7?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240424%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240424T025726Z&X-Amz-Expires=300&X-Amz-Signature=a031695253df3ae2e3b5c9531dd70d8d97e081ca3aa2d731f7d3fb76d1aaf1a3&X-Amz-SignedHeaders=host&actor_id=51116198&key_id=0&repo_id=56899284&response-content-disposition=attachment%3B%20filename%3DInsomnia.Core-8.6.1.exe&response-content-type=application%2Foctet-stream

Last Known Working Insomnia version

No response

@CCCCY98 CCCCY98 added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Jun 13, 2024
@alaz-aura
Copy link

try removed the double quotes "" and instead type in base. I found on mac, the variable auto-complete can be ... funny ... I only include quotes if my values require them

@CCCCY98
Copy link
Author

CCCCY98 commented Jun 17, 2024

try removed the double quotes "" and instead type in base. I found on mac, the variable auto-complete can be ... funny ... I only include quotes if my values require them

image
Still can't reference it, but other than that, my other Collections can be referenced normally.
image

@subnetmarco
Copy link
Member

This can be fixed as long as we implement a check that prevents from circular references to be setup, a circular reference is a variable that references another variable which creates a circular reference:

{
  "var1": "hello {{var2}}"
  "var2": "{{var1}} world"
}

@subnetmarco
Copy link
Member

Prioritizing for 9.3.2 this week if we can fix it in time.

@gatzjames
Copy link
Contributor

Hey @CCCCY98 and @alaz-aura this appears to be working as expected.
The reason you don't see the variables in the auto-complete is that you haven't selected that environment to be active.
If you make it active you should see the variables in the auto-complete as expected.
Closing for now but feel free to reopen if there is an issue for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification S-unverified Status: Unverified by maintainer
Projects
None yet
Development

No branches or pull requests

4 participants