Jump to content
McKay Development

TheMaster

Member
  • Posts

    28
  • Joined

  • Last visited

Everything posted by TheMaster

  1. 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,
  2. 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)
  3. 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
  4. 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
  5. 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
  6. mind sharing the code ur statement is too vague
  7. @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)
  8. 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
  9. 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
  10. 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
  11. 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
  12. NP, and definitely your choice this function and method automatically updates the access token when ever the websession is established and the plus point is that u dont need to write another function to me its more compact
  13. just use the getwebapi method in other libraries like node steam community async function getWebApiKey() { return new Promise((resolve, reject) => { community.getWebApiKey((err, key) => { if (err) { reject(err); } else { webapi=key console.log(green,"Got API key: " + webapi); resolve(key); } }); }); }
  14. are u sing this in this in the constructer?
  15. acutally u can listed to client.on wesbsession as it has the callback cookies u and the steam login secre cookie u can extract the access token from there ill give u the function to do that function extractJWTToken(tokenString) { const jwtRegex = /ey[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_.+/=]+/; const jwtToken = tokenString.match(jwtRegex); return jwtToken ? jwtToken[0] : null; } client.on('webSession', async (sessionID, cookies) => { //console.log(cookies) let jwtToken = extractJWTToken(cookies[0]) //console.log(jwtToken) cookiesformarket=jwtToken manager.setCookies(cookies, function(err) { //console.log(cookies) if (err) { console.log(red,err); process.exit(1); // Fatal error since we couldn't get our API key return; } safePromise(withTimeout(stayOnline(refreshToken, marketapi,cookiesformarket), 10000,"stayOnline")) // Adjust timeout as needed .catch(error => console.error(red,'Error staying online:', error)); // Error handling //webapi=manager.apiKey //fetchActiveTradeOffers(); // Call the function } ); can u testify my answer?
  16. hey what procedure do u use to automatically cancel trades after a certain amount of time?
  17. yo man thank u very much u sve me a lot of hassle how u found this tho? but when i use this the webapi is null its not getting the webapi correctly client.on('webSession', async (sessionID, cookies) => { manager.setCookies(cookies, function(err) { if (err) { console.log(red,err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log(green,"Got API key: " + manager.apiKey); webapi=manager.apiKey //fetchActiveTradeOffers(); // Call the function } );
  18. the NewOffers event in the steam trader offer manager no longer posts trader offers nor the trade status change after the cs2 update i think this need to be updated
  19. the issue is stated in the topic it appears randomly and i cant seem to find the cause never seen that error before
  20. understood sir one more question this is a utmost importance i am looking to automatically loginto websites using steam i found that steam uses OPENID2 but i have no clue how to loginto through steam using that are i have seen the node steam user and the community can u point me what to do here?
  21. ok i will set a timer to run that function ever 1 hour and let u know the results however this maybe a dumb question please excuse my ignorance but we are sending the client once to the steam-tradeoffer-manager if we webLogOn() this will update the client in the steam tradeoffer manager too or do we have to create a new object const steamOptions = { autoRelogin: true, httpProxy : proxy }; let client = new SteamUser(steamOptions); const communityOptions = {}; communityOptions.request = Request.defaults({ 'proxy': proxy }); let community = new SteamCommunity(communityOptions); let manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "localhost", // Our domain is example.com "language": "en" // We want English item descriptions });
  22. if (config.steam.acceptOffers) { // Accepts all offers empty from our side this.managers[config.steam.accountName].on("newOffer", (offer) => { if (offer.itemsToGive.length > 0 && !offer.isOurOffer) { // offer.decline(); } else { offer.accept(); } }); }
  23. think that the session is disconnected far too often while in client and the browser on which we are logged in the session dosent break for months i think that alot of sessions make and break also alert steam is there are a way to keep the session open for a long time as i can see there are a number of ways to sign into steam using steam-user P.S i am using the accname pass and the guard code for login also by using this approach for example i run my bot for 1 day the client we are sending over to steam-tradeoffer-manager expires and it begins to give error message Error= Not Logged IN
×
×
  • Create New...