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

Probot shows Github error on npm start #326

Closed
geoffdavis92 opened this issue Nov 11, 2017 · 8 comments
Closed

Probot shows Github error on npm start #326

geoffdavis92 opened this issue Nov 11, 2017 · 8 comments
Labels

Comments

@geoffdavis92
Copy link

geoffdavis92 commented Nov 11, 2017

EDIT: relevant technology versions:

`node`: v8.9.1
`probot`: ^3.0.0

"engines": {
    "node": ">= 7.7.0",
    "npm": ">= 4.0.0"
  }

I have a Probot project that I have been developing on one machine without issue, and now moved to my personal computer.

Upon copying my private key and .env settings over, I attempted to spin up the project, but after the app loads, I receive the following error:

Promise {
    <rejected> { [Error: {"message":"'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued","documentation_url":"https://developer.github.com/v3"}]
    message: '{"message":"\'Issued at\' claim (\'iat\') must be an Integer representing the time that the assertion was issued","documentation_url":"https://developer.github.com/v3"}',
    code: 401,
    status: 'Unauthorized',
    headers: 
     { server: 'GitHub.com',
       date: 'Sat, 11 Nov 2017 22:15:27 GMT',
       'content-type': 'application/json; charset=utf-8',
       'content-length': '164',
       connection: 'close',
       status: '401 Unauthorized',
       'x-github-media-type': 'github.machine-man-preview; format=json',
       'access-control-expose-headers': 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval',
       'access-control-allow-origin': '*',
       'content-security-policy': 'default-src \'none\'',
       'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
       'x-content-type-options': 'nosniff',
       'x-frame-options': 'deny',
       'x-xss-protection': '1; mode=block',
       'x-runtime-rack': '0.009168',
       'x-github-request-id': '[request id]' } } }

The specific error message…

{
"message":"'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued",
"documentation_url":"https://developer.github.com/v3"
}

…doesn't appear in many search results, but I was able to track down this issue on the platform forums; this appears to be some sort of low-level issue with the Github request API.

Additionally, I searched the docs and only found this section that pertains to a 401 Unauthorized status; as far as I know, I have not changed anything about my GitHub credentials.

The only thing that I can think of is that perhaps GitHub doesn't like receiving requests from a new machine with the same private key as a different machine?

As of right now this issue prevents me from developing/debugging my bot :[

@welcome
Copy link

welcome bot commented Nov 11, 2017

Thanks for opening this issue. If this issue is regarding feedback about your probot experience, such as things that you found frustrating or confusing, it would be great if you could close this out and open an issue in our probot/friction repo instead. Otherwise a maintainer will get back to you shortly.

@JasonEtco
Copy link
Member

Hey @geoffdavis92, sorry you're experiencing this 😦

This looks like an authentication error of some kind. The best suggestion I can give you is to verify that your APP_ID, WEBHOOK_SECRET and PEM file are exactly the same as on your first device. If that still isn't working, you can try registering a new app and using that as your source of truth for IDs and things. That should work, but I realize it isn't a fix for the original error - I'll take the error to the folks that work on this auth API though.

The only thing that I can think of is that perhaps GitHub doesn't like receiving requests from a new machine with the same private key as a different machine?

This is unlikely, as long as you've check to make sure that your .env file contains the correct environment variables as well as having the PEM file (although it would be giving you different errors)

@JasonEtco JasonEtco added the bug label Nov 11, 2017
@bkeepers
Copy link
Contributor

@geoffdavis92 were you ever able to resolve this? I'm going to close this since we didn't hear back from you, but let us know if you're still having trouble and we'd be happy to help.

@alessandro-c
Copy link

alessandro-c commented Apr 24, 2018

I know the issue was closed, but if you're running probot on docker make sure the clock in the container is actually in sync.

Have a look at https://platform.github.community/t/issued-at-claim-iat-must-be-an-integer-representing-the-time-that-the-assertion-was-issued/1549/11

GitHub Platform Forum
I’m getting this error everytime on my development machine. The project is running in a Docker container, and each time is out-of-sync after my laptop wakes up from hibernation. @anuccio1 this is probably linked somehow to a glimpse in the date/time of your server, you should double-check.

@nombrekeff
Copy link

Node Version: 8.9.1
NPM version: 6.1.0
Probot Version: 7.2.0

This is still happening to me.. any updates on how to fix this?
I've followed the tutorial here, and when running start it throws:

HttpError: {"message":"'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued","documentation_url":"https://developer.github.com/v3"}
      at response.text.then.message (C:\Users\keff\Desktop\cosas\Dev\LibsJS\better-issues\node_modules\@octokit\rest\lib\request\request.js:72:19)
      at <anonymous>
      at process._tickDomainCallback (internal/process/next_tick.js:228:7)

@nombrekeff
Copy link

I read in this thread that it could have something to do with my PC date not beeing correct, and that was the case it was 3 min ahead.

@rthadur
Copy link

rthadur commented Feb 6, 2019

Hi All
getting this error in response :

{"statusCode":500,"body":"{"message":{"code":401,"message":"{\"message\":\"Missing 'issuer' claim ('iss') in assertion\",\"documentation_url\":\"https://developer.github.com/v3\\\"}\"}}"}

any idea of this error , i have deployed my probot app on google cloud functions

@gr2m
Copy link
Contributor

gr2m commented Feb 14, 2019

Please create new issues and fill out the issue templates

@probot probot locked as resolved and limited conversation to collaborators Feb 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants