Internal Server Error, cannot find yaml

I’m having trouble getting any repos to work in our Drone sandbox environment. I’ve gone over every suggestion from the “cannot find yaml” FAQ but still can’t seem to get this to work at all. I can activate repos just fine and I see the webhooks created in GitHub but they fail with 500 errors.

This is what I see in the server log, any ideas?

{
“commit”: “98af9a8072e33e862f7540d4106451e965418a2d”,
“event”: “push”,
“level”: “debug”,
“msg”: “webhook parsed”,
“name”: “cloud-eng-lambdas”,
“namespace”: “********”,
“time”: “2021-06-30T22:06:14Z”
}
{
“commit”: “98af9a8072e33e862f7540d4106451e965418a2d”,
“event”: “push”,
“level”: “debug”,
“msg”: “trigger: received”,
“ref”: “refs/heads/CE-4199/drone”,
“repo”: “*",
“time”: “2021-06-30T22:06:14Z”
}
{
“commit”: “98af9a8072e33e862f7540d4106451e965418a2d”,
“error”: “Internal Server Error”,
“event”: “push”,
“level”: “warning”,
“msg”: “trigger: cannot find yaml”,
“ref”: “refs/heads/CE-4199/drone”,
“repo”: "
”,
“time”: “2021-06-30T22:06:15Z”
}

@ClaytonOlley ,

Could you please share the configuration file name you have configured on repo level and does that exact same file name exist in your repo and also part for “ref”: “refs/heads/CE-4199/drone” commit?

Regards,
Harness support

Default name of .drone.yml in the root of the repo. This is working in our production Drone system.

Not sure how to answer the second part of your question about the ref.

This below thread outlines all known reasons why fetching a yaml might fail
https://discourse.drone.io/t/error-cannot-find-yaml/9105

I also noticed that you are receiving an Internal Server Error from GitHub which seems odd. An internal server error generally indicates an internal problem with GitHub itself. You could try hitting the GitHub API directly to see if you can access the yaml file for your commit sha.

curl "https://api.github.com/repos/$org/$repo/contents/.drone.yml?ref=98af9a8072e33e862f7540d4106451e965418a2d"

Thanks, I went through that doc several times before posting to no avail.

However, we have fixed it. Turns out we had an extension malfunctioning. It was using a bad token to github.

We had this logging to a separate area and I didn’t see it in our other drone logs.

The error from the extension was:

‘{“message”:“Bad credentials”,“documentation_url”:“GitHub REST API - GitHub Docs”}’

Thanks, and apologies for wasting your time!