tibdex/github-app-token

generate-token error with node-20

Opened this issue · 1 comments

This is after upgrading one repo out of many using the same workflow due to Github deprecation warning annotations about upgrading checkout/artifact actions.

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, peter-evans/create-pull-request@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

The many are still working but the one has the above error using checkoutv4:

Error: Could not create installation access token.
    at createInstallationAccessToken (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:86267)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87518
    at async run (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:88811)
    at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87468 {
  [cause]: Error: Could not retrieve installation.
      at retrieveInstallationId (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87232)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async createInstallationAccessToken (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:86069)
      ... 2 lines matching cause stack trace ...
      at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87468 {
    [cause]: RequestError [HttpError]: Not Found
        at file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:1:64431
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async retrieveInstallationId (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87014)
        at async createInstallationAccessToken (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:86069)
        at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87518
        at async run (file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:88811)
        at async file:///home/runner/work/_actions/tibdex/github-app-token/v2/dist/main/index.js:9:87468 {
      status: 404,
      response: [Object],
      request: [Object]

I've got a large number of repos using the same reusable workflow with this action in it (and checkout v4); currently I'm only seeing a single repo failing with this error.

It looks like we messed up some automation and we were actually seeing this issue for all Dependabot PRs in a specific organisation.