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

RequestError [HttpError]: 'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued #102

Open
klutchell opened this issue Nov 10, 2023 · 1 comment

Comments

@klutchell
Copy link

klutchell commented Nov 10, 2023

We often see this issue on macos-12 and macos-13 GitHub hosted runners (but not on Windows or Ubuntu).

Run tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
  with:
    app_id: 291899
    installation_retrieval_mode: id
    installation_retrieval_payload: 34040165
    private_key: ***
    permissions: {
    "administration": "write",
    "contents": "write",
    "metadata": "read",
    "packages": "write",
    "pages": "write",
    "pull_requests": "read"
  }
    github_api_url: https://api.github.com/
    revoke: true
  env:
    NPM_REGISTRY: https://registry.npmjs.org/
    CARGO_REGISTRY: crates.io
Error: Could not create installation access token.
    at createInstallationAccessToken (file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:86267)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:87518
    at async run (file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:88811)
    at async file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:87468 {
  [cause]: RequestError [HttpError]: 'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued
      at file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:1:64431
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async createInstallationAccessToken (file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:86119)
      at async file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:87518
      at async run (file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:88811)
      at async file:///Users/runner/work/_actions/tibdex/github-app-token/3beb63f4bd073e61482598c45c71c1019b59b73a/dist/main/index.js:9:87468 {
    status: 401,
    response: {
      url: 'https://api.github.com/app/installations/34040165/access_tokens',
      status: 401,
      headers: [Object],
      data: [Object]
    },
    request: {
      method: 'POST',
      url: 'https://api.github.com/app/installations/34040165/access_tokens',
      headers: [Object],
      body: '{"permissions":{"administration":"write","contents":"write","metadata":"read","packages":"write","pages":"write","pull_requests":"read"}}',
      request: [Object]
    }
  }
}

Sometimes a retry will work, but it seems pretty random. On every run there's maybe a 50% chance of hitting this failure.

It looks like it might be an issue with the time sync on the GitHub hosted macos runners, but thought I would open an issue here in case there is a known workaround or root cause.

Is there any other information I can provide?

@SiMet
Copy link

SiMet commented Nov 15, 2023

I faced this issue today as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants