Error: error:1E08010C:DECODER routines::unsupported when calling the api

See original GitHub issue

I received the following error:

node:internal/crypto/sig:131
  const ret = this[kHandle].sign(data, format, type, passphrase, rsaPadding,
                            ^

Error: error:1E08010C:DECODER routines::unsupported
    at Sign.sign (node:internal/crypto/sig:131:29)
    at Object.sign (/home/ubuntu/okta-webhooks/node_modules/jwa/index.js:152:45)
    at Object.jwsSign [as sign] (/home/ubuntu/okta-webhooks/node_modules/jws/lib/sign-stream.js:32:24)
    at Object.module.exports [as sign] (/home/ubuntu/okta-webhooks/node_modules/jsonwebtoken/sign.js:204:16)
    at getToken (/home/ubuntu/okta-webhooks/node_modules/universal-github-app-jwt/dist-node/index.js:13:23)
    at Object.githubAppJwt (/home/ubuntu/okta-webhooks/node_modules/universal-github-app-jwt/dist-node/index.js:35:23)
    at getAppAuthentication (/home/ubuntu/okta-webhooks/node_modules/@octokit/auth-app/dist-node/index.js:110:59)
    at getInstallationAuthentication (/home/ubuntu/okta-webhooks/node_modules/@octokit/auth-app/dist-node/index.js:269:35)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async hook (/home/ubuntu/okta-webhooks/node_modules/@octokit/auth-app/dist-node/index.js:449:7) {
  library: 'DECODER routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_UNSUPPORTED'
}

Node.js v17.2.0
const { createAppAuth } = require("@octokit/auth-app");
const { Octokit } = require("@octokit/rest");

const installationOctokit = new Octokit({
  authStrategy: createAppAuth,
  auth: {
    appId: process.env.APP_ID,
    privateKey: process.env.APP_PRIVATE_KEY,
    installationId: process.env.INSTALLATION_ID,
  },
});
let out = await installationOctokit.repos.listForOrg({
  org: "chocrates-test-org",
});
console.log(out);

Using node17.

I downgraded to node16 and moved the Pkey to a file and it started working.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
wolfy1339commented, Jul 12, 2022

Hit the same error in a next.js demo app too.

I tried to follow the demo README but for any NOOB certain steps require knowledge to be done correctly that a NOOB simply wont have.

What steps are you referring to? There isn’t anything a noob can’t do to create a GitHub app, and use this module to authenticate to the GitHub API

Therefore errors are to be expected and only meaningful error messages help to get over these hurdles. This fact applies to later application support too!

This isn’t an error message that we throw, it is from NodeJS. There isn’t anything we can do for that. We always try to have meaningful error messages throughout the Octokit modules.

Please see https://github.com/vercel/next.js/discussions/38385#discussioncomment-3120467 for details

I really dislike the attitude you are portraying in your comment. There is no need to have a bad attitude when reporting an issue here.


I hit a different bug when trying to reproduce this one https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/1979639

0reactions
timrogerscommented, Jul 18, 2022

No problem! I searched the same thing as you pretty much - I just saw the result and figured it would be the answer 😊 I’m going to close this issue - do feel free to reopen or create a new one if you run into other problems!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting error 'digital envelope routines', reason: 'unsupported ...
In my case, I'm using Nodejs 17.0.1 version and causing this error. Firstly I'm using this command export NODE_OPTIONS=--openssl-legacy-provider ...
Read more >
error:0308010c:digital envelope routines::unsupported [Node ...
In this article, you'll learn how to fix this error in 3 ways. But first, let's discuss what causes the error.
Read more >
Error:0308010C:digital envelope routines::unsupported #11708
I installed the latest Node version, currently, it's 17.2.0 . When I try to start the project in development mode with the command...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found