Interestingly, I’ve found that if I run 2 iterations, then 3 iterations, then the whole set, I can get through a successful run.
This has been manageable for now to get a set of tests written and tested, but now I’m looking to execute this set via command line using newman as part of our daily build process and the error continues, and it’s not obvious how to implement the same work around via command line.
Here is a screen cap of a successful run when using the Run 2 iterations, then Run 3 iterations, then Run the whole set work around. NTLM settings are unchanged from the 401 execution, the script is identical, etc:
@rustoleum76 There might be some sort of rate limiting at play. Can you try adding a delay of “2000” in the runner UI? (This will add a delay of 2 seconds between each request)
learning more… the above error is a red herring. The json parse problem comes because an invalid response was received due to the previously determined 401 Unauthorized.
The Response:
401 - Unauthorized: Access is denied due to invalid credentials.
Server Error
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.
And looking at the server that I’m calling to, I can see the requests and response code:
The first two succeed with status 200 (and also w/ credentials being passed). Subsequent requests return 401 and I can see no credentials being passed.
So, it seems like the Runner process is not sending the NTLM credentials correctly at each iteration, except when I do the weird workaround where I run 2, then run 3 and then run the test.
Incidentally, when I do that, I can see each succeeding request does indeed have user details specified:
Hi @abhijitkane1, i have the same issue. The first 2 tests are passing and the remaining I am getting the error “Unauthorized: Access is denied due to invalid credentials”
It’s hard to tell without knowing more about your test scripts.
If you check the HTTP response code before trying to parse your response body you certainly can avoid the JSON error (it’s not really a red herring after all ;)).
If you log some information in your tests you probably can see what’s going on with your iterations and where/why it starts to fail.
Dear POSTMAN team. Please responce on this topic. This problem is alive since 2018 till NOW (04.2020). Thanks this issue you men lose your money simply why firms dont want purchase PRO version cause the COLLECTION RUNNER simply can not be applied for couple of real projects.
I have the same issue. For the first 2 iterations, there is no issue. The subsequent iterations giving the Unauthorization error. I am using NTLM authentication and I pass Username and Password. For the first 2 iterations, the NTLM auth key is unique , but on the next iterations, the auth key is similar to the 2nd iteration. i.e. somehow postman is keeping the auth key in memory and applying the same from 3rd iteration on words rather generation new key.
Hello,
I’d like to verify that this is still an issue in the most recent version of Postman. I have a collection of services that use Windows authentication and if I select any set of 3 or more, the first two will execute properly, returning 200’s, and the rest will 401. Setting delays between the service calls of up to 5000 ms has no positive effect.
Has there been a solution or workaround identified for this?
Hey guys! I encountered the same error. I use NTLM authentification. I checked “Yes, disable retrying the request” in the “Authorization” tab, saved, ran the collection then disabled the option again, saved and ran the collection. It fixed the issue.