Old cookie sent in requests if any code is placed in the afterResponse script
Expected Behavior
If I have a code in the afterResponse script (say to set an environment variable), after the request, any cookies saved by insomnia should be present in further requests.
Actual Behavior
Once there is a code in the afterResponse script (even if it is commented out), cookie session breaks. New cookies gotten in response does not override the old cookies saved, even though insomnia tries to save the new cookies.
Reproduction Steps
- Build an endpoint that returns a cookie (random string) in the header.
- Make a request to the end point and observe the cookie returned.
- Make a request to the same endpoint again and observe that the cookie previously returned was sent in the request header.
- Write anything in the afterResponse script (you can comment it out if you want).
- Make a request to the same endpoint and observe the new cookie returned
- Make another request to the same endpoint and observe that the cookie sent in the request header is the old one (not the latest one returned)
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
You can do a simple express project that returns a cookie
Insomnia Version
9.3.3
What operating system are you using?
macOS
Operating System Version
Sonoma 14.5
Installation method
Download from Insomnia website
Last Known Working Insomnia version
No response
duplicate of #7808, it should have been fixed in the latest v10.0.
Hello @specialobyno please try the latest version (10.0.0) and thanks for your detailed feedback.