mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
717 stars 186 forks source link

Connection timeout on delete request #450

Open ivyrze opened 2 years ago

ivyrze commented 2 years ago

I'm getting the following error when running client.deleteTileset or client.deleteTilesetSource:

node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[  RequestError: socket hang up

  - index.js:970 ClientRequest.<anonymous>
    [transit-a11y]/[got]/dist/source/core/index.js:970:111

  - node:events:642 Object.onceWrapper
    node:events:642:26

  - node:events:539 ClientRequest.emit
    node:events:539:35

  - index.js:43 ClientRequest.origin.emit
    [transit-a11y]/[@szmarczak]/http-timer/dist/source/index.js:43:20

  - node:_http_client:478 TLSSocket.socketOnEnd
    node:_http_client:478:9

  - node:events:539 TLSSocket.emit
    node:events:539:35

  - readable:1345 endReadableNT
    node:internal/streams/readable:1345:12

  - task_queues:83 processTicksAndRejections
    node:internal/process/task_queues:83:21

  - errors:692 connResetException
    node:internal/errors:692:14

  - node:_http_client:478 TLSSocket.socketOnEnd
    node:_http_client:478:23

  - node:events:539 TLSSocket.emit
    node:events:539:35

  - readable:1345 endReadableNT
    node:internal/streams/readable:1345:12

  - task_queues:83 processTicksAndRejections
    node:internal/process/task_queues:83:21

] {
  code: 'ECONNRESET',
  timings: {
    start: 1664728409973,
    socket: 1664728409973,
    lookup: 1664728409999,
    connect: 1664728410024,
    secureConnect: 1664728410058,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1664728440048,
    abort: undefined,
    phases: {
      wait: 0,
      dns: 26,
      tcp: 25,
      tls: 34,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 30075
    }
  }
}

It hangs for several seconds before crashing. It doesn't occur for me with client.createTileset, client.createTilesetSource, or client.publishTileset. This is a new issue relating to 0.13.5, since specifying 0.13.4 eliminates the error.