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

Bug(regression) - Socket hang up since v0.13.5 #459

Closed
MatejSkrbis opened this issue Nov 9, 2022 · 1 comment · Fixed by #479
Closed

Bug(regression) - Socket hang up since v0.13.5 #459

MatejSkrbis opened this issue Nov 9, 2022 · 1 comment · Fixed by #479

Comments

@MatejSkrbis
Copy link

Last working version is 0.13.4
Since then versions 0.13.5+ are broken.

When deleting tilesets, tileset sources or styles, socket may hang up (probably with larger ones).
Previous version normally deletes sources that cannot be deleted with v0.13.5+ (even after trying for many times)

Code example:

const mbxTilesets = require('@mapbox/mapbox-sdk/services/tilesets');
const tilesetsService = mbxTilesets(baseClient);

...

    await tilesetsService.deleteTileset({
        tilesetId: 'myuser.tilesetId'
    }).send();

...

Error:


RequestError: socket hang up
    at ClientRequest.<anonymous> (mypath\Mapbox\node_modules\got\dist\source\core\index.js:970:111)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:539:35)
    at ClientRequest.origin.emit (mypath\Mapbox\node_modules\@szmarczak\http-timer\dist\source\index.js:43:20)
    at TLSSocket.socketOnEnd (node:_http_client:478:9)
    at TLSSocket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at connResetException (node:internal/errors:692:14)
    at TLSSocket.socketOnEnd (node:_http_client:478:23)
    at TLSSocket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ECONNRESET',
  timings: {
    start: 1667981491934,
    socket: 1667981491935,
    lookup: 1667981491935,
    connect: 1667981491944,
    secureConnect: 1667981491951,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1667981521950,
    abort: undefined,
    phases: {
      wait: 1,
      dns: 0,
      tcp: 9,
      tls: 7,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 30016
    }
  }
}

@mapsam
Copy link
Contributor

mapsam commented Mar 12, 2024

Thanks @MatejSkrbis! This was fixed in #479 and released as @mapbox/[email protected]

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

Successfully merging a pull request may close this issue.

2 participants