MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
954 stars 280 forks source link

Random RequestError (ETIMEDOUT) without context #663

Open aldochaconc opened 2 months ago

aldochaconc commented 2 months ago

Hello, I'm receiving a RequestError (got) repeatedly from about one week ago. I did debug using got library in order to check the real response from Shopify

Here is more context:

I really don't know where to point at.

Here's the stacktrace although it doesnt provide context or details, Thanks in advance!

API stacktrace:

RequestError
    at ClientRequest.<anonymous> (/home/xxxxxx/Workspace/pyk-backend/node_modules/got/dist/source/core/index.js:970:111)
    at Object.onceWrapper (node:events:634:26)
    at ClientRequest.emit (node:events:531:35)
    at origin.emit (/home/crystal/Workspace/pyk-backend/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)AggregateError [ETIMEDOUT]: 
    at internalConnectMultiple (node:net:1117:18)
    at internalConnectMultiple (node:net:1185:5)
    at Timeout.internalConnectMultipleTimeout (node:net:1711:5)
    at listOnTimeout (node:internal/timers:575:11)
    at process.processTimers (node:internal/timers:514:7)
{
  "request": {
    "_events": {
      "pipe": [
        null,
        null
      ],
      "response": [
        null,
        null
      ]
    },
    "_readableState": {
      "highWaterMark": 0,
      "buffer": [],
      "bufferIndex": 0,
      "length": 0,
      "pipes": [],
      "awaitDrainWriters": null
    },
    "_writableState": {
      "highWaterMark": 0,
      "length": 0,
      "corked": 0,
      "writelen": 0,
      "bufferedIndex": 0,
      "pendingcb": 1
    },
    "allowHalfOpen": true,
    "requestInitialized": true,
    "redirects": [],
    "retryCount": 0,
    "_progressCallbacks": [],
    "_eventsCount": 8,
    "options": {
      "method": "GET",
      "retry": {
        "limit": 0,
        "methods": [
          "GET",
          "PUT",
          "HEAD",
          "DELETE",
          "OPTIONS",
          "TRACE"
        ],
        "statusCodes": [
          408,
          413,
          429,
          500,
          502,
          503,
          504,
          521,
          522,
          524
        ],
        "errorCodes": [
          "ETIMEDOUT",
          "ECONNRESET",
          "EADDRINUSE",
          "ECONNREFUSED",
          "EPIPE",
          "ENOTFOUND",
          "ENETUNREACH",
          "EAI_AGAIN"
        ],
        "maxRetryAfter": 12000
      },
      "headers": {
        "user-agent": "shopify-api-node/3.14.0",
        "x-shopify-access-token": "xxxxxx",
        "accept": "application/json",
        "accept-encoding": "gzip, deflate, br"
      },
      "hooks": {
        "afterResponse": [
          null
        ],
        "init": [],
        "beforeRequest": [],
        "beforeRedirect": [],
        "beforeError": [],
        "beforeRetry": []
      },
      "decompress": true,
      "throwHttpErrors": true,
      "followRedirect": true,
      "isStream": false,
      "responseType": "json",
      "resolveBodyOnly": false,
      "maxRedirects": 10,
      "prefixUrl": "",
      "methodRewriting": true,
      "ignoreInvalidCookies": false,
      "http2": false,
      "allowGetBody": false,
      "pagination": {
        "countLimit": null,
        "backoff": 0,
        "requestLimit": 10000,
        "stackAllItems": true
      },
      "cacheOptions": {},
      "pathname": "/admin/api/2024-07/orders.json",
      "hostname": "xxxxxx.myshopify.com",
      "protocol": "https:",
      "search": "?financial_status=any&fulfillment_status=any",
      "username": "",
      "password": "",
      "url": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
      "timeout": {
        "request": 12000
      }
    },
    "requestUrl": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
    "_cannotHaveBody": true,
    "_noPipe": true
  },
  "code": "ETIMEDOUT",
  "name": "RequestError",
  "options": {
    "method": "GET",
    "retry": {
      "limit": 0,
      "methods": [
        "GET",
        "PUT",
        "HEAD",
        "DELETE",
        "OPTIONS",
        "TRACE"
      ],
      "statusCodes": [
        408,
        413,
        429,
        500,
        502,
        503,
        504,
        521,
        522,
        524
      ],
      "errorCodes": [
        "ETIMEDOUT",
        "ECONNRESET",
        "EADDRINUSE",
        "ECONNREFUSED",
        "EPIPE",
        "ENOTFOUND",
        "ENETUNREACH",
        "EAI_AGAIN"
      ],
      "maxRetryAfter": 12000
    },
    "headers": {
      "user-agent": "shopify-api-node/3.14.0",
      "x-shopify-access-token": "xxxxxx",
      "accept": "application/json",
      "accept-encoding": "gzip, deflate, br"
    },
    "hooks": {
      "afterResponse": [
        null
      ],
      "init": [],
      "beforeRequest": [],
      "beforeRedirect": [],
      "beforeError": [],
      "beforeRetry": []
    },
    "decompress": true,
    "throwHttpErrors": true,
    "followRedirect": true,
    "isStream": false,
    "responseType": "json",
    "resolveBodyOnly": false,
    "maxRedirects": 10,
    "prefixUrl": "",
    "methodRewriting": true,
    "ignoreInvalidCookies": false,
    "http2": false,
    "allowGetBody": false,
    "pagination": {
      "countLimit": null,
      "backoff": 0,
      "requestLimit": 10000,
      "stackAllItems": true
    },
    "cacheOptions": {},
    "pathname": "/admin/api/2024-07/orders.json",
    "hostname": "xxxxxx.myshopify.com",
    "protocol": "https:",
    "search": "?financial_status=any&fulfillment_status=any",
    "username": "",
    "password": "",
    "url": "https://xxxxxx.myshopify.com/admin/api/2024-07/orders.json?financial_status=any&fulfillment_status=any",
    "timeout": {
      "request": 12000
    }
  },
  "timings": {
    "start": 1724868194745,
    "socket": 1724868194745,
    "lookup": 1724868195955,
    "error": 1724868196206,
    "phases": {
      "wait": 0,
      "dns": 1210,
      "total": 1461
    }
  },
  "payload": null
}