Azure-devops-cli-extension: Queueing a build fails with poor error message

Created on 6 Dec 2017  路  7Comments  路  Source: Azure/azure-devops-cli-extension

I tried queue a build and received this error:

root : 'NoneType' object has no attribute 'message'

That wasn't very helpful, so I added --debug and got something a bit more helpful:

msrest.http_logger : b'{"ClassName":"Microsoft.TeamFoundation.Build.WebApi.BuildRequestValidationFailedException","Messa
ge":"Could not queue the build because there were validation errors or warnings.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-
2146232832,"Source":null,"WatsonBuckets":null,"m_logException":false,"m_reportException":false,"m_errorCode":0,"m_logLevel":"warning","m_eventId":3000,"ValidationResults":[{"result":"error","message":"An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: ."}]}'

Here's the important part I think:

An error occurred while loading the YAML build definition. An object ID must be 40 characters long and only have hex digits. Passed in object ID: .

I don't think there is anything wrong with the YAML - builds from the UI work just fine.

bug

All 7 comments

@lzybkr looks like there are at least two issues here. The first is that this api isn't sending the exception back in the standard way that the service typically does. We will need to update our code to account for that. The second is that the service is returning an exception message that is not very helpful. When you ran your command did you specify a source branch? If not give that a try, and see if the error goes away.

That did help - our default branch is not master, nor do we have such a branch, but specifying the branch worked. Thanks.

partial fix for error message issue in Microsoft/vsts-python-api#27

@lzybkr My recently merged PR here will help you in the future.

Filed two bugs last week on the build team for the service. We will be able to provide a more detailed message, once these bugs are addressed.

Sorry for leaving this so long, it got lost in the holiday shuffle. I've got a PR going through right now that will make the exception message clearer.

This should be fixed now by a combination of the updated cli version 0.1.1, which includes Microsoft/vsts-python-api#27 and updates to the service. This will still be an issue when targeting older on premises TFS Servers that don't have the server side fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

f00-beerd picture f00-beerd  路  3Comments

benc-uk picture benc-uk  路  4Comments

willsmythe picture willsmythe  路  5Comments

s-bauer picture s-bauer  路  6Comments

bergmeister picture bergmeister  路  6Comments