Bug(regression) - Socket hang up since v0.13.5
MatejSkrbis opened this issue · 1 comments
MatejSkrbis commented
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 commented
Thanks @MatejSkrbis! This was fixed in #479 and released as @mapbox/mapbox-sdk@0.15.4