-
Posts
91 -
Joined
-
Last visited
Everything posted by TheMaster
-
hi i am facing code crashes on a few occasion for example when the steamcommunity has a 503 error means their server is down or when the steam user request time outs the problem is that it is inherent to the libraries once these occur the whole code crashes isnt it should have a backoff or retry mechanism? instead of the throwing of error whats teh fix to this? \node_modules\steam-user\node_modules\@doctormckay\stdlib\lib\promises\timeoutPromise.js:12 let err = new Error('Request timed out'); ^ Error: Request timed out at timeoutPromise (C:\Autoconfirmbot\node_modules\steam-user\node_modules\@doctormckay\stdlib\lib\promises\timeoutPromise.js:12:15) at HttpClient.request (C:\Autoconfirmbot\node_modules\steam-user\node_modules\@doctormckay\stdlib\lib\http\client\HttpClient.js:63:46) at SteamUser._apiRequest (C:\Autoconfirmbot\node_modules\steam-user\components\06-webapi.js:60:26) at SteamUser._doConnection (C:\Autoconfirmbot\node_modules\steam-user\components\09-logon.js:296:32) at Timeout._onTimeout (C:\Autoconfirmbot\node_modules\steam-user\components\09-logon.js:311:27) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) Emitted 'error' event on SteamUser instance at: at SteamUser._doConnection (C:\Autoconfirmbot\node_modules\steam-user\components\09-logon.js:309:10) at runNextTicks (node:internal/process/task_queues:60:5) at listOnTimeout (node:internal/timers:540:9) at process.processTimers (node:internal/timers:514:7)
-
Invalid input SteamID [object Object]
TheMaster replied to ggforces's topic in node-steam-tradeoffer-manager
brother in order to send the tradeoffer u need the trade link the assetid of the item u want to send and a message i srsly dont know y u are parsing steam if so many times ifu have the complete trade url just use that if the partner in the trade url is missing and u need it then parse thesteamid 64 to get the id32 assuming u have the trade token already The error is caused due to u are calling the send offer with the wrong data most likely the steamid mistake or wrong format as ur error says or calling it where u are not supposed to or with incomplete data try to console,log what data are u sending when u are calling the send offer method. -
Exchange only with APIKEY and TradeLink
TheMaster replied to pedroflores's topic in node-steam-tradeoffer-manager
u are saying without login and pass then u are saying by logging in the site how u login ? -
steamcommunity.com's DNS records appear to have been wiped, preventing you from loading Steam Community (unless you have a cached DNS entry!). This was temporary and is now fixed
-
so this is the algorithm i think is possible as i dont have the trade id of the trade from the p2p website what i do is i check i modify the received offer changed event to get the trade offer id of the gift trade and then use the getOffer(id, callback) method to call the get exchange details method as it says in the wiki it must be created with the get offer or offers method right? TradeOffer is a class which represents an individual trade offer sent or received by your account. It cannot be instantiated directly, it must be created using TradeOfferManager#createOffer, TradeOfferManager#getOffer, or TradeOfferManager#getOffers.
-
then how to get the new asset ids i somewhere saw this mapping but cant remember the same get exchage details?
-
manager.on('receivedOfferChanged', function(offer, oldState) { console.log(green, `RECEIVED OFFER changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); // Extract asset IDs and market hash names of the received items if (offer.itemsToReceive && offer.itemsToReceive.length > 0) { offer.itemsToReceive.forEach(item => { console.log(`Received item asset ID: ${item.assetid}, Market Hash Name: ${item.market_hash_name}`); }); } else { console.log('No items received in this offer.'); } });
-
i have now resolved issue to listening received offerchange event when a n offer changes to accepted and is a gift then it extracts the id and send it to db is this approach ok?
-
they are one way trades like when u get trades from p2p market places i have read the description of the method this applies to two way trades i am asking about 1 way trades or in other words gift trades
-
my problem statement is i want to input the asset ids and the name of items in my database as soon as they are received what is the most fastest and efficient way to do that?
-
I want to map the asset ids of items that some in my inventory by that i mean i have a accept gifts function which accepts gift trades i want to see the new asset id of the item how can i do that without calling additional methods is this possible ?
-
yah thats what i told u noice work
-
I have treated the error on my end I was calling the send offer without checking partner so I fixed it I am suggesting that the error should be handled gracefully as u have written the error message but instead it crashes code Respectfully,
-
brother it is contained in the mafile created by SDA or setting up the account auth using the DR.mckay libraries (never used this way)
-
i am very sorry for the late reply it seemslike the the error was happening when i was calling the sendoffer function with in valid or incomplete details but instead of showing what was the cause it was crashing the program with the above error so i adjusted the main if statement on the new trade offer to if (!this.partner?.isValid || !this.partner?.isValid() || this.partner?.type != SteamID.Type.INDIVIDUAL) { throw new Error("Invalid input SteamID " + this.partner); } in this way we safely access or try to access the contents and dosent crashes the program
-
if have no clue what this error means it started coming suddenly my account is fine E:\Bots\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19 if (!this.partner.isValid || !this.partner.isValid() || this.partner.type != SteamID.Type.INDIVIDUAL) { ^ TypeError: Cannot read properties of undefined (reading 'isValid') at new TradeOffer (E:\Bots\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19:20) at TradeOfferManager.createOffer (E:\Bots\node_modules\steam-tradeoffer-manager\lib\index.js:506:14) at sendOffer (E:\Bots\Autoconfirmbot\mainimprovements.js:168:25) at WebSocket.incoming (E:\Bots\Autoconfirmbot\modules\shadowpaysell.js:116:17) at WebSocket.emit (node:events:520:28) at Receiver.receiverOnMessage (E:\Bots\node_modules\ws\lib\websocket.js:1209:20) at Receiver.emit (node:events:520:28) at Receiver.dataMessage (E:\Bots\node_modules\ws\lib\receiver.js:594:14) at Receiver.getData (E:\Bots\node_modules\ws\lib\receiver.js:496:10) at Receiver.startLoop (E:\Bots\node_modules\ws\lib\receiver.js:167:16) Node.js v22.1.0
-
can i create a trade offer with only the trade token of a user the website endpoint doesnot provide the steam id 32 or steam id 64 i an looking at this but we are still giving the steam id of user var offer = manager.createOffer(new TradeOfferManager.SteamID("76561198006409530"), "KYworVTM"); // trade token provided
-
mind sharing the code ur statement is too vague
-
@Dr. McKay idk y this error is arising C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19 if (!this.partner.isValid || !this.partner.isValid() || this.partner.type != SteamID.Type.INDIVIDUAL) { ^ TypeError: Cannot read properties of undefined (reading 'isValid') at new TradeOffer (C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:19:20) at TradeOfferManager.createOffer (C:\Autoconfirmbot\node_modules\steam-tradeoffer-manager\lib\index.js:506:14) at sendOffer (C:\Autoconfirmbot\mainimprovements.js:158:25) at Object.sellerforwax (C:\Autoconfirmbot\modules\waxpeer.js:26:11) at SteamUser.<anonymous> (C:\Autoconfirmbot\mainimprovements.js:317:13) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
-
i do know what an error code 503 means but the main question is how to handle this like to i implement a back off strat or like call log on again how should i handlethi because the script just stops at that point when the 503 comes
-
getting this error idk y this is caused and how to handle this C:\New folder\node_modules\steamcommunity\components\http.js:108 err = new Error("HTTP error " + response.statusCode); ^ Error: HTTP error 503 at SteamCommunity._checkHttpError (C:\New folder\node_modules\steamcommunity\components\http.js:108:9) at Request._callback (C:\New folder\node_modules\steamcommunity\components\http.js:50:61) at self.callback (C:\New folder\node_modules\request\request.js:185:22) at Request.emit (node:events:519:28) at Request.<anonymous> (C:\New folder\node_modules\request\request.js:1154:10) at Request.emit (node:events:519:28) at Gunzip.<anonymous> (C:\New folder\node_modules\request\request.js:1076:12) at Object.onceWrapper (node:events:633:28) at Gunzip.emit (node:events:519:28) at endReadableNT (node:internal/streams/readable:1696:12) { code: 503 } Node.js v21.7.1
-
ummm i have a problem idk y this is happening can anyone diagnose? the below is the only connection logic client.logOn(logOnOptions); client.on('loggedOn', function() { console.log(green,`Logged into Steam ${accname}`); }); setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); } },600000); // 10 mins 600000 setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); }else{ client.webLogOn(); } },3600000); // 1 hour 3600000 C:\New folder\node_modules\steam-user\components\09-logon.js:49 let alreadyConnectingError = new Error('Already attempting to log on, cannot log on again'); ^ Error: Already attempting to log on, cannot log on again at SteamUser.logOn (C:\New folder\node_modules\steam-user\components\09-logon.js:49:32) at Timeout._onTimeout (C:\New folder\mainimprovements.js:788:20) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) Node.js v21.7.1
-
well that seems like a bigger problem with your connection logic the session websession even is called when ever ur current websession expires its a automatic process and does not require ur intervention u need to look at ur reconnection or the weblogon etc stuff i think