goenning / google-indexing-script

Script to get your site indexed on Google in less than 48 hours

Home Page:https://seogets.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Credential error?

zcysxy opened this issue · comments

Hi! I got the following error when I ran the code. I have enabled the APIs and set up the service account accordingly. Do you have any clues about what's causing the issue? Thanks!

/Users/ce/Downloads/google-indexing-script/node_modules/gaxios/build/src/gaxios.js:148
                : new common_1.GaxiosError(e.message, opts, undefined, e);
                  ^

GaxiosError: request to https://www.googleapis.com/oauth2/v4/token failed, reason:
    at Gaxios._request (/Users/ce/Downloads/google-indexing-script/node_modules/gaxios/build/src/gaxios.js:148:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async GoogleToken.requestToken (/Users/ce/Downloads/google-indexing-script/node_modules/gtoken/build/src/index.js:230:23)
    at async GoogleToken.getTokenAsync (/Users/ce/Downloads/google-indexing-script/node_modules/gtoken/build/src/index.js:137:20)
    at async JWT.refreshTokenNoCache (/Users/ce/Downloads/google-indexing-script/node_modules/google-auth-library/build/src/auth/jwtclient.js:165:23)
    at async JWT.authorizeAsync (/Users/ce/Downloads/google-indexing-script/node_modules/google-auth-library/build/src/auth/jwtclient.js:146:24)
    at async getAccessToken (file:///Users/ce/Downloads/google-indexing-script/src/shared/auth.mjs:20:18)
    at async file:///Users/ce/Downloads/google-indexing-script/src/index.mjs:22:21 {
  config: {
    method: 'POST',
    url: 'https://www.googleapis.com/oauth2/v4/token',
    data: {
      grant_type: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.',
      assertion: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.'
    },
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'User-Agent': 'google-api-nodejs-client/9.4.2',
      'x-goog-api-client': 'gl-node/21.1.0',
      Accept: 'application/json'
    },
    responseType: 'json',
    paramsSerializer: [Function: paramsSerializer],
    body: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.',
    validateStatus: [Function: validateStatus],
    errorRedactor: [Function: defaultErrorRedactor]
  },
  response: undefined,
  error: FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason:
      at ClientRequest.<anonymous> (/Users/ce/Downloads/google-indexing-script/node_modules/node-fetch/lib/index.js:1501:11)
      at ClientRequest.emit (node:events:515:28)
      at TLSSocket.socketErrorListener (node:_http_client:495:9)
      at TLSSocket.emit (node:events:515: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'
}

Node.js v21.1.0

It’s a timeout / network error, nothing we can do on the script to fix it