Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting UNABLE_TO_GET_ISSUER_CERT_LOCALLY when trying to connect to Google BigQuery from NodeJS #2948

Closed
vishwas21 opened this issue Aug 31, 2020 · 4 comments

Comments

@vishwas21
Copy link

I am actually getting the following error when I try to run "npm run server" command. The server.js is only trying to connect to my BigQuery Account and get the list of datasets.

Error : FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: unable to get local issuer certificate
at ClientRequest. (C:...\node_modules\node-fetch\lib\index.js:1455:11)
at ClientRequest.emit (events.js:310:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:310:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
message: 'request to https://www.googleapis.com/oauth2/v4/token failed, reason: unable to get local issuer certificate',
type: 'system',
errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
config: {
method: 'POST',
url: 'https://www.googleapis.com/oauth2/v4/token',
data: {
grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
assertion: 'eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJiaXJ0aGRheS1vd25lci1zZXJ2aWNlLWFjY291bnRAYnFlcm4tYmlydGhkYXktYXBwLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwic2NvcGUiOiJodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRoL2JpZ3F1ZXJ5IiwiYXVkIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3Y0L3Rva2VuIiwiZXhwIjoxNTk4ODUwOTI0LCJpYXQiOjE1OTg4NDczMjR9.kVLp5R0dc6CJRIKXDD7Hk26PCRTKirAalTxjEoMMF6cS8urIftNGZePHQW7iOK_7ixYWDcXcvTPkkvaAQNwdIKL31RkKCXqfqrXhDB7wjDsQN13pfzHxIvlfiJDt450vpG1A8p-VipC7q_GLjVmItIyEA874p6TB_fBKpKf8NMlF1VM-t4SJlGVV-wrxa-nPt9Rg1O_tzETu7EczLHFtgDxGTcCaQJu-Kat-0T-tdDYYc0oBzWaFerS0eG9tnvZZDSXLHdKNd6QYyggdJL0h6qr9YK9o8DXUsVitKRzmuu9wK0M3oqJwHUDlM4eCMDKxhgwiz8cX9U-84Og6Sog6Tg'
},
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
responseType: 'json',
params: [Object: null prototype] {},
paramsSerializer: [Function: paramsSerializer],
body: '{"grant_type":"urn:ietf:params:oauth:grant-type:jwt-bearer","assertion":"eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJiaXJ0aGRheS1vd25lci1zZXJ2aWNlLWFjY291bnRAYnFlcm4tYmlydGhkYXktYXBwLmlhbS5nc2VydmljZWFjY291bnQuY29tIiwic2NvcGUiOiJodHRwczovL3d3dy5nb29nbGVhcGlzLmNvbS9hdXRoL2JpZ3F1ZXJ5IiwiYXVkIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vb2F1dGgyL3Y0L3Rva2VuIiwiZXhwIjoxNTk4ODUwOTI0LCJpYXQiOjE1OTg4NDczMjR9.kVLp5R0dc6CJRIKXDD7Hk26PCRTKirAalTxjEoMMF6cS8urIftNGZePHQW7iOK_7ixYWDcXcvTPkkvaAQNwdIKL31RkKCXqfqrXhDB7wjDsQN13pfzHxIvlfiJDt450vpG1A8p-VipC7q_GLjVmItIyEA874p6TB_fBKpKf8NMlF1VM-t4SJlGVV-wrxa-nPt9Rg1O_tzETu7EczLHFtgDxGTcCaQJu-Kat-0T-tdDYYc0oBzWaFerS0eG9tnvZZDSXLHdKNd6QYyggdJL0h6qr9YK9o8DXUsVitKRzmuu9wK0M3oqJwHUDlM4eCMDKxhgwiz8cX9U-84Og6Sog6Tg"}',
validateStatus: [Function: validateStatus]
}
}

@Trott Trott transferred this issue from nodejs/node Aug 31, 2020
@PoojaDurgad
Copy link

@vishwas21 - can you refer this nodejs/node#3742 hope it helps.

@vishwas21
Copy link
Author

@PoojaDurgad Thank you, I will look at the link you provided :)

@jtaraya
Copy link

jtaraya commented May 16, 2023

Am getting below error when i run npm run start
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:496:9)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}

Node.js v18.13.0
[nodemon] app crashed - waiting for file changes before starting...

Please assist

@brindha-mec
Copy link

@jtaraya Hi! were you able to fix this issue? I'm having the same issue and even tried upgrading npm/node - v18.17.0/ npm v9.6.7

Error :

127 verbose stack FetchError: request to https://registry.npmjs.org/@oracle%2Foraclejet failed, reason: unable to get local issuer certificate
127 verbose stack at ClientRequest. (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
127 verbose stack at ClientRequest.emit (node:events:514:28)
127 verbose stack at TLSSocket.socketErrorListener (node:_http_client:501:9)
127 verbose stack at TLSSocket.emit (node:events:526:35)
127 verbose stack at emitErrorNT (node:internal/streams/destroy:151:8)
127 verbose stack at emitErrorCloseNT (node:internal/streams/destroy:116:3)
127 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants