Since latest update (11.61.9) variables are not saved anymore, they are sometimes but in most cases they are not.
I can save some variables in post-request script in to collection variables, i can also verify that its saved by checking with console.log(pm.collectionVariables.get(‘someVariableName’)) at the very end of post-request script, but then after request fully ends this variable is just wiped out, i can also verify it by adding console.log(pm.collectionVariables.get(‘someVariableName’)) at the top in pre-request script of next request and console output will be empty.
Example:
Object is saved to collection variables at the end of post-request script (30)
Then at the start of pre-request script of next request same variable is empty.
Nothing is overwriting/resetting anywhere.
Sometimes variable is saved correctly, like after sending request 20+ times, one time it will randomly save correctly.
It was working for past 2 years+ but this week is not working anymore with no code changes.
Outside of this issue, I would recommend using the package library for any reusable utils that you might need to, they method you’re using is a workaround that was using before this feature was introduced.
Do you have a recording of this happening or anything so that we can see what’s happening on your side? As it’s an intermittent issue for you, it’s difficult for us to reproduce that on our side.
Its still working fine in postman Canary (Version 11.2.14-canary01, UI Version 11.2.14-ui-canary240621-0734) on same collections as in Postman app and Postman Web
I cant show collection publicly since its a work collection, is there any option to message you private with video comparison from Postman and Postman Canary ?