question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get local issuer exception

See original GitHub issue

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What’s the actual output vs expected output?
Description

I’m using @openapitools/openapi-generator-cli@2.0.3 to generate the code from the openapi spec. Originally, my code worked with 1.0.18-4.3.1 and I was using the command line e.g.

yarn run openapi-generator generate -i /app/schema.json -g typescript-fetch -o /app/output -t /app/templates

After the migration to 2.x I had to modify the command line to

yarn run openapi-generator-cli generate -i /app/schema.json -g typescript-fetch -o /app/output -t /app/templates

and the output for this call is:

(node:48032) UnhandledPromiseRejectionWarning: Error: unable to get local issuer certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
    at TLSSocket.emit (events.js:223:5)
    at TLSSocket._finishInit (_tls_wrap.js:794:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12)
(node:48032) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:48032) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I’m behind the corporate firewall and I did not expect to have any calls made by the openapi generator. What are they for and can I turn them off?

openapi-generator version

2.0.3

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:11
  • Comments:10

github_iconTop GitHub Comments

5reactions
dolanmiucommented, Feb 12, 2021

Also having this issue

5reactions
wetgicommented, Jan 5, 2021

I have the same problem and already tested version 2.1.10 and 2.1.5.

Unable to query repository, because of: "connect ECONNREFUSED 54.164.121.222:443"

Response:
(node:28513) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'headers' of undefined
    at VersionManagerService.printResponseError (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/main.js:884:43)
    at CatchSubscriber.httpService.get.pipe.Object [as selector] (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/main.js:797:18)
    at CatchSubscriber.error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/operators/catchError.js:46:31)
    at MapSubscriber.Subscriber._error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:72:18)
    at MapSubscriber.Subscriber._error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:92:26)
    at MapSubscriber.Subscriber.error (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/rxjs/internal/Subscriber.js:72:18)
    at axios.then.catch.err (/usr/local/lib/node_modules/@openapitools/openapi-generator-cli/node_modules/@nestjs/common/http/http.service.js:51:28)
(node:28513) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:28513) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

This call fails… and I think there is something wrong in the code. I can call the URL from my browser or with curl from terminal. I’m behind a proxy and I think openapi-generator is doing something wrong with the connection.

https://search.maven.org/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL certificate problem: Unable to get local issuer certificate
Ensure that the complete certificate chain is present in the CA bundle file, including the root cert. Resolution - Server Side. This issue...
Read more >
SSL Certificate Problem: Unable to get Local Issuer Certificate
The common cause behind “Cause of SSL Certificate Problem: Unable to get Local Issuer Certificate” is an error that causes misconfiguration ...
Read more >
Fix Unable to get Local Issuer Certificate Error - AboutSSL
A quick guide to fix the 'SSL Certificate Problem Unable to Get Local Issuer Certificate' Error with .PEM .CRT SSL Certificate format.
Read more >
I receive the error "SSL certificate problem: unable to get local ...
Ways to fix this issue: 1) The first, and most successful, solution is to contact hosting company and request assistance. You can ask...
Read more >
Unable to get local issuer certificate mailchimp - Stack Overflow
Ways to fix this issue: The most reasonable solution for a localhost install is to download a local copy of the necessary CA...
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