Jump to content
McKay Development

Uncaught exceptions since 5.0.2


Argent1028

Recommended Posts

Hi, Starting from version 5.0.2, a bug appeared: when using unstable proxies, authorization stops working and nothing happened, could you add some handlers to reject them properly, for example, emit client error to catch them inside client.error handler ?

Uncaught (in promise) Error: socket hang up
    at connResetException (node:internal/errors:704:14)
    at Socket.socketOnEnd (node:_http_client:505:23)
    at Socket.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

node:_http_client:521 Uncaught (in promise) Error: Parse Error: Expected HTTP/
    at Socket.socketOnData (node:_http_client:521:22)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

When I revert to 5.0.1, errors are thrown in the client.on('error') handler

Edited by Argent1028
Link to comment
Share on other sites

Thanks, but I'm facing another problem: it gets stuck in an infinite loop when trying to get a list of servers. I have 10 accounts, the first 5-7 were successfully logged in, but all subsequent ones are stuck in this place. Maybe it would be better to share the CM list among all Steam user instances like it were before ?
I don't know why, but some accounts just couldn't load this list and got stuck at the GetCMListForConnect stage.

Link to comment
Share on other sites

I refactored the WebAPI client to use a different HttpClient so that I could add a timeout to it, but then forgot why I refactored it in the first place. 5.0.4 adds the timeout, which should fix the issue.

Sharing the CM list across multiple instances wouldn't be a bad idea, but it's not something I've got time for right now.

Link to comment
Share on other sites

Hi, I refactored code to share cmlist between instances, this significantly increased auth performance, could you implement this snippet into steam-user ? 

 

const PROTOCOL_VERSION = 65580;
const PRIVATE_IP_OBFUSCATION_MASK = 0xbaadf00d;
// create global variable at the start of the file
let cmListResponse

// request cm list only if cmListResponse is undefined

		if (!cmListResponse) {
			try {
				cmListResponse = await this._apiRequest(
					'GET',
					'ISteamDirectory',
					'GetCMListForConnect',
					1,
					getCmListQueryString,
					300
				);
			} catch (ex) {
				this.emit('debug', `GetCMListForConnect error: ${ex.message}`);
	
				if (++this._getCmListAttempts >= 10) {
					this.emit('error', ex);
				} else {
					setTimeout(() => this._doConnection());
				}
	
				return;
			}
		}

 

Edited by Argent1028
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...