googleapis / google-auth-library-nodejs

🔑 Google Auth Library for Node.js
Apache License 2.0
1.74k stars 382 forks source link

exchanging code for tokens: GaxiosError: request to https://oauth2.googleapis.com/token failed, #1802

Closed Daudxu closed 7 months ago

Daudxu commented 7 months ago

Error exchanging code for tokens: GaxiosError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.163.42:443 at Gaxios._request (C:\Users\xudan\Desktop\test\node_modules\gaxios\build\src\gaxios.js:143:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OAuth2Client.getTokenAsync (C:\Users\xudan\Desktop\test\node_modules\google-auth-library\build\src\auth\oauth2client.js:137:21) at async C:\Users\xudan\Desktop\test\server.js:29:24 { config: { retry: true, retryConfig: { httpMethodsToRetry: [Array], currentRetryAttempt: 2, retry: 3, noResponseRetries: 2, statusCodesToRetry: [Array] }, method: 'POST', url: 'https://oauth2.googleapis.com/token', data: '< - See errorRedactor option in gaxios for configuration>.', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'google-api-nodejs-client/9.9.0', 'x-goog-api-client': 'gl-node/18.18.2' }, paramsSerializer: [Function: paramsSerializer], body: '< - See errorRedactor option in gaxios for configuration>.', validateStatus: [Function: validateStatus], responseType: 'unknown', errorRedactor: [Function: defaultErrorRedactor] }, response: undefined, error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.163.42:443 at ClientRequest. (C:\Users\xudan\Desktop\test\node_modules\node-fetch\lib\index.js:1501:11) at ClientRequest.emit (node:events:517:28) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:517:28) 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: 'ETIMEDOUT', code: 'ETIMEDOUT' }, code: 'ETIMEDOUT',

} Error exchanging code for tokens: GaxiosError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.163.42:443 at Gaxios._request (C:\Users\xudan\Desktop\test\node_modules\gaxios\build\src\gaxios.js:143:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async OAuth2Client.getTokenAsync (C:\Users\xudan\Desktop\test\node_modules\google-auth-library\build\src\auth\oauth2client.js:137:21) at async C:\Users\xudan\Desktop\test\server.js:29:24 { config: { retry: true, retryConfig: { httpMethodsToRetry: [Array], currentRetryAttempt: 2, retry: 3, noResponseRetries: 2, statusCodesToRetry: [Array] }, method: 'POST', url: 'https://oauth2.googleapis.com/token', data: '< - See errorRedactor option in gaxios for configuration>.', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'google-api-nodejs-client/9.9.0', 'x-goog-api-client': 'gl-node/18.18.2' }, paramsSerializer: [Function: paramsSerializer], body: '< - See errorRedactor option in gaxios for configuration>.', validateStatus: [Function: validateStatus], responseType: 'unknown', errorRedactor: [Function: defaultErrorRedactor] }, response: undefined, error: FetchError: request to https://oauth2.googleapis.com/token failed, reason: connect ETIMEDOUT 172.217.163.42:443 at ClientRequest. (C:\Users\xudan\Desktop\test\node_modules\node-fetch\lib\index.js:1501:11) at ClientRequest.emit (node:events:517:28) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:517:28) 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: 'ETIMEDOUT', code: 'ETIMEDOUT' }, code: 'ETIMEDOUT',

}