Skip to content

Better detection of keyfile type #5

Closed
@stephenplusplus

Description

From @yonah-codefresh:

We ran into a very perplexing issue.
Our code suddenly started throwing:
"Error: email is required."
Assuming we missed some api change we added an email configuration property and hit the following error:
"Error: error:0906D06C:PEM routines:PEM_read_bio:no start line"
That error led us to issue #261 after which I double checked our service key files which were fine.
Long story short, our key file did not have a suffix of .json so it was apparently parsed as a PEM file.
I suggest either better parsing heuristics or else an explicit error if the key file name doesn't end in .json, .pem, or .p12

googleapis/google-cloud-node#1021 (comment)

Metadata

Labels

🚨This issue needs some love.triage meI really want to be triaged.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions