Not yet, but it will.
Maybe this is a little vague, I'll try to rewrite it. This is only talking about a case where you supply a token that wasn't generated using EAuthTokenPlatformType.SteamClient. If the token is invalid for any other reason, you'll get the normal error event with an EResult value (probably InvalidPassword, but I haven't checked).
Thanks for the quick response!
Sure, these versions were used the last time the error occurred (2022-07-04):
OS: Arch Linux 5.15.55-1-lts
My bot: BETA 2.12 b8 (Repo at the point of commit)
node.js: 16.13.1
steam-user: 4.24.3
steam-crypto: 1.2.0
steamcommunity: 3.44.1
One more interesting thing I just noticed in my log:
There was one time (out of 5 since 2022-05-22) where an account recieved a second different error as well and actually managed to relog fine.
(So 4 times since 2022-05-22 the behaviour above happend, one time this happened)
Log excerpt from connection loss until webSession event:
[2022-05-24 15:37:51 | INFO] [Bot 32] Lost connection to Steam. Reason: Error: Encrypted message authentication failed
[2022-05-24 15:37:51 | INFO] [Bot 32] Initiating a relog in 30 seconds.
[ERROR] Uncaught Exception Error! Reason: RangeError: Illegal range: 0 <= 8 <= 1208313696 <= 148
at ByteBuffer.module.exports.ByteBufferPrototype.slice (/steam-comment-service-bot/node_modules/bytebuffer/dist/bytebuffer-node.js:2764:23)
at SteamUser._handleNetMessage (/steam-comment-service-bot/node_modules/steam-user/components/03-messages.js:529:81)
at TCPConnection._readMessage (/steam-comment-service-bot/node_modules/steam-user/components/connection_protocols/tcp.js:194:13)
at Socket.emit (node:events:390:28)
at emitReadable_ (node:internal/streams/readable:578:12)
at onEofChunk (node:internal/streams/readable:556:5)
at readableAddChunk (node:internal/streams/readable:269:5)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:249:12)
[2022-05-24 15:37:51 | WARN] If the bot doesn't work correctly anymore after this error then please restart it!
[ERROR] Uncaught Exception Error! Reason: Error: error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length
at CipherBase.final (<anonymous>)
at Decipheriv._flush (node:internal/crypto/cipher:160:29)
at Decipheriv.final [as _final] (node:internal/streams/transform:112:25)
at callFinal (node:internal/streams/writable:694:27)
at prefinish (node:internal/streams/writable:719:7)
at finishMaybe (node:internal/streams/writable:729:5)
at Decipheriv.Writable.end (node:internal/streams/writable:631:5)
at Object.exports.symmetricDecrypt (/steam-comment-service-bot/node_modules/@doctormckay/steam-crypto/index.js:80:10)
at TCPConnection._readMessage (/steam-comment-service-bot/node_modules/steam-user/components/connection_protocols/tcp.js:185:27)
at Socket.emit (node:events:390:28)
[2022-05-24 15:37:51 | WARN] If the bot doesn't work correctly anymore after this error then please restart it!
[2022-05-24 15:38:21 | INFO] [Bot 32] Queueing for a relog. 0 other accounts are waiting...
[2022-05-24 15:38:22 | INFO] [Bot 32] It is now my turn. Waiting 2.5 seconds before attempting to relog...
[2022-05-24 15:38:25 | INFO] [Bot 32] Trying to relog with proxy 5...
[2022-05-24 15:38:26 | INFO] [Bot 32] Account logged in! Waiting for websession...
[2022-05-24 15:38:27 | INFO] [Bot 32] Got websession and set cookies.
[2022-05-24 15:38:27 | INFO] [Bot 32] Relog successful.
[2022-05-24 15:38:27 | INFO] [Bot 32] Accepting offline friend & group invites...
Maybe this helps in some way narrowing down the issue.
I'll try and force the protocol to WebSocket in the meantime as you suggested, however it's hard to see if it'll make a difference as the behaviour only occurrs roughly once a month.