thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.59k stars 128 forks source link

cannot import nor export environments #1535

Closed awstlaur closed 2 months ago

awstlaur commented 2 months ago

Describe the bug Cannot import nor export environments

When attempting to import an environment, I get the error "Error while importing environment, please contact support." There is nothing in the Thunder Client output logs.

When attempting to export an environment, I get the error "Failed to Export". There is nothing in the Thunder Client output logs.

To Reproduce Import Global: Save the following as a json file and attempt to import it as a global environment

{
    "client": "Thunder Client",
    "environmentName": "(Global Env)",
    "dateExported": "2024-04-10T04:57:54.728Z",
    "version": "1.0",
    "global": true,
    "variables": [
        {
            "name": "client_id",
            "value": "05e5a3d9-dbb2-476f-98b7-39e46358b61e",
            "secret": true
        },
        {
            "name": "DOMAIN",
            "value": "https://example.com"
        }
    ]
}

Import normal: Save the following as a json file and attempt to import it as a normal environment

{
    "client": "Thunder Client",
    "environmentName": "my env",
    "dateExported": "2024-04-10T04:57:54.728Z",
    "version": "1.0",
    "variables": [
        {
            "name": "client_id",
            "value": "05e5a3d9-dbb2-476f-98b7-39e46358b61e",
            "secret": true
        },
        {
            "name": "DOMAIN",
            "value": "https://example.com"
        }
    ]
}

Export global: Create Global Env in the UI, populate those values, and attempt to export

thunder-client-ui-global-env

Export normal: Create normal env in the UI, populate those values, and attempt to export

I also cannot import/export empty environments

Expected behavior I expect importing environments to populate them into the UI

I expect exporting environments to create json files

Platform:

Are you using the free version/paid version/trial: Free

awstlaur commented 2 months ago

Based on my bisecting, it seems like 2.21.17 is the problem. 2.21.16 works as expected

rangav commented 2 months ago

Thanks for reporting, will fix in the next update.

rangav commented 2 months ago

We have published a new update v2.21.19 to fix this issue.

awstlaur commented 2 months ago

Thank you so much! I can confirm it works