Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
See original GitHub issueHello.
I have created crt and key files by using openssl as suggested here https://github.com/yagop/node-telegram-bot-api#webhooks
Then I wrote this code https://github.com/yagop/node-telegram-bot-api/blob/master/examples/httpsWebHook.js
And when I try to start it throws me this error:
_tls_common.js:65
c.context.setCert(options.cert);
^
Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
at Error (native)
at Object.createSecureContext (_tls_common.js:65:17)
at Server (_tls_wrap.js:754:25)
at new Server (https.js:24:14)
at Object.exports.createServer (https.js:44:10)
at new TelegramBotWebHook (d:\Phantasy star\Mobi\Daniars_Project\Node\bot\node_modules\node-telegram-bot-api\src\telegramWebHook.js:23:29)
at new TelegramBot (d:\Phantasy star\Mobi\Daniars_Project\Node\bot\node_modules\node-telegram-bot-api\src\telegram.js:54:21)
at Object.<anonymous> (d:\Phantasy star\Mobi\Daniars_Project\Node\bot\main.js:19:11)
at Module._compile (module.js:397:26)
at Object.Module._extensions..js (module.js:404:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:429:10)
at startup (node.js:139:18)
at node.js:999:3
I have changed encoding of these files to UTF-8 and this does not work
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
OpenSSL: PEM routines:PEM_read_bio:no start line:pem_lib ...
Please, provide the solution. P.S.: The message unable to load certificate 140603809879880:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c ...
Read more >How to fix "PEM_read_bio:no start line error" nginx error
[emerg]: SSL_CTX_use_PrivateKey_file("/etc/ssl/cert.pem") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140B0009:SSL ...
Read more >error:0906D06C:PEM routines:PEM_read_bio:no start line #409
Detailed Error: I am manually giving the private key to the new BoxSDK( ) instance. I have generated the key from the Box-developer...
Read more >Error 0906D06C:PEM routines:PEM_read_bio:no start line ...
Description Configuration does not load when upgrading to 11.6.5.2. Next error is prompted after some minutes of a failing configuration loading ...
Read more >Error:0906D06C:PEM routines:PEM_read_bio:no start line
I have PFX Client certificate, I have import in Postman & It works absolutely fine. But while I'm trying with command line &...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe the path is wrong or Windows sucks.
PS: Windows sucks!
I was having the same problem but on a ubuntu server. The solution was generate the certificates using the following commands:
found it here : http://stackoverflow.com/questions/22584268/node-js-https-pem-error-routinespem-read-biono-start-line