Skip to content
This repository has been archived by the owner on Mar 21, 2021. It is now read-only.

loadInventory error #26

Closed
esdeka opened this issue Jan 3, 2014 · 4 comments
Closed

loadInventory error #26

esdeka opened this issue Jan 3, 2014 · 4 comments

Comments

@esdeka
Copy link

esdeka commented Jan 3, 2014

Sometimes loading an inventory throws an error, mostly during peak hours (Steam returning an incomplete response?). Probably need to add some more body checks in loadInventory or mergeWithDescriptions.

TypeError: Object.keys called on non-object
    at Function.keys (native)
    at mergeWithDescriptions (/home/sam/node_modules/steam-trade/index.js:275:17)
    at SteamTrade.<anonymous> (/home/sam/node_modules/steam-trade/index.js:269:14)
    at Request.self.callback (/home/sam/node_modules/steam-trade/node_modules/request/request.js:129:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/home/sam/node_modules/steam-trade/node_modules/request/request.js:873:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/sam/node_modules/steam-trade/node_modules/request/request.js:824:12)
    at IncomingMessage.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
@seishun
Copy link
Owner

seishun commented Jan 3, 2014

That's weird, it does make sure body is an object. Could you wrap the call to callback on line 269 in a try block and output body in case of an error?

@kpachbiu88
Copy link

Да, есть такая ошибка!
Когда создаешь аккаунт, у него еще не создан инвентарь игры Дота 2 (он создается, когда заходишь в игру или когда получаешь вещь из игры Дота 2), тогда при вызове loadInventory(570, 2, callback) появляется такая ошибка!

@bendl
Copy link

bendl commented Jan 4, 2014

I came across this same error a few weeks ago when signing in with a different bot. I can't remember the issue on the request repository but one person suggested a temporary solution of using request version 2.27.0 instead of the latest request version. This worked for me.

npm install request@2.27.0

@seishun
Copy link
Owner

seishun commented Jan 22, 2014

I assume this is the issue that was fixed in 1114b57. Feel free to reopen if it reoccurs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants