Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

[Heroku Postgres] Self Signed Certificate Issue #302

Open
bfg-coding opened this issue Oct 13, 2020 · 3 comments
Open

[Heroku Postgres] Self Signed Certificate Issue #302

bfg-coding opened this issue Oct 13, 2020 · 3 comments
Labels
enhancement new feature or bug with easy workaround

Comments

@bfg-coding
Copy link

Running into an issue where I can't run the generator because of this certificate issue. On the NestJS TypeORM module I can pass the argument rejectUnauthorized: false which bypasses this error can I do something similar for the generator?

[email protected]
[11:07:59 AM] Starting creation of model classes.
Error connecting to Postgres Server.
Error occurred in typeorm-model-generator.
[email protected]  [email protected]
If you think this is a bug please open an issue including this log on https://github.com/Kononnable/typeorm-model-generator/issues
self signed certificate
(node:15772) UnhandledPromiseRejectionWarning: Error: self signed certificate
    at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
    at TLSSocket.emit (events.js:210:5)
    at TLSSocket._finishInit (_tls_wrap.js:794:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12)
(node:15772) 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: 1)
(node:15772) [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.
@Kononnable Kononnable added the enhancement new feature or bug with easy workaround label Oct 31, 2020
@Kononnable
Copy link
Owner

Sorry for the delay.
For now I would suggest modifying code locally.
I think it would be good to allow passing custom options to drivers, but it needs to be designed properly.

@josephfinlayson
Copy link

Set NODE_TLS_REJECT_UNAUTHORIZED=0 before running typeorm

@jgb-solutions
Copy link

@josephfinlayson hey, thanks! I got this stuff working finally. But I still think that's too much. shouldn't have to do that. But it's working so that's good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement new feature or bug with easy workaround
Projects
None yet
Development

No branches or pull requests

4 participants