insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Cannot select other request for Response Body Attribute macro

Open orbatec opened this issue 2 years ago • 9 comments

Expected Behavior

  1. I execute a login request called "Login Request 456" which results in a JSON response containing an object with a "token" property.
  2. I select an existing API call "API Request 123" on which an Authorization Bearer header is configured that uses a Response Body Attribute of a login request , let's call it "Login Request 123"
  3. I click on the "Response Body Attribute" placeholder and select "Login Request 456" (from step 1) as new source request
  4. I verify that the value in the preview pane is the one I expect (= result of $.token on "Login Request 456")
  5. I execute the request "API Request 123"
  6. I want to see the response for the user represented by the token passed as Authorization Bearer header

Actual Behavior

  1. I execute a login request called "Login Request 456" which results in a JSON response containing an object with a "token" property.
  2. I select an existing API call "API Request 123" on which an Authorization Bearer header is configured that uses a Response Body Attribute of a login request , let's call it "Login Request 123"
  3. I click on the "Response Body Attribute" placeholder and select "Login Request 456" (from step 1) as new source request
  4. I verify that the value in the preview pane is the one I expect (= result of $.token on "Login Request 456")
  5. I click "Done"
  6. I click the "Response Body Attribute" again to validate that I indeed see "Login Request 456", which I do, and press Done
  7. I execute the request "API Request 123"
  8. The request fails with a Forbidden and when I click again on the "Response Body Attribute" placeholder, I again see "Login Request 123" instead of "Login Request 456" to which I had changed the value.

When I issue the API call using another tool with the token from Login Request 456 copy/pasted manually, the call works, so there is nothing wrong with the value....also, even if the value would not be okay, Insomnia should not singlehandedly change values that I have set!

Reproduction Steps

See above....

Is there an existing issue for this?

Additional Information

Version: Insomnia 9.3.1 Build date: 6/28/2024 OS: Darwin arm64 23.5.0 Electron: 30.0.9 Node: 20.11.1 Node ABI: 123 V8: 12.4.254.20-electron.0 Architecture: arm64

Insomnia Version

9.3.1

What operating system are you using?

Windows

Operating System Version

Darwin arm64 23.5.0

Installation method

installation package

Last Known Working Insomnia version

9.2.0

orbatec avatar Jul 01 '24 10:07 orbatec

same issue with "Response => Body Attribute" to get Bearer token since 9.3.1

lmorganl avatar Jul 01 '24 15:07 lmorganl

Prioritizing for 9.3.2 this week, if we can fix it in time.

subnetmarco avatar Jul 02 '24 09:07 subnetmarco

Insomnia v9.3.2 has been released fixing this issue.

subnetmarco avatar Jul 04 '24 15:07 subnetmarco

I have updated the version to 9.3.2 but it seems the issue is still there (Mac M1) Attaching the video.

https://github.com/Kong/insomnia/assets/5215834/97bf5cf9-cc19-4f4b-bc61-d780a32ce70b

ypeskov avatar Jul 04 '24 15:07 ypeskov

@ypeskov let me ping the team to look at this again, thanks for the video.

subnetmarco avatar Jul 04 '24 16:07 subnetmarco

same for me, not fixed at all !

lmorganl avatar Jul 04 '24 18:07 lmorganl

Same for me on Windows 10 insomnia 9.3.2

alexflex25 avatar Jul 05 '24 07:07 alexflex25

Thanks, we are looking at this again first thing next week.

subnetmarco avatar Jul 06 '24 11:07 subnetmarco

Thanks for the feedback everyone. This is now fixed in the latest beta and will be released in the coming patch version!

gatzjames avatar Jul 22 '24 08:07 gatzjames