Github action runner error WRITE ERROR: Object reference not set to an instance of an object

1.6k views Asked by At

During Github action self-runner configuration on Ubuntu 18 getting Error Object reference not set to an instance of an object.

I used the following commands to configure it

mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.288.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.288.1/actions-runner-linux-x64-2.288.1.tar.gz
echo "**************  actions-runner-linux-x64-2.288.1.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-x64-2.288.1.tar.gz
./config.sh --url https://github.com/irfan/test --token ***********

Logs are

[2022-04-10 19:51:52Z INFO CommandSettings] Remove token from Arg dictionary.
[2022-04-10 19:51:53Z ERR  Runner] System.NullReferenceException: Object reference not set to an instance of an object.
at GitHub.Runner.Listener.Configuration.ConfigurationManager.ConfigureAsync(CommandSettings command) at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command) 
[2022-04-10 19:51:53Z ERR  Terminal] WRITE ERROR: Object reference not set to an instance of an object.
[2022-04-10 19:51:53Z INFO Listener] Runner execution has finished with return code 1
1

There are 1 answers

1
junktrunk On

Try modifying your repository's settings to set up a new self-hosted runner. This generates a new token that you can use when running your config.sh, and for some reason that resolves this error. I didn't think the tokens were only valid for a certain amount of time but that may be what's going on. Or given that we're both having this problem in the last day, it could be a temporary github problem, but this worked for me.