-1

A couple of days ago, I ran a collection of two requests in Postman.

I was using an environment variable created in the first request which was then used in the second request.

I ran the two requests manually in the primary application interface of Postman, one by one. The responses were as expected and there were no errors. But when I tried running the whole collection in one go from the Postman Collection Runner interface, the second request gave me an error.

I checked and double-checked that I was running the right collection. I closed and reopened the Collection Runner window. Also, in the Collection Runner window I tried switching to some other collection, and then switch back to the collection of interest. As I remember it, I even exported, deleted, and then imported the collection again. None of these actions would make the error go away.

One thing I noticed was that - when running in the Postman Collection Runner - the first request would create an environment variable with a stale name, that is with a name I had used previously for the same environment variable. However, when running the first request manually (not in the Collection Runner window), the environment variable was created under its new correct name.

I cannot reproduce this behavior, and therefore I don't expect to see a genuine solution to the issue. But a workaround would be much appreciated.

Henke
  • 4,445
  • 3
  • 31
  • 44
  • Without more context about the Collection itself and actually seeing what is happening, it's always going to be tough to provide an answer to this type of question. Reading a lot of text that describes the problem is never going to be the same as using images to show the problem. It could have been a number of things that might have been the issue. Without seeing the state of the UI at that time - It's all guesswork. – Danny Dainton Jan 26 '21 at 15:43
  • > Without more context about the Collection itself and actually seeing what is happening, it's always going to be tough to provide an answer to this type of question. * | * Agreed. Unfortunately, I have not much of an idea how to reproduce the issue. Although the collection is not a secret, I don't think providing it would be of much help for a solution. And for the time being, I am quite happy with the "solution" of deleting all requests in the history. I still wanted to write/publish this as a _Q&A_ for documentation purposes. - I might run into the same problem at some point in the future. – Henke Jan 26 '21 at 15:54
  • Providing as much detail to the problem is super important when you're asking people, who are not sitting in front of your machine and seeing what you can see. It paints a broader picture of the issue for others to see. You shouldn't ever need to delete the history in order for the Collection runner to work correctly, so there is likely something else going on. The Request view and changes made there won't reflect in the Runner unless those are saved first. It could be an older Collection you're running but you would see that on the individual requests. etc. – Danny Dainton Jan 26 '21 at 15:59
  • In case you are **_really_** interested, I just uploaded (a later version of) the collection at http://schulze.000webhostapp.com/postman/pmCollectionRunner/Artist-mashup.pm_coll.json. If you want the tests to pass, you will have to replace the _current value_ of the collection variable `MBID` with a valid identifier, for example `5b11f4ce-a62d-471e-81fc-a69a8278c7da`. But there is nothing to find here. I just tried running the requests, and there are no errors. - Not in the Postman primary interface / nor in the Postman Collection Runner window. It works fine in both cases. – Henke Jan 26 '21 at 16:23
  • DISCLAIMER. I do not advise _anyone_ to waste their time on this issue. It is not worth it. At some point in the future someone _might_ run into the same issue - and then hopefully be helped by deleting the entire request history. Until that happens (_if_ it ever happens), I suggest going back to sleep. :-) – Henke Jan 26 '21 at 16:26
  • There shouldn't be a case where they run into it and have to resort to clearing the request history, that isn't a solution. :D Raise an issue on out GH Issue Tracker (https://github.com/postmanlabs/postman-app-support/issues) so we can better understand the problem and fix the thing that is broken. I suspect something else was the issue here and now that you can't replicate that, we will never know. :D – Danny Dainton Jan 26 '21 at 16:39
  • > now that you can't replicate that, we will never know. * | * Exactly. – Henke Jan 26 '21 at 16:52
  • At no point did you mention _what_ the error was that you saw. That would be super helpful next time – Danny Dainton Jan 26 '21 at 18:31
  • > At no point did you mention _what_ the error was that you saw. That would be super helpful * | * | * You are right. The error in the console was _"TypeError: Cannot read property 'Q11649' of undefined"_. And there is nothing strange with this error - it follows naturally because the environment variable `{{WikidataId}}` of http://schulze.000webhostapp.com/postman/pmCollectionRunner/Artist-mashup.pm_coll.json did not even exist. The strange thing is why the Collection Runner kept running a stale request which was no longer in my collection. (!) – Henke Jan 27 '21 at 10:02
  • Not really strange - An older run from the run list could have contained an older request. All changes made in the Request Builder, need to be saved before the runner knows anything about them. It might look great from the Request Builder side but would fail in the Runner. As I said, lots of things in your own setup could have caused your issue, I honestly don't believe that the single act of clearing the Request History, was the one thing that actually solved the probelm. – Danny Dainton Jan 27 '21 at 11:15
  • 1
    It wasn't me but users are free to downvote if they feel like the question doesn't meet certain criteria or isn't helpful - They don't really need to return to the scene of the crime and explain themselves. It happens, it will continue to happen the more you use the platform. – Danny Dainton Apr 28 '21 at 15:39
  • Yeah, I know you are right, and it's no big deal. I just thought it wouldn't hurt if I point out that I am willing to improve the post, if possible. – Henke Apr 28 '21 at 16:11
  • If it's someone 'passing by' and not part of the conversation, the likelihood is that they would never see your comment. I got notified because I'm in the comment thread. :D – Danny Dainton Apr 28 '21 at 16:53

1 Answers1

0

In vain I had tried just about anything I could think of. Then I found a post at the Postman community on How to remove some or all requests from the history.

See the second post of the link ( = first answer ). It says:
"There is also a Clear All selection at the top of the History section if you want to remove everything."

In the Postman primary interface, just click History > Ellipsis (...) > Clear all.

Voilà! - No error when running the collection in the Collection Runner window.


For navigation help, see the images below.

In the left pane, click on History.

Click the ellipsis (...) and then on Clear all.

Henke
  • 4,445
  • 3
  • 31
  • 44
  • This didn't work for me. I re-installed [ARC (Advanced Rest Client)](https://install.advancedrestclient.com/install) instead. I'm not certain if it has a similar issue, but I couldn't find one. – Dave F May 28 '21 at 14:15
  • Interesting. I have never tried [Advanced REST Client](https://advancedrestclient.com), so I have no input there. (I did not even know about its existence, but now I do! :-) – Henke May 28 '21 at 14:37