actions / actions/runner

Request: Better failure message when token from Add a Runner page is expired

Open
#4,042 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
The error message printed by https://github.com/actions/runner/blob/f9c4e17fd98db89cd9b1f05f156a9f7a8562522d/src/Runner.Listener/Configuration/ConfigurationManager.cs#L848-L851 should include a hint about refreshing the Add a Runner page to get an updated token

To Reproduce
Steps to reproduce the behavior:

  1. Go to the Add a Runner page in a repo
  2. Wait over an hour to have the token expire
  3. Try to register with the old toke and observe that you get a 404 error that doesn't really explain that the token is expired

What's not working?

--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------

# Authentication

Http response code: NotFound from 'POST https://api.github.com/actions/runner-registration' (Request Id: D444:167475:34B6912:36005D2:68C956CA)
{"message":"Not Found","documentation_url":"https://docs.github.com/rest","status":"404"}
Response status code does not indicate success: 404 (Not Found).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/Runner.Listener/Configuration/ConfigurationManager.cs around lines 848-851 and reproduce registration with a token older than an hour. Update the 404 failure message to explain token expiration and refreshing the Add a Runner page, then verify the registration output communicates the cause.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
cli, devops
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.