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

Cannot convert undefined or null to object #56

Closed Mark7888 closed 6 years ago

Mark7888 commented 6 years ago

crash: Automatic.version: 1.9.0; node: v10.9.0 win32 x64; Contact: 76561198856342890 crash: Stack trace: TypeError: Cannot convert undefined or null to object at values () at Schema.getQuality (C:\Users\acer\Desktop\bot\tf2 automatic\node_modules\tf2-items\lib\schema.js:98:17) at Object.getQuality (C:\Users\acer\Desktop\bot\tf2 automatic\app\items.js:120:25) at Function.getItem (C:\Users\acer\Desktop\bot\tf2 automatic\app\offer.js:74:32) at Object.createDictionary (C:\Users\acer\Desktop\bot\tf2 automatic\app\items.js:53:28) at update (C:\Users\acer\Desktop\bot\tf2 automatic\app\inventory.js:81:24) at save (C:\Users\acer\Desktop\bot\tf2 automatic\app\inventory.js:71:5) at C:\Users\acer\Desktop\bot\tf2 automatic\app\inventory.js:62:18 at SteamCommunity. (C:\Users\acer\Desktop\bot\tf2 automatic\node_modules\steamcommunity\components\users.js:484:5) at Request._callback (C:\Users\acer\Desktop\bot\tf2 automatic\node_modules\steamcommunity\components\http.js:67:15)

Nicklason commented 6 years ago

Try and do a fresh install of the bot and modules, move the temp folder to the new install.

Anton-Beresansky commented 6 years ago

I have made new install and copied files from old temp folder. Btw, what's wrong with those permissions to that temp folder?..

administrator@HV-SteamTradeBot:~/TRADEBOTS/tf2automatic/M_automatic$ node ./automatic.js
22-10-2018 11:40:07 - info: tf2-automatic v1.9.1 starting
22-10-2018 11:40:07 - info: Connecting to Steam...
22-10-2018 11:40:08 - info: Logged onto Steam!
22-10-2018 11:40:12 - warn: Error writing poll data: Error: EACCES: permission denied, open 'temp/polldata.json'
22-10-2018 11:40:17 - error: tf2-automatic crashed! Please create an issue with the following log:
crash: Automatic.version: 1.9.1; node: v8.10.0 linux x64; Contact: 76561198051577899
crash: Stack trace:
TypeError: Cannot convert undefined or null to object
    at values (<anonymous>)
    at Schema.getQuality (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/node_modules/tf2-items/lib/schema.js:98:17)
    at Object.getQuality (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/items.js:120:25)
    at Function.getItem (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/offer.js:74:32)
    at Object.createDictionary (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/items.js:53:28)
    at update (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/inventory.js:81:24)
    at save (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/inventory.js:71:5)
    at /home/administrator/TRADEBOTS/tf2automatic/M_automatic/app/inventory.js:62:18
    at SteamCommunity.<anonymous> (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/node_modules/steamcommunity/components/users.js:484:5)
    at Request._callback (/home/administrator/TRADEBOTS/tf2automatic/M_automatic/node_modules/steamcommunity/components/http.js:67:15)
22-10-2018 11:40:17 - error: Create an issue here: https://github.com/Nicklason/tf2-automatic/issues/new

UPD. the problem solved by following instructions in the discord #announcements

Update the bot and modules, you also need to download this file and move it into the temp folder https://www.dropbox.com/s/pvpbm8ew5ltqjss/schema.json?dl=0

Nicklason commented 6 years ago

The problem has been fixed in a newer version, I am not sure about your problem @Anton-Beresansky

Nicklason commented 6 years ago

@Anton-Beresansky Your problem has been fixed too