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

Error 'Expiration time' claim ('exp') is too far in the future #966

Closed
divramod opened this issue Jul 14, 2019 · 8 comments

Comments

@divramod
Copy link

commented Jul 14, 2019

Bug Report

Current Behavior
Probot throws error and deprication warning.

import { Application } from 'probot' // eslint-disable-line no-unused-vars
export = (app: Application) => {
}

Expected behavior/code
Probot running without error

Environment

  • Probot version(s): [e.g. v9.2.19]
  • Node/npm version: [e.g. Node 11.14.0/npm 6.10.0]
  • OS: [Linux Arch]

Possible Solution

Additional context/Screenshots

  • i removed node_modules and reinstalled with npm install
  • the error doesnt occur running npm run dev for the first time, when the env-var in .env are empty, but every time after registering the app via localhost:3000
  • Error Log
➤ npm run dev

> bot@0.0.2 dev /home/.../bot
> npm run build && nodemon --exec "npm start"


> bot@0.0.2 build /home/.../bot
> tsc -p tsconfig.json

[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `npm start`

> bot@0.0.2 start /home/.../bot
> probot run ./lib/index.js

05:58:23.889Z  INFO probot: Forwarding https://smee.io/... to http://localhost:3000/
05:58:23.893Z  INFO probot: Listening on http://localhost:3000
{ Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
    at RequestError.get (/home/.../bot/node_modules/@octokit/request-error/dist-node/index.js:29:17)
    at Object.Logger.stdSerializers.err (/home/.../bot/node_modules/bunyan/lib/bunyan.js:1148:19)
    at mkRecord (/home/.../bot/node_modules/bunyan/lib/bunyan.js:942:35)
    at Logger.error (/home/.../bot/node_modules/bunyan/lib/bunyan.js:1044:19)
    at process.Probot.errorHandler (/home/.../bot/node_modules/probot/lib/index.js:194:29)
    at process.emit (events.js:193:13)
    at process.EventEmitter.emit (domain.js:481:20)
    at processPromiseRejections (internal/process/promises.js:139:20)
    at processTicksAndRejections (internal/process/task_queues.js:87:32) name: 'Deprecation' }
05:58:24.252Z ERROR probot: 'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued
  HttpError: 'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued
      at response.text.then.message (/home/.../bot/node_modules/@octokit/request/dist-node/index.js:66:23)
      at processTicksAndRejections (internal/process/task_queues.js:86:5)
05:58:24.535Z  INFO probot: Connected https://smee.io/...
  • current probots octokit dependencies
    "@octokit/app": "^4.0.0",
    "@octokit/graphql": "3.0.1",
    "@octokit/plugin-enterprise-compatibility": "^1.0.0",
    "@octokit/plugin-retry": "^2.1.1",
    "@octokit/plugin-throttling": "^2.3.0",
    "@octokit/rest": "^16.25.0",
    "@octokit/webhooks": "^6.0.0",

@issue-label-bot issue-label-bot bot added the bug 🐞 label Jul 14, 2019

@issue-label-bot

This comment has been minimized.

Copy link

commented Jul 14, 2019

Issue-Label Bot is automatically applying the label bug 🐞 to this issue, with a confidence of 0.95. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@welcome

This comment has been minimized.

Copy link

commented Jul 14, 2019

Thanks for opening this issue. A contributor should be by to give feedback soon. In the meantime, please check out the contributing guidelines and explore other ways you can get involved.

@gr2m

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

@divramod does the workaround mentioned in #967 (comment) solve the problem for you?

@divramod

This comment has been minimized.

Copy link
Author

commented Jul 18, 2019

thx. changing https://github.com/octokit/app.js/blob/38a4e69348ccfbc6fec31c3048497d0a96db68d6/src/get-signed-json-web-token.ts#L9 to
const now = Math.floor(Date.now() / 1000) - 60;
solved it for me too.

It would be nice to have a hint on how to sync system time until this is solved in octokit. Do you have any idea on this for linux arch?

GitHub
GitHub Apps toolset for Node.js. Contribute to octokit/app.js development by creating an account on GitHub.
@gr2m

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2019

Great, thanks for checking!

... did you try to turn it off an on again? It worked for Michael #967 (comment) 🤷‍♂

@divramod

This comment has been minimized.

Copy link
Author

commented Jul 18, 2019

sadly a restart wasnt successful.

@stale

This comment has been minimized.

Copy link

commented Sep 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 16, 2019

@gr2m

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2019

This was resolved in @octokit/app v3.0.1. Can you make sure you have that version or later with npm ls @octokit/app.

Let me know if the problem persists for you

@stale stale bot removed the wontfix label Sep 16, 2019

@gr2m gr2m closed this Sep 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.