Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queueing a build fails with poor error message #106

Closed
lzybkr opened this issue Dec 6, 2017 · 7 comments
Closed

Queueing a build fails with poor error message #106

lzybkr opened this issue Dec 6, 2017 · 7 comments
Labels

Comments

@lzybkr
Copy link

lzybkr commented Dec 6, 2017

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.

@tedchamb tedchamb added the bug label Dec 6, 2017
@tedchamb tedchamb self-assigned this Dec 6, 2017
@tedchamb
Copy link
Contributor

tedchamb commented Dec 6, 2017

@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.

@lzybkr
Copy link
Author

lzybkr commented Dec 6, 2017

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

@tedchamb
Copy link
Contributor

tedchamb commented Dec 7, 2017

partial fix for error message issue in microsoft/azure-devops-python-api#27

@bergmeister
Copy link
Contributor

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

@tedchamb
Copy link
Contributor

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.

@moswald
Copy link

moswald commented Jan 31, 2018

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.

@tedchamb
Copy link
Contributor

This should be fixed now by a combination of the updated cli version 0.1.1, which includes microsoft/azure-devops-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants