Nicklason / tf2-automatic

A free and open source, fully automated TF2 trading bot, advertising on backpack.tf using prices from prices.tf
https://tf2automatic.com
MIT License
82 stars 41 forks source link

Bot crashes when an accepted trade includes non-TF2 items #84

Closed Senakhtenre closed 5 years ago

Senakhtenre commented 5 years ago

I believe this was reported on Discord a while ago but posting here just in case.

As stated in the title, whenever the bot accepts a trade that includes non-TF2 items (tested with Steam Cards and Dota 2 items) the bot will crash. Doesn't matter if the bot receives the items or is the one sending the items.

Can't test if the bot would accept a non-TF2 item on a trade as long as the prices of the TF2 items involved are correct and this could cause a crash.

14-12-2018 03:28:07 - info: Message sent to Senakhtenre (76561198009485070): Success! Your offer went through successfully. 14-12-2018 03:28:07 - trade: Offer #3394277708 successfully accepted 14-12-2018 03:28:07 - debug: Sorting inventory 14-12-2018 03:28:09 - error: tf2-automatic crashed! Please create an issue with the following log: crash: Automatic.version: 1.10.10; node: v10.13.0 linux x64; Contact: 76561198143595654 crash: Stack trace: TypeError: Cannot read property 'def_index' of undefined at getDefindex (/home/Senak/tf2-automatic/app/offer.js:205:45) at Function.getItem (/home/Senak/tf2-automatic/app/offer.js:57:23) at Object.createDictionary (/home/Senak/tf2-automatic/app/items.js:53:28) at /home/Senak/tf2-automatic/app/trade.js:1184:32 at manager._addDescriptions (/home/Senak/tf2-automatic/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:639:6) at TradeOfferManager._addDescriptions (/home/Senak/tf2-automatic/node_modules/steam-tradeoffer-manager/lib/assets.js:67:3) at SteamCommunity.manager._community.httpRequestGet (/home/Senak/tf2-automatic/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:635:17) at Request._callback (/home/Senak/tf2-automatic/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/home/Senak/tf2-automatic/node_modules/steamcommunity/node_modules/request/request.js:185:22) at Request.emit (events.js:182:13)

Nicklason commented 5 years ago

98