Env values can't be updated on the desktop application

I’m experiencing the issue on the desktop windows application(3 or more last version of postman app). The issue can’t be reproduced in the browser client

I can’t set or update the environment value. I trigger the request and env. value is still the same after a successful response. In the console, I can display the value form the response body. Seems all works fine but not with the env values in order to update that values.


Hey @rocket321go :wave:

Can you paste the code snippet and example response and not an image please?

Also, why do you have the pm.environment.set() statement at the top?

Is this script in any other part of the request? Are there any unsaved changes (I can’t see the list of open tabs in the image)? Are you running these individually or part of the Collection Runner?

it is a single run. In my image, you can see the request body and the response. All changes have been saved.
Where should I put this statement? do you want to suggest placing it at the bottom? (nothing different if I do like this)

You have cut off the request tabs from the image so that could either be in a saved or unsaved state, we have no idea of knowing.

I was wondering why you have it there and then a try/catch block setting it again?

If you delete the variable completely and run the request, what is stored?

1 Like

New steps: I closed all the tabs, and deleted a context token variable from env. then I run the request. and I got the contextToken with the expected value. but only when I do it manually. If I do run folder. The contextToken value has null as a value which leads to failed test results for those requests where I re-use contextToken parameter

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.