node-telegram-bot-api
node-telegram-bot-api copied to clipboard
Getting Error: unable to get local issuer certificate
Hi, I am getting this error even with the simple example script.
DEBUG=* node test.js has resulted in the following lines,
node-telegram-bot-api polling with options: {"offset":0,"timeout":10} +0ms
node-telegram-bot-api HTTP request: {"form":{"offset":0,"timeout":10},"method":"POST","url":"https://api.telegram.org/bot_MY_TOKEN_KEY/getUpdates","simple":false,"resolveWithFullResponse":true,"forever":true} +0ms
node-telegram-bot-api polling error: EFATAL: Error: unable to get local issuer certificate +978ms
error: [polling_error] {"code":"EFATAL","message":"EFATAL: Error: unable to get local issuer certificate"}
Are you using a self signed certificate? If so please check into Telegram API docs on how to correctly configure it.
No not using anything... Using as is in the example.. with relevant token key.
On Mon, 2 Sep 2019, 6:45 pm Mohammed Sohail, [email protected] wrote:
Are you using a self signed certificate? If so please check into Telegram API docs on how to correctly configure it.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yagop/node-telegram-bot-api/issues/741?email_source=notifications&email_token=AC4CFXSUPVIEWW3JV6SJ6RLQHUGYFA5CNFSM4IOFBCPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5VZMRA#issuecomment-527144516, or mute the thread https://github.com/notifications/unsubscribe-auth/AC4CFXT7HOXQREWBWIKU4BLQHUGYFANCNFSM4IOFBCPA .
Hello, i am getting the same issue. Is there a way to solve it? I am not using a self signed certificate.
No, I couldn't able to identify the issue, but it's happening with only node v12. On a machine loaded with node 10 it is working fine. So I assume some issue with node configuration. Please suggest which configuration should be modified to avoid this error on node 12.
Thanks.
Hello, thanks for your answer. I will try with an older node version.
For anyone getting to this post in the future. The problem usually relates to the laptop you are using. Some companies install security software that replaces the Server certificates for specific domains in an attempt to obtain the information of the reques.t In my case it was Cisco Umbrella software. So usually executing your code in a different computer that doesn't have that kind of software fixes the issue.