This seems like a really strange error and I have to admit, it stumped me for months. I am running an automated job once a week and the result is sent to me via e-mail. A great way to start the week. This started failing and I tried to solve it but failed again and again. I ran the job manually instead.
Until this morning
The pipeline
The pipeline is really simple.
- Get values from a KeyVault.
- Execute a PowerShell script using values.
- Send an output file as an email attachment.
The problem
My pipeline just failed with the message: “Job is pending”.
Not much information to go on.
A quick google search did not really turn up anything useful for my case.
The solution
Turns out that there was an authentication error in a Library.
The pipeline uses a Library to get a key to authenticate to the send e-mail service. This Library uses a service connection to authenticate. This service connection was invalid and the Library could not be populated at runtime.
I updated the service connection and everything just worked.