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

Shared variables are no longer accessible when selecting "No Environment" after update #420

Closed
atrakaz opened this issue Sep 19, 2019 · 10 comments
Labels

Comments

@atrakaz
Copy link

atrakaz commented Sep 19, 2019

  • VSCode Version: 1.38.1
  • OS Version: Windows 10 Pro
  • REST Client Version: 0.22.1
    Note: Worked yesterday before the new version

Steps to Reproduce:

  1. ...>AppData>Roaming>Code>User>settings.json:
    "rest-client.environmentVariables": {
    "emptyEnvironment": {
    },
    "$shared": {
    "testUrl": "http://www.google.com/"
    },
    }

  2. Select REST Client Environment: "No Environment"

  3. test.http:

GET {{testUrl}}

=> Error message: "Cannot convert undefined or null to object"
error

When selecting "emptyEnvironment", Shared variables are accessible.

Conclusion:
This breaks the following statement when selecting the following: "No environment (You Can Still Use Variables Defined In $shared Environment)"

@atrakaz atrakaz changed the title Shared variables are no longer accessible when using "No Environment". Shared variables are no longer accessible when selecting "No Environment" after update Sep 19, 2019
@Huachao Huachao added the bug label Sep 19, 2019
@Huachao
Copy link
Owner

Huachao commented Sep 19, 2019

@atrakaz nice catch, I have fixed the issue and will be published in next release 😄

@Huachao Huachao closed this as completed Sep 19, 2019
@jezikk
Copy link

jezikk commented Sep 20, 2019

@Huachao When this bugfix will be published to the production please? I started VSCode today and the error message is still shown. Shared environments are not available in my project.

@Huachao
Copy link
Owner

Huachao commented Sep 20, 2019

@jezikk version 0.22.1 is not totally ready, I am still working on some other features, and after that the 0.22.1 will be published

@jezikk
Copy link

jezikk commented Sep 20, 2019

It's weird, but I already have version 0.22.1 installed.

image

@Huachao
Copy link
Owner

Huachao commented Sep 20, 2019

@jezikk sorry the upcoming release version should be 0.22.2

@Huachao
Copy link
Owner

Huachao commented Sep 25, 2019

@jezikk @atrakaz you can try the latest version 0.22.2 to verify it.

@jezikk
Copy link

jezikk commented Sep 25, 2019

It's oka now. Thanks!

@atrakaz
Copy link
Author

atrakaz commented Oct 16, 2019

It works. Thanks!

@cedx
Copy link

cedx commented May 8, 2020

This issue is still here with VSCode 1.45.0 (Windows 10 x64) and REST Client 0.23.2.

@Huachao
Copy link
Owner

Huachao commented May 8, 2020

@cedx I can't repro your case, could you please double-check the defined shared environment variables in your settings and the referenced variable name in your .http file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants