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

Incompatible with Probot v11 #58

Closed
helaili opened this issue Jan 23, 2021 · 6 comments · Fixed by #59
Closed

Incompatible with Probot v11 #58

helaili opened this issue Jan 23, 2021 · 6 comments · Fixed by #59
Labels
bug Something isn't working released

Comments

@helaili
Copy link

helaili commented Jan 23, 2021

Got this error with probot 11.0.1 and 11.0.5. Downgrading to 10.19.0 solved it.

HttpError: Missing 'issuer' claim ('iss') in assertion
at /var/task/node_modules/@octokit/request/dist-node/index.js:66:23
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async getInstallationAuthentication (/var/task/node_modules/@octokit/auth-app/dist-node/index.js:258:7)
at async hook (/var/task/node_modules/@octokit/auth-app/dist-node/index.js:424:7)
at async Job.doExecute (/var/task/node_modules/bottleneck/light.js:405:18)
@gr2m
Copy link
Contributor

gr2m commented Jan 24, 2021

What's your setup? Is your code open source? Do you see any deprecation warnings when you run your app with 10.19.0?

@helaili
Copy link
Author

helaili commented Jan 25, 2021

The code is here and yes, I do have some warnings such as this one 👇

Deprecation: [probot] "id" option is deprecated. Use "appId" instead

In terms of setup, it's just a simple probot app that I'm deploying as an AWS lambda with the serverless command line. It's configured with .env.{stage} files and the environment is properly populated in AWS.

@gr2m
Copy link
Contributor

gr2m commented Jan 25, 2021

The deprecation warning is why it fails with the new version, this line here is the problem

https://github.com/probot/serverless-lambda/blob/c2a6ec82b2c855636936f92375c24af9d3de2784/index.js#L12

I'm currently working on creating an example app with deployment to AWS Lambda with Serverless. Once that's done I'll update the adapter. But the current app is not working, I don't know why, I'm not very familiar with Lambda/Serverless, could you have a look?

probot/example-aws-lambda-serverless#1

See also the discussion at probot/probot#1467 (comment)

@gr2m gr2m changed the title Missing 'issuer' claim ('iss') in assertion with probot v11 Incompatible with Probot v11 Jan 25, 2021
@gr2m gr2m added the bug Something isn't working label Jan 25, 2021
@axel3rd
Copy link
Contributor

axel3rd commented Feb 1, 2021

In addition, Probot v11 incompatibilities concerns a custom GitHub URL endpoint (sample: GitHub Enterprise).

Switching a probot app v10 (which is working) into v11, the GitHub Enterprise URL is not taken into account (default GitHub.com is used):

HttpError: request to https://api.github.com/app/installations/42/access_tokens failed, reason: getaddrinfo ENOTFOUND api.github.com api.github.com:443

// Details:
request: {
	method: "POST"
	url: "https://api.github.com/app/installations/42/access_tokens"
	headers: {
		"accept": "application/vnd.github.machine-man-preview+json",
		"user-agent": "probot/11.0.5 octokit-core.js/3.2.5 Node.js/10.23.1 (linux; x64)",
		"authorization": "bearer [REDACTED]",
		"content-length": 0
}

The GHE_HOST sysenv seems not used.

It could perhaps be linked to new Probot constructor usage or new GHE_BASEURL prop (1415):

https://github.com/probot/serverless-lambda/blob/c2a6ec82b2c855636936f92375c24af9d3de2784/index.js#L11-L15

But was introduced in 10.17 and downgrade v11 to v10.19.0 is working fine for me 🤔.

@gr2m gr2m mentioned this issue Feb 9, 2021
@gr2m
Copy link
Contributor

gr2m commented Feb 9, 2021

I've a pull request which will update this adapter to Probot v11, it also changes its APIs. Could you have a look?
#59

I'm not very familiar with the serverless framework. If you could check instructions in the README I'd appreciate it

@gr2m gr2m closed this as completed in #59 Feb 10, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants