[Bug] Having any Response tag with trigger behaviour "Always" results in infinite requests
- Insomnia Version: 6.5.1
- Operating System: Ubuntu 19.04 (Disco Dingo)
Details
If any response tag in the workspace is set to always trigger a resend, sending any request (even if it doesn't contain the response tag) will result in Insomnia infinitely sending that request. This prevents the results of a request from being shown, as the timer will just count up indefinitely. The Cancel button also ceases to function, though other parts of the UI continue to respond. To stop the requests, the application has to be closed.
I have attached a screenshot of the dev tools showing the mass requests, and a workspace with a minimal example. You should just be able to send the Get request and observe the timer start counting up indefinitely. (You may need to recreate the response tag in the base environment).
Insomnia Bug Example.zip
👋 Thanks for opening your first issue! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. If you're requesting a feature 🎁, please provide real use cases that would benefit. 👪
To help make this a smooth process, please be sure you have first read the contributing guidelines.
Thanks for the sample workspace. I should be able to fix the issue now that I can reproduce 😄
Ah yes. It seems that the problem comes from:
- Trigger request to be sent
- Environment is rendered, causing the response tag to send the dependency
- Trigger dependent request to be sent
- Environment is rendered, causing the response tag to send the dependency
- Go to step 3
This might be a tricky one to fix...
Added a fix for this here: https://github.com/getinsomnia/insomnia/commit/8adee60c8671291712b8ad33f6bbc1e43c453c16#diff-58635dede9b4e0e443b219d70e735b20R97
Basically, the response tag will now track that it's already sending a request dependency and simply return null if it is. This is the best I could come up with for now and it seems to work pretty well.