Collection runner Unresolved Environment variable


I have multiple request which I want to run sequentially in collection runner.
The first request sets the request body for the next request as an Environment variable.
In the second request, the request body is the environment variable which we set in the previous request.
When I run the the two request individually, one after another, they work fine, but in Collection runner, the second request is unable to resolve the Environment variable,

error: {…}
name: "badRequest"
message: "Request body has invalid format."

and I am getting the JSON response as undefined for the second request due to this.
How can I get them working in collection runner?

Thanks in advance.

@bbahadur First you should select the correct environment and then click collection run please :slightly_smiling_face:

Hey @bpricilla !

Thank you for the response,
I have made sure that the correct environment is set before running the collection.

After spending some time on it, I figured out the error, In the second request, I had done some alterations in the pre-request tab and used set method to update the Environment variable, which caused this error, after removing it, the runner works fine.

Thank you!