DoctorMcKay / node-steam-user

Allows interaction with the Steam network via the Steam client protocol
https://dev.doctormckay.com/forum/7-node-steam-user/
MIT License
892 stars 157 forks source link

Uncaught exception: read ECONNRESET #477

Closed Sadzurami closed 2 months ago

Sadzurami commented 8 months ago

Describe the bug

After emitting error event with read ECONNRESET at https://github.com/DoctorMcKay/node-steam-user/blob/d24569d6041b63e1fc36a1ab21a4becd2cec2b48/components/connection_protocols/tcp.js#L87 sometimes i get same uncaught exception.

This happens when proxy experience temporary outage.

When SteamUser emits 'error' event, i call logOff method (to be sure, that SteamUser instance is stopped). Note: I'm not use auto-reconnect and manage reconnecting by myself.

Versions

5.0.8 (but it happens on earlier versions too)

Screenshots and Error Logs

error timestamp 1709395946535

Error: Bot error
    at Bot.<anonymous> (C:\project\dist\core\core.service.js)
    at Bot.emit (node:events:537:28)
    at SteamUser.<anonymous> (C:\project\dist\core\bot.js)
    at SteamUser.emit (node:events:549:35)
    at ClientRequest.<anonymous> (C:\project\node_modules\steam-user\components\connection_protocols\tcp.js:87:15)
    at ClientRequest.emit (node:events:537:28)
    at Socket.socketErrorListener (node:_http_client:465:9)
    at Socket.emit (node:events:537:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
caused by: Error: read ECONNRESET
    at SteamUser.<anonymous> (C:\project\dist\core\bot.js)
    at SteamUser.emit (node:events:549:35)
    at ClientRequest.<anonymous> (C:\project\node_modules\steam-user\components\connection_protocols\tcp.js:87:15)
    at ClientRequest.emit (node:events:537:28)
    at Socket.socketErrorListener (node:_http_client:465:9)
    at Socket.emit (node:events:537: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)

error timestamp 1709395946535 (same as previous, so it happens right after previous handled error)

Error: Uncaught exception
    at process.<anonymous> (C:\project\dist\app.service.js)
    at process.emit (node:events:537:28)
    at process.processEmit [as emit] (C:\project\node_modules\signal-exit\index.js:199:34)
    at process._fatalException (node:internal/process/execution:167:25)
caused by: Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
mdf45 commented 7 months ago

Same problem.. Any solutions?

DoctorMcKay commented 2 months ago

Should be fixed in 5.1.0