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

GitHub Actions Runner: 'Object reference not set to an instance of an object' Error" #3393

Closed
akaviyaPRH opened this issue Jul 17, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@akaviyaPRH
Copy link

Describe the bug
The GitHub Actions runner application repeatedly encounters an error stating "An error occurred: Object reference not set to an instance of an object." This issue persists even after restarting the service. There are no clear indicators in the system logs that point to the cause of this error. This is the first time this error has been encountered.

To Reproduce
Steps to reproduce the behavior:

  1. Start the GitHub Actions runner service on the machine.
  2. Observe the runner's log output.
  3. The error "An error occurred: Object reference not set to an instance of an object" appears shortly after the service starts.

Expected behavior
The GitHub Actions runner should start without encountering a null reference exception and be ready to execute workflows without errors.

Runner Version and Platform

Version of your runner: 2.317.0

OS of the machine running the runner: Linux (ubuntu)

What's not working?

The runner fails to operate normally due to a recurring error message: "An error occurred: Object reference not set to an instance of an object." This prevents the runner from executing any workflows.

● actions.runner.puk.UKLENOAPIPI001.service - GitHub Actions Runner (puk.UKLENOAPIPI001)
Loaded: loaded (/etc/systemd/system/actions.runner.puk.UKLENOAPIPI001.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-07-17 08:48:58 UTC; 13min ago
Main PID: 2129042 (runsvc.sh)
Tasks: 8 (limit: 19044)
Memory: 8.7M
CPU: 1min 39.466s
CGroup: /system.slice/actions.runner.puk.UKLENOAPIPI001.service
├─2129042 /bin/bash /home/infraeno/actions-runner/runsvc.sh
└─2129044 ./externals/node16/bin/node ./bin/RunnerService.js

Jul 17 08:56:09 UKLENOAPIPI001 runsvc.sh[2129044]: Runner listener exited with error code 2
Jul 17 08:56:09 UKLENOAPIPI001 runsvc.sh[2129044]: Runner listener exit with retryable error, re-launch runner in 5 seconds.
Jul 17 08:56:14 UKLENOAPIPI001 runsvc.sh[2129044]: Starting Runner listener with startup type: service
Jul 17 08:56:14 UKLENOAPIPI001 runsvc.sh[2129044]: Started listener process, pid: 2130576
Jul 17 08:56:15 UKLENOAPIPI001 runsvc.sh[2129044]: √ Connected to GitHub
Jul 17 08:56:16 UKLENOAPIPI001 runsvc.sh[2129044]: Current runner version: '2.317.0'
Jul 17 08:56:16 UKLENOAPIPI001 runsvc.sh[2129044]: 2024-07-17 08:56:16Z: Listening for Jobs
Jul 17 09:02:35 UKLENOAPIPI001 runsvc.sh[2129044]: An error occurred: Object reference not set to an instance of an object.
Jul 17 09:02:35 UKLENOAPIPI001 runsvc.sh[2129044]: Runner listener exited with error code 2
Jul 17 09:02:35 UKLENOAPIPI001 runsvc.sh[2129044]: Runner listener exit with retryable error, re-launch runner in 5 seconds.

Job Log Output

Not applicable, as the error occurs at the service startup, before any job execution.

Runner and Worker's Diagnostic Logs

Diagnostic logs from the _diag folder might provide more insight, but specific log entries related to the error have not been provided. Users experiencing this issue are encouraged to check their runner's _diag folder for logs prefixed with Runner_ and Worker_ for more details and include relevant excerpts when reporting the issue.

@akaviyaPRH akaviyaPRH added the bug Something isn't working label Jul 17, 2024
@s-bernhardt
Copy link

same issues here, _diag files show problems like:

[2024-07-17 13:16:52Z INFO GitHubActionsService] AAD Correlation ID for this token request: Unknown
[2024-07-17 13:16:53Z INFO JobDispatcher] Shutting down JobDispatcher. Make sure all WorkerDispatcher has finished.
[2024-07-17 13:16:53Z INFO Runner] Deleting Runner Session...
[2024-07-17 13:16:53Z ERR  Terminal] WRITE ERROR: An error occurred: Object reference not set to an instance of an object.
[2024-07-17 13:16:53Z ERR  Listener] System.NullReferenceException: Object reference not set to an instance of an object.
   at GitHub.Runner.Listener.JobDispatcher.Run(AgentJobRequestMessage jobRequestMessage, Boolean runOnce)
   at GitHub.Runner.Listener.Runner.RunAsync(RunnerSettings settings, Boolean runOnce)
   at GitHub.Runner.Listener.Runner.RunAsync(RunnerSettings settings, Boolean runOnce)
   at GitHub.Runner.Listener.Runner.RunAsync(RunnerSettings settings, Boolean runOnce)
   at GitHub.Runner.Listener.Runner.ExecuteCommand(CommandSettings command)
   at GitHub.Runner.Listener.Program.MainAsync(IHostContext context, String[] args)

@TingluoHuang
Copy link
Member

Can someone send the full runner diag log to me? tingluohuang@github.com
Thanks a lot. 🙇

@MarkusZoppelt
Copy link

This happened to us as well, same day as we migrated our GitHub Organization to a GitHub Enterprise. Maybe this is what caused the issue for you too?

Unfortunately, the only solution we found that worked was to completely uninstall / remove the runners and re-add them (v2.317.0)

@s-bernhardt
Copy link

Other runners of my other repos are working fine. and they to the same job and sit on the same self-hosted runner instance

@TingluoHuang
Copy link
Member

We rollback a feature flag that might cause this.
The impact should be mitigated, we will continue investigate the root cause.
Thanks, and sorry for the trouble.

@s-bernhardt
Copy link

thanks, runners succeeded approx. 46min ago.

@davidsiu
Copy link

We are having this same issue too and it is still happening. If it helps, we also just upgraded to Enterprise last night.

@s-bernhardt
Copy link

The failed action-runner was recreated by my colleague. This solved it most probably.

@TingluoHuang
Copy link
Member

@davidsiu can you send me your runner diag log at tingluohuang@github.com? 🙇

@TingluoHuang
Copy link
Member

@davidsiu sorry for the trouble, we applied a mitigation which should unblock your runner.
we are working on a fix to hope to get it deployed within few hours. 🙇

@lokesh755
Copy link
Contributor

@davidsiu We have rolled out the fix.. Please let's know if you are still blocked on this issue.

@davidsiu
Copy link

Yes! Thank you @TingluoHuang and @lokesh755 ! Your fix worked for me. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants