Closed liquidthex closed 1 year ago
Mine broke sometime in the last few weeks. I was unable to fix it in any way. My original link was showing invalid password and when I tried clearing it all out and relinking my account, it ends up the same as yours. It asks for Steam Guard code and then does nothing. I tried multiple accounts, with both mobile app guard and e-mail guard, to no avail.
Imho Valve changed something that broke this for us.
Same problem here
Imho Valve changed something that broke this for us.
Maybe, but if you check your steam profile login history https://help.steampowered.com/en/accountdata/SteamLoginHistory the bot IS successfully logging in to the steam account.
Imho Valve changed something that broke this for us.
Maybe, but if you check your steam profile login history https://help.steampowered.com/en/accountdata/SteamLoginHistory the bot IS successfully logging in to the steam account.
Indeed logins are successful. I tried restoring my old database where I was logged in successfully and it throws invalid password like before.
There is a chance that it may have something to do with https://github.com/DoctorMcKay/node-steam-user/issues/333
But I don't understand it too well, so just speculating.
If it helps, adding this to src/index.ts:
client.on("loggedOn", function(loginKey) {
successResolve({
success: true,
data: {
accountName: username,
loginKey
}
});
});
Helps at least with adding the account and reporting a successful link. However, then it crashes with:
Mar-14 08:29:52.661 [MatrixPuppet:Steam] ESC[32minfoESC[39m: Adding new Puppet: puppetId=1
buffer.js:750
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Object
at new NodeError (internal/errors.js:322:7)
at Function.byteLength (buffer.js:750:11)
at BufferWriter.write_string_buffer [as string] (/opt/mx-puppet-steam/node_modules/protobufjs/src/writer_buffer.js:70:27)
at Type.CMsgClientLogon$encode [as encode] (eval at Codegen (/opt/mx-puppet-steam/node_modules/@protobufjs/codegen/index.js:50:33), <anonymous>:57:17)
at Type.encode_setup [as encode] (/opt/mx-puppet-steam/node_modules/protobufjs/src/type.js:485:25)
at Function._encodeProto (/opt/mx-puppet-steam/node_modules/steam-user/components/03-messages.js:343:16)
at SteamUser._send (/opt/mx-puppet-steam/node_modules/steam-user/components/03-messages.js:427:29)
at SteamUser._sendLogOn (/opt/mx-puppet-steam/node_modules/steam-user/components/08-logon.js:319:8)
at SteamUser.<anonymous> (/opt/mx-puppet-steam/node_modules/steam-user/components/02-connection.js:116:7)
at /opt/mx-puppet-steam/node_modules/steam-user/components/classes/HandlerManager.js:35:12 {
code: 'ERR_INVALID_ARG_TYPE'
}
mx-puppet-steam=# select * from puppet_store;
puppet_id | puppet_mxid |
data
| user_id | type | is_public | autoinvite | is_global_namespace
-----------+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+------+-----------+------------+---------------------
1 | @plantroon:plantroon.com | {"accountName":"mysteamacc","loginKey":{"eresult":1,"legacy_out_of_game_heartbeat_seconds":9,"heartbeat_seconds":9,"deprecated_public_ip":1542211048,"rtime32_server_time":1678781511,"account_flags":2637957,"cell_id":93,"email_domain":null,"steam2_ticket":null,"eresult_extended":null,"webapi_authenticate_user_nonce":"HiDd3N4Pr1V4CY","cell_id_ping_threshold":2147483647,"deprecated_use_pics":null,"vanity_url":"","public_ip":{"v4":1542211048},"client_supplied_steamid":"7656119800000066","ip_country_code":"SK","parental_settings":null,"parental_setting_signature":null,"count_loginfailures_to_migrate":0,"count_disconnects_to_migrate":0,"ogs_data_report_time_window":null,"client_instance_id":"31767651000000000","force_client_update_check":null,"agreement_session_url":null,"token_id":null}} | | 0 | 0 | 1 | 0
(1 row)
Whereas it used to look like this (when it worked):
mx-puppet-steam=# select * from puppet_store;
puppet_id | puppet_mxid | data | user_id | type | is_public | autoinvite | is_global_namespace
-----------+--------------------------+--------------------------------------------------------------+-------------------+------+-----------+------------+---------------------
1 | @plantroon:plantroon.com | {"accountName":"mysteamacc","loginKey":"HiDd3N4Pr1V4CY"} | 7656119800000066 | 0 | 0 | 1 | 0
(1 row)
If I start up with this old database, it throws this error:
[MatrixPuppet:Steam] error: Failed to start up puppet 1 Error: InvalidPassword
at SteamUser.<anonymous> (/opt/mx-puppet-steam/node_modules/steam-user/components/08-logon.js:662:16)
at /opt/mx-puppet-steam/node_modules/steam-user/components/classes/HandlerManager.js:35:12
at Array.forEach (<anonymous>)
at HandlerManager.emit (/opt/mx-puppet-steam/node_modules/steam-user/components/classes/HandlerManager.js:34:12)
at SteamUser._handleMessage (/opt/mx-puppet-steam/node_modules/steam-user/components/03-messages.js:635:25)
at SteamUser._handleNetMessage (/opt/mx-puppet-steam/node_modules/steam-user/components/03-messages.js:556:8)
at SteamUser._processMulti (/opt/mx-puppet-steam/node_modules/steam-user/components/03-messages.js:687:9) {
eresult: 5
}
It broke sometime this year. I definitely had it working around January and then I didn't really chat with anyone on Steam so I cannot tell.
The first argument to loggedOn is a CMsgClientLogonResponse object, not a login key. You get a login key from the loginKey event.
Yeah I used your tool completely wrong in my example, sorry. I was just trying to get to where it saves something to the db, if maybe that was the problem.
That's the thing, we cannot login with our old login keys (says invalid password) and if we try to relink accounts we aren't getting any response. It waits for some time after getting steam guard code and then silently fails. I tried many accounts and from 3 different residential ip addresses as I thought that I may be on some valve's blocklist after having it fail in the background for weeks. But that's not the case.
There's activity on something similar here: https://github.com/JustArchiNET/ArchiSteamFarm/issues/2840
@DoctorMcKay fixed this in node-steam-user 4.28.0. Just update the module, then it works with mx-puppet-steam without any code changes.
Available from ghcr.io/plantroon/mx-puppet-tox:master if people want to help test further. Not much I can fix though, somebody who knows JS/TS would be needed for fixing stuff :D
The best aproach might even be to rewrite the authentication mechanism to use node-steam-session module, as that one allows QR code or other web browser-based authentication and other goodies. Iirc such things work in Mautrix bridges for other services.
Okay, seems that the steam api shut down http and is now pure websocket. in above comment are a few ideas how to fix that. I think for the moment R.I.P. Steam Implementation for pidgin.
Okay, seems that the steam api shut down http and is now pure websocket. in above comment are a few ideas how to fix that. I think for the moment R.I.P. Steam Implementation for pidgin.
What are you saying though, is it already shut down? mx-puppet-steam still works fine for me (as of that fix by upstream). Or is this not related to mx-puppet-steam, just that it could affect it in the future?
What are you saying though, is it already shut down? mx-puppet-steam still works fine for me (as of that fix by upstream). Or is this not related to mx-puppet-steam, just that it could affect it in the future?
It's unrelated to mx-puppet-steam. Valve shut down the HTTP API endpoints used by the old app to access chat. CM connections (as used here) are unaffected.
Hello I'm trying to set up mx-puppet-steam but I've been working on it for hours now and I simply can not get it to link to my Steam account. The bot responds to me and I can issue the link command, I have Steam guard enabled on my mobile it pops up the code and I provide the code, but then nothing happens. The bot goes silent for a few moments and then just pretends like nothing happened / not linked. The console spits the error below if I send the bot any messages during the silent duration.
Errors in the mx-puppet-steam console output:
As well as several of these all the time:
Mar-13 06:46:46.011 [MatrixEventHandler] error: Puppet not found. Something is REALLY wrong!!!!
But what is confusing to me is that I don't seem to be getting any log messages from the src/steam.ts events should be "MatrixPuppet:Steam" but I get none of those in my console output (turned up to silly), at all.. And those seem like they'd be the most useful log entries :(
Any help would be greatly appreciated!