All Activity
- Last week
-
I let this script run on a new OVH VPS, so I don't think its a network issue. Couldn't ECONNRESET also be caused by the steam servers abruptly closing the connection while they are still doing their maintenance? The first econnreset it seemed to handle it fine and attempted the autoRelogin, but after it got the econreset from when it tried to reconnect it just exited I assume?
- Earlier
-
dawe started following HTTP error 403 when trying to relog after session expires
-
const SteamUser = require('steam-user'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const allowedSteamID = "blabla"; const SteamTotp = require('steam-totp'); // Import the steam-totp package const webhooklink = "link" const https = require('https'); class SteamBot { constructor(logOnOptions) { const self = this; // Store the reference to 'this' this.isLoggingIn = false; // Initialize the flag to indicate log-in status this.client = new SteamUser(); this.community = new SteamCommunity(); this.manager = new TradeOfferManager({ steam: this.client, community: this.community, language: 'en', pollInterval: 30000, useAccessToken: true }); this.client.setOption('autoRelogin', true); if (logOnOptions.sharedSecret) { const twoFactorCode = SteamTotp.getAuthCode(logOnOptions.sharedSecret); logOnOptions.twoFactorCode = twoFactorCode; // Include 2FA code in logOnOptions } this.client.logOn(logOnOptions); this.isLoggingIn = true; // Set the flag to true on first login attempt this.client.on('loggedOn', () => { console.log('Logged into Steam'); this.isLoggingIn = false; // Reset flag after successful login this.client.setPersona(SteamUser.EPersonaState.Online); }); this.client.on('friendRelationship', (steamID, relationship) => { // Check if we received a friend request if (relationship === SteamUser.Steam.EFriendRelationship.RequestRecipient) { console.log(`Accepting friend request from ${steamID.getSteam3RenderedID()}`); client.addFriend(steamID); // Automatically accept the friend request } }); this.client.on('webSession', (sessionID, cookies) => { this.manager.setCookies(cookies, (err) => { if (err) { console.error('Error setting cookies for TradeOfferManager:', err); } else { console.log('Cookies set for TradeOfferManager'); } }); this.community.setCookies(cookies); this.community.startConfirmationChecker(10000, '='); }); this.community.on("sessionExpired", async function (err) { if (err) { console.log('Session Expired: ' + err); } if (!self.isLoggingIn) { self.isLoggingIn = true; // Prevent concurrent logins // Check if the bot is connected to the Steam network if (self.client.steamID) { // Checks if logged on self.client.webLogOn(); console.log('called weblogon'); } else { console.log('Bot is not connected to the Steam network. Cannot call webLogOn.'); const lop = { accountName: "", // Replace with your Steam account name password: "#", // Replace with your Steam password sharedSecret: "=" // Optional: Only if your account has 2FA enabled }; // Check if 2FA is needed, generate the 2FA code if `sharedSecret` is provided if (lop.sharedSecret) { const twoFactorCode = SteamTotp.getAuthCode(lop.sharedSecret); lop.twoFactorCode = twoFactorCode; // Include 2FA code in logOnOptions } // Attempt to log in with the provided credentials self.client.logOn(lop); self.client.once('loggedOn', () => { self.isLoggingIn = false; // Reset flag after successful re-login }); self.client.on('error', (error) => { console.error("Login error:", error.message); // Send POST request to the Discord webhook if login fails const webhookUrl = "link"; const errorMessage = `Steam Bot Login Error: ${error.message}`; // Prepare the message payload for Discord const data = JSON.stringify({ content: errorMessage }); // Parse the webhook URL const url = new URL(webhookUrl); const options = { hostname: url.hostname, path: url.pathname + url.search, method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; // Send HTTPS request to Discord webhook const req = https.request(options, (res) => { console.log(`Discord webhook responded with status: ${res.statusCode}`); }); req.on('error', (e) => { console.error(`Problem with Discord webhook request: ${e.message}`); }); req.write(data); // Write data to request body req.end(); }); } } }); this.client.on('loginKey', (key) => { logOnOptions.loginKey = key; // Store login key for future logins console.log('Login key saved for future logins:', key); }); this.manager.on('newOffer', (offer) => { console.log('Incoming trade offer received'); // Log when a new offer is received if (offer.partner.getSteamID64() === allowedSteamID) { offer.accept((err, status) => { if (err) { console.error(`Unable to accept offer: ${err.message}`); } else { console.log(`Offer accepted: ${status}`); } }); } else { console.log(`Offer from unauthorized Steam ID: ${offer.partner.getSteamID64()}`); } }); } sendDepositTrade(assetIds, unique_code, tradeLink, steamID, callback) { //const { partner, token } = this.manager.getPartnerAndToken(tradeLink); const urlParams = new URLSearchParams(new URL(tradeLink).search); const partner = urlParams.get('partner'); // Extract the partner SteamID from the URL const token = urlParams.get('token'); // Extract the token from the URL const offer = this.manager.createOffer(tradeLink); this.manager.getUserInventoryContents(steamID, 730, 2, true, (err, inv) => { if (err) { console.log('Error fetching user inventory:', err); callback(err, false); // Invoke the callback with the error } else { const itemsToAdd = inv.filter((item) => { const itemAssetId = String(item.assetid); return assetIds && assetIds.includes(itemAssetId); }); if (itemsToAdd.length > 0) { //console.log('Items found in inventory matching assetIds:', itemsToAdd); itemsToAdd.forEach((item) => { offer.addTheirItem(item); //console.log("Added item to trade offer:", item); }); offer.setMessage(`Acceptera för omedelbar utbetalning via Swish. Verifieringskoden är: ${unique_code}`); offer.send((err, status) => { console.log("offer status " + status); if (err) { console.error('Error sending trade offer:', err); callback(err, false, offer); // Invoke the callback with the error } else { callback(null, true, offer.id); // Trade sent successfully } }); } } }); } } module.exports = SteamBot; With this code I get Session Expired: Error: HTTP error 403 upon session expiry
-
Sounds like you have some network issue.
-
Got this today, during steam routine downtime: [2024-11-12T23:09:31.673Z] [W1] WebSocket disconnected with error: read ECONNRESET [2024-11-12T23:09:31.673Z] [W1] Handling connection close [2024-11-12T23:09:31.673Z] 3: NoConnection [2024-11-12T23:09:31.673Z] Disconnecting without sending logoff [2024-11-12T23:09:31.673Z] [W1] We wanted to end connection, but it's not connected or connecting [2024-11-12T23:09:31.673Z] [EBO] Queueing exponential backoff "logOn" with timeout 1000 [2024-11-12T23:09:32.692Z] API GET request to https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/?format=vdf&cellid=14: 200 [2024-11-12T23:09:32.716Z] Randomly chose netfilter server 185.25.182.52:27017 (load = 28, wtd_load = 21.6530790328979492) [2024-11-12T23:09:32.716Z] [T31] Connecting to TCP CM: 185.25.182.52:27017 [2024-11-12T23:09:33.717Z] [T31] TCP connection timed out [2024-11-12T23:09:33.717Z] [T31] Ending connection and removing all listeners [2024-11-12T23:09:33.717Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:33.719Z] Randomly chose websockets server ext1-par1.steamserver.net:27024 (load = 26, wtd_load = 20.9230833053588867) [2024-11-12T23:09:33.719Z] [W37] Connecting to WebSocket CM ext1-par1.steamserver.net:27024 [2024-11-12T23:09:35.720Z] [W37] WS connection timed out [2024-11-12T23:09:35.720Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:35.721Z] Randomly chose websockets server ext1-par1.steamserver.net:27024 (load = 26, wtd_load = 20.9230833053588867) [2024-11-12T23:09:35.721Z] [W43] Connecting to WebSocket CM ext1-par1.steamserver.net:27024 [2024-11-12T23:09:39.723Z] [W43] WS connection timed out [2024-11-12T23:09:39.723Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:39.725Z] Randomly chose websockets server ext1-par1.steamserver.net:27033 (load = 26, wtd_load = 23.2615313529968262) [2024-11-12T23:09:39.725Z] [W52] Connecting to WebSocket CM ext1-par1.steamserver.net:27033 [2024-11-12T23:09:47.727Z] [W52] WS connection timed out [2024-11-12T23:09:47.727Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:47.728Z] Randomly chose websockets server ext1-par1.steamserver.net:27033 (load = 26, wtd_load = 23.2615313529968262) [2024-11-12T23:09:47.729Z] [W61] Connecting to WebSocket CM ext1-par1.steamserver.net:27033 [2024-11-12T23:09:57.730Z] [W61] WS connection timed out [2024-11-12T23:09:57.731Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:09:57.733Z] Randomly chose netfilter server 185.25.182.52:27017 (load = 28, wtd_load = 21.6530790328979492) [2024-11-12T23:09:57.733Z] [T70] Connecting to TCP CM: 185.25.182.52:27017 [2024-11-12T23:10:07.733Z] [T70] TCP connection timed out [2024-11-12T23:10:07.733Z] [T70] Ending connection and removing all listeners [2024-11-12T23:10:07.733Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:10:07.735Z] Randomly chose websockets server ext1-par1.steamserver.net:27019 (load = 27, wtd_load = 22.5226225852966309) [2024-11-12T23:10:07.735Z] Connecting to WebSocket CM ext1-par1.steamserver.net:27019 [2024-11-12T23:10:17.737Z] [W79] WS connection timed out [2024-11-12T23:10:17.737Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ [2024-11-12T23:10:17.738Z] Randomly chose websockets server ext1-par1.steamserver.net:27019 (load = 27, wtd_load = 22.5226225852966309) [2024-11-12T23:10:17.738Z] [W88] Connecting to WebSocket CM ext1-par1.steamserver.net:27019 [2024-11-12T23:10:18.798Z] [W88] WebSocket disconnected with error: read ECONNRESET [2024-11-12T23:10:18.799Z] [W88] Handling connection close [2024-11-12T23:10:19.799Z] [WebAPI] Using cached value for API_GET_https://api.steampowered.com/ISteamDirectory/GetCMListForConnect/v0001/ After 23:10 it did not do anything for 2 hours, so I just ended the process.
-
Anonymous logon and getPersonas to fetch account's avatar and name
The Meg replied to The Meg's topic in node-steam-user
Indeed, I logged on as a user and it works! Thank you! -
Anonymous logon and getPersonas to fetch account's avatar and name
Dr. McKay replied to The Meg's topic in node-steam-user
Most methods don't work if you log on anonymously. getPersonas probably isn't one that does. -
The Meg started following Anonymous logon and getPersonas to fetch account's avatar and name
-
The Meg joined the community
-
Steam login/dologin "steamLoginSecure" a way to get it?
cfselin replied to Alin Tabuci's topic in General
So have you solved this problem, i really want to know how to get this steamloginsecure value in webview. It is important to me. -
cfselin joined the community
-
Duodecim started following Exploring Steam Publishers and Filtering Options
-
Hi everyone, I’m trying to figure out if there's a way to access and filter Steam publishers based on specific criteria. Specifically, I’m looking to apply filters like region, game type, and other related attributes. Does anyone know of a method or tool that allows for this level of filtering or querying? Any guidance would be greatly appreciated! Thanks !
-
It is quite strange, as i can sign into Steam on the IP used by the bot (either via the PC client or the website) and perform actions and play games without getting the account locked if i do not use the bot. It is only when i use the bot, that the account will become locked after the bot logs in to Steam... Please advise on how to avoid this (like using the same machineId of my PC client or something) - it is really quite annoying to have to deal with these things...
-
dawe started following Sending trade via Steam trade url gives 404 error (SOLVED)
-
You can see exactly what's happening internally if you add a debug listener like so: user.on('debug', console.log)
-
I don’t think so, since no errors like RateLimitExceeded or Denied are being thrown. I don’t appear to be IP blocked, as I can restart all of them manually after steam downtime. They just fail to reconnect automatically for some reason and are not throwing any errors. Just wanna see if I can find out whats causing this
-
Hello All. I have started to develop a steam bot that uses the "node-steamcommunity" and "node-tf2" packages, but upon logging in to the bot with a Steam account - the account used becomes locked by Steam Support and when viewing the profile used by the bot while logged into Steam shows the message "Steam Support suspects your account may have been accessed by someone else. We are temporarily forcing your profile private as a security precaution. Please contact Steam Support so we can assist you. " This issue only occurs when i login with the bot. The bot performs nothing at the moment besides logging into Steam and setting the account as "EPersonaState.Online" and playing Team Fortress 2 in the "loggedOn" event. Here are my login options used by the bot: const SteamLoginOptions = { accountName: env.steam.username, password: env.steam.password, twoFactorCode: Steam2FA.generateAuthCode(env.steam.sharedSecret), dataDirectory: 'C:/steam_data', savePollData: true, machineIdFormat: SteamUser.EMachineIDType.PersistentRandom }; Please help in figuring out what i am doing wrong, this is getting quite annoying as i have already contacted Steam Support various times to unlock the account used by the bot.
-
Cheekyzzz reacted to a post in a topic: Steam-Session Authentication unusual attempt when login
-
PineapplePizza joined the community
-
If u are Using that many profiles on the same Ip Ofc u wil get ratelimited i suggest using proxies in the constructors of the steam user and community
-
You think im being rate limited with 50 profiles when steam goes down and they all try to reconnect? Last error received was: 3: NoConnection (steam went down) and after that nothing, but they also didn't automatically reconnect after steam went back up. I'd assume if it was being rate limited it would throw 84 RateLimitExceeded? Any thoughts on how I could debug this issue?
-
Hello ? Long time no see When using steam-session qr login method. Steam guard were updated and when login ipaddress not near by me. It is given unusual login attempt in mobile guard. Is there any way to avoid this error ? Feel free. Thank you for your attention.
-
Pillangók changed their profile photo
-
Pillangók joined the community
-
Williepouff started following node-steam-tradeoffer-manager v2.10.6
-
getPartnerInventoryContents() help
Dr. McKay replied to jckiller's topic in node-steam-tradeoffer-manager
Thanks for the info. This is caused by CS2 inventories that have items, but which have no items that are actually visible. The returned data looks like garbage because Valve. steamcommunity 3.48.5 fixes the error, instead returning an empty array. As of steam-tradeoffer-manager 2.11.7, you can use the deprecated TradeOffer.loadPartnerInventory() method to get those CS2 items. -
TradeOffer.loadPartnerInventory() now uses the trading endpoint which includes CS2 items that aren't normally visible This method is still deprecated and I discourage you from using it unless you absolutely must Full Changelog: v2.11.6...v2.11.7 View on GitHub
-
Fixed receiving "Malformed response" error when fetching a CS2 inventory that has no visible items Full Changelog: v3.48.4...v3.48.5 View on GitHub