Closed Andrew3019 closed 2 years ago
This error is probably coming from TradeOfferManager. Show me your TradeOfferManager constructor and versions.
+-- bytenode@1.1.7
+-- crypto@1.0.1
+-- globaloffensive@2.1.0
+-- steam-community@0.2.2
+-- steam-tradeoffer-manager@2.10.5
+-- steam-user@4.25.0
`-- sync-request@6.1.0
const SteamUser = require("steam-user");
const SteamTotp = require('steam-totp');
const SteamCommunity = require("steam-community");
const TradeOfferManager = require("steam-tradeoffer-manager");
const config = require('./../config.js');
// const { MemoryCookieStore } = require("tough-cookie");
const client = new SteamUser();
const community = new SteamCommunity();
const manager = new TradeOfferManager({
steam: client,
community: community,
language: "en",
});
// console.log(manager.username)
// console.log(manager.loadInventory)
const logOnOptions = {
accountName:config.accountName,
password:config.password,
twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret)
}
client.on('debug', (msg) => console.log(msg));
client.logOn(logOnOptions)
client.on("loggedOn", () => {
console.log('succesfully logged on: ' + client.steamID);
client.setPersona(SteamUser.EPersonaState.Online);
})
client.on('webSession', (sessionid, cookies) => {
manager.setCookies(cookies);
community.setCookies(cookies);
// community.startConfirmationChecker(30000, config.identity_secret);
console.log(cookies)
console.log("Getting offers...")
manager.getOffers("ActiveOnly", (err, sent, received) => {
if (err) throw err;
console.log("Results:")
console.log(sent)
console.log(received)
})
})
Ok, it seems like I downloaded steam-community
and not steamcommunity
My code:
Console output with debugging: