ArchGPT / insomnium

Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia
MIT License
3.33k stars 125 forks source link

Environment Overrides not saving #55

Open elrac opened 9 months ago

elrac commented 9 months ago

Expected Behavior

I expect that when I make a change to the Environment Overrides that the changes are saved when the close button is clicked.

Actual Behavior

A few things are happening that seem related.

  1. When I create an Environment Override that contains a tag it will not save when the Overrides window is closed. I set up a Header tag that references the Date response header in a call to google.com image and when I close the window and open it again it becomes image

  2. When I create a new regular text Environment Override then close the window and re-open it, the override disappears. image image But this will re-appear if it is used or if I change to another project and back

Reproduction Steps

  1. Create a folder and in that folder create two GET HTTP requests called a and b, each for google.com and click Send in a
  2. In the menu for the folder select Environment
  3. Create a new variable called "test":"" then right click on the "" and select Response -> Header. Click on the red text that appears.
  4. In the Edit Tag window set the request to a and Header Name = Date. The live preview should show the date.
  5. Hit Done and observe the correct override appears in the window
  6. Hit Close and then re-open the Environment window
  7. Sometimes the variable will be gone at this point, but sometimes it will still be there. If it is still there then click on the tag and change the Request to GET b, the live preview will change to an error.
  8. Hit done and observe that the tag is in an error state.
  9. Close and re-open the Environment Overrides panel and observe that the variable is not in an error state anymore because it changed back to GET a in the tag.

Is there an existing issue for this?

Additional Information

This is an issue that has existed in one state or another in the last few versions of Insomnia.

Often can be worked around by copying the text in the Overrides panel when it is correct and pasting it back in when it errors. Also switching projects sometimes reverts to the correct variable.

The part where it doesn't save regular text variable is really inconsistent.

Insomnium Version

Insomnium 0.2.1-b

What operating system are you using?

Windows

Operating System Version

Windows 10

Installation method

Portable exe from https://github.com/ArchGPT/insomnium/releases

Last Known Working Insomnium version

No response

archywillhe commented 9 months ago

thanks for reporting!

The entire enviroment module (i.e. inherited from forking Insomnia) appears to be quite buggy in general. I'll be rewriting the enviroment module for Insomium v0.3.

Adding this to the backlog for v0.3 now.

Jozefwl commented 7 months ago

I have the same issue, if i click somewhere on the "page" after making the overrides in the environment configuration it saves them. If i don't do this and reopen the environment it doesn't save it.

The issue i am having is it doesn't seem to save it with the export - doesn't save which request it should be getting the response from meaning: when i import a collection it doesn't seem to "remember" the request it should be getting the response from.

Have a nice day.