Found a similar issue, but it didn't really have a solution: #2609
Environment details
Node.js version: 8.1.4
npm version: 5.3.0
@google-cloud/vision version: 0.12.0
Steps to Reproduce
Run the following
const config = require('src/lib/config.js');
const vision = require('@google-cloud/vision')({
projectId: config.googlevision_project_id,
credentials: {
client_email: config.googlevision_client_email,
private_key: config.googlevision_private_key,
},
});
const image = {
source: {
imageUri: 'http://i0.kym-cdn.com/entries/icons/mobile/000/017/414/sampletext.jpg',
},
};
vision.textDetection(image)
.then((result) => {
console.log('result: ', result);
})
.catch((e) => {
console.log('error: ', e);
});
Output
{ Error: Getting metadata from plugin failed with error: error:0906D06C:PEM
routines:PEM_read_bio:no start line
at /node_modules/grpc/src/node/src/client.js:554:15
code: 16,
metadata: Metadata { _internal_repr: {} },
note: 'Exception occurred in retry method that was not classified as transient' }
Hello! Would you please check the value of private_key is properly formatted? I can reproduce the no start line error if the key does not follow this pattern:
-----BEGIN PRIVATE KEY-----\n{REDACTED}\n-----END PRIVATE KEY-----\n
That was the issue. Thank you!
Hi, @stephenplusplus I followed that pattern of private_key but I can still see that error.
Could you help me?
Hi, @stephenplusplus I'm also followed that pattern of private_key after that seen your comment. but I can still see that error. Could you help me?
Greetings @parthasarathysarathy! Could you please open a new issue with details on what you're running into? Generally commenting on closed issues makes it a little harder for us to keep track of things :)
@Apollo725 @parthasarathysarathy were you able to solve your problem?
Most helpful comment
Hello! Would you please check the value of
private_keyis properly formatted? I can reproduce theno start lineerror if the key does not follow this pattern: