YAML Pipeline – An error occurred

The other day I came across a really generic YAML pipeline error, that didn’t give me any hints in what was wrong. Luckily I learned there is an easy way to get a more detailed error description.

First of all, the error I got is the following:

An error occured while loading the YAML build pipeline. Object reference not set to an instance of an object.

As you can see, a super generic error, that doesn’t really give me any hints about what to fix, except that an object reference is not set to an instance of an object. Well, good luck with that if you have created yourself a complex deployment pipeline.

But luckily there is a way to get a bit more details about what is wrong, by doing to following:

  • On the pipeline details page, where you also saw the error mentioned above, click on Run new in the right corner.
  • You will get a menu called “Run pipeline”.
  • Click on Stages to run.
  • And there on the “Stages to run” view, you will find a more detailed error description, including the file with a line and col number where it occurred.

Hope this saves you some time digging through your code to find the error.

Eén reactie

  1. I was fighting this error message all morning and this post helped so much! I was able to get the actual line number and fix the issue. Thank you!!!

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Time limit is exhausted. Please reload CAPTCHA.