Closed Koshak118 closed 6 years ago
Update: Unchecking of "Use same source branch as triggered build" didn't help, it ends up with the same error
Hi @Koshak118
it seems that the tasks fail as soon as we want to fetch something from the TFS REST API. If it worked fine and suddenly stops I would say something on the TFS has changed, maybe someone disabled Basic Authentication for some reason?
To verify you could try to change it quickly to use the OAuth Token and try with that configuration.
Hi @Koshak118 did you make any progress on this issue?
Hi @huserben
Nope, didn't have a time to deal with that yet too much, but from the source code it looks like there are 2 places where you check the "count" parameter of the "result" variable - after dealing with authentication and after dealing with artifacts.
So it seems that "result" is null after the authentication error, so checking it before checking "result.count >0" would help to give a more comprehensive error
Regardless, could please help with where the Authentication methods are configured in the VSTS?
Hi @Koshak118 thanks for the input, that's true, I will have a look at making a bit more meaningful message if I see that the authentication failed.
You mean how to configure it? If you select the Task you can expand the "Authentication" part and configure it in more detail. See as well the description provided here: https://marketplace.visualstudio.com/items?itemName=benjhuser.tfs-extensions-build-tasks
Hi @huserben
I mean in the docs of your extension you write "If you have enabled Basic Authentication you can as well use this sort of authentication by providing the username and password".
So that "Basic Authentication" is enabled anywhere in VSTS? I mean since this authentication suddenly stopped working without any change in your extension, it might some external change which happened. Any ideas what was that?
Hi @Koshak118 yes, you can relate to this article where it is explained how to get this working: https://binary-stuff.com/post/how-to-enable-alternate-credentials-in-visual-studio-online-vso
However as an alternate solution it should be rather simple to switch to the OAuth Token Authentication if you just want to verify if it is in general still working.
Hi @Koshak118 yes, you can relate to this article where it is explained how to get this working: https://binary-stuff.com/post/how-to-enable-alternate-credentials-in-visual-studio-online-vso
However as an alternate solution it should be rather simple to switch to the OAuth Token Authentication if you just want to verify if it is in general still working.
Hi @huserben
I managed to get it working with Personal Tokens So unless you don't want to keep this issue to fix the null "result" variable you can close it
Kudos again to the great extension
Hi
cool, very good :-) Did you by any chance figure out why the Basic Auth suddenly stop working (just curious if something changed automatically in VSTS or something...)
I'll keep it open, it's a good reminder that I have something open to be fixed in a next version. Especially as right now I don't have too much time and as this is not the most pressing thing it might take some time till I will add it.
And thanks for the nice words and especially for reporting issues here and helping making the extension better.
With my next update of the Task (sheduled somewhen this week depending on how the testing goes) I will add this improvement in the logging and output a proper message including some "common pitfalls" for the different authentication methods:
Edit: Just updated the Task to version 2.2 which includes the above mentioned change.
Hi Benjamin
First of all thanks for doing a great work with you extension which saves a lot of work for many ppl which use VSTS.
I've been using your extension for a couple of month and today the 1st version of it stopped worked all of a sudden with an authentication error (it uses Basic Authentication):
After I switched it to the 2.0 version the task ends up with "Cannot read property 'count' of undefined" error. The whole output is as the following:
Can you please advise?