UnhandledPromiseRejectionWarning: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
See original GitHub issueI get the above error when I try initializing the drive with the jwt token. Below’s my implementation. the keys are valid and I downloaded the file from the google developer console.
...
const jwtClient = new google.auth.JWT({
email: secret.client_email,
key: secret.private_key,
scopes
})
const drive = google.drive({
version: 'v3',
auth: jwtClient
})
function workspace () {
return new Promise(async (resolve, reject) => {
const folder = await findFolder(workDir)
if (folder) return resolve(folder)
return createFolder(workDir)
.then(({ data }) => resolve(data))
.catch(err => reject(err))
})
}
...
const cwd = await workspace()
console.log(cwd)
workDir
is a variable holding a reference to a string with the name of a working directory.
The weird thing is that this was working last week but then it stopped working for some reason.
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (8 by maintainers)
Top Results From Across the Web
Node.js https pem error: routines:PEM_read_bio:no start line
I am messing with login form right now with node.js, I tried creating a pem key and csr using
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 >Node/Express server: PEM_read_bio:no start line - Help
Error : error:0906D06C:PEM routines:PEM_read_bio:no start line. I am using symlinks from live folder, so it is not the reason…
Read more >`How to Fix the below PEM routines:PEM_read_bio:ba ...
ERROR SSLCommon - Can't read key file c:\program files\splunkuniversalforwarder\etc\certs\name.pem errno=151441510 error:0906D066:PEM.
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 FreeTop 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
Top GitHub Comments
i was using .env as well and this problem happened to me. To fix, I just had to wrap the value in the
.env
file in double quotes. Hope it helps someone.(edit) the other thing that just happened when going to prod was that something between the ENV var setting and the app replaced all
\n
with\\n
, so i just had to do:THANK YOU!