Closed connorlurring closed 9 years ago
is this a rare occurrence?
No, happens each time an offer is submitted.
That's 100% a Steam issue.
Is there any way to retrieve the new asset id other than inventory searching?
You could check inventory history. node-steamcommunity
has this feature. Not sure if it'll be in there though.
So what are we to do?
if(!this.tradeID) { makeAnError(new Error("Offer #" + this.id + " is accepted, but does not have a trade ID"), callback); return; } How is this even possible? It got offer id after checks for its existence.
there isn't really an answer if something on steam's end is broken for a period of time
this shouldn't be something persisting though. personally i've never seen it.
if you're asking for tips on how to handle a disaster situation like this in production, something you might want to try is monitoring the change in your own bot's inventory before and after the trade. keep in mind you need some kind of async series management or you have a potential race condition
https://gist.github.com/WeeSkilz/6e63955649d77f8151cc Am I right in thinking this is the way I should be trying to get the items?
misread on my phone, whoops
@2c2c He is waiting until either the callback of accept
or the event, as getReceivedItems
would return a different error if the offer isn't in the Accepted
state.
Edit: @WeeSkilz Didn't see your gist. Yes, that's correct.
If you check the API directly, does the offer have a trade_id
?
Using the event allowed access to the trade id. Not sure why though given I was already attpting to access in the callback.
I was too quick to blame Steam. Entirely my fault. Fixed in v1.8.4.
[Error: Offer #721136877 is accepted, but does not have a trade ID]
Error returned when calling
offer.getReceivedItems(function(err, items) { ... }
Results in items being undefined.