Jump to content
McKay Development

acceptConfirmationForObject Sometimes Doesn't Response


Recommended Posts

hello there,

i have a queue system for offers which allows maximum 60 seconds for an offer to get processed & accepted (gets queued again if requests fail somehow) but sometimes, after accepting an offer with the acceptConfirmationForObject() method, the callback takes really long to get triggered or it doesn't get triggered at all while the offer sucessfully got accepted within in seconds after calling the function.

sometimes, it just works fine and gets triggered after accepting as it should be.

 

is there anything i can do to fix this unreliability?

Edited by sergun
Link to comment
Share on other sites

2 hours ago, vrtgn said:

What is your code?


You may not be error handling. 

I do. Mostly, API doesn't response in time and I get timeout error from my queue system.

Sometimes, I get a 403. Offers always get successfully accepted though.

 

Also, I just realized that i was mentioning offer.accept method, not 2fa confirmation. Been a while since I touched my code, sorry for confusion.

So, it's a steamcommunity module related problem.

 

I meant the acceptConfirmationForObject method, doesn't response in time.

image.thumb.png.e168b8617bb1ba441feb43a5e3e8aa80.png

function confirm2FA(offerID) {
    return new Promise((resolve, reject) => {
        community.acceptConfirmationForObject(config.get('steam').identitySecret, offerID, function (err) {
            if (err) reject('Offer confirmation 2FA: ' + err);
            } else {
                resolve(true);  //  Offer is confirmed by 2FA
            }
        });
    });
}

 

Also, I just read that adding a small delay between accepting the offer and confirming 2FA would be better. I'll try this.

 

Just tried adding some delay, didn't change much. It seems that 2FA confirmation takes some time.

Edited by sergun
Link to comment
Share on other sites

This is just how Steam works, sadly. When you confirm an incoming trade offer, the confirmation request doesn't respond until all items have been exchanged. If a trade offer contains many items, it's very possible that the request will time out (30 seconds) before all items have been exchanged. In this situation, the trade will still complete in the background.

Link to comment
Share on other sites

23 minutes ago, Dr. McKay said:

This is just how Steam works, sadly. When you confirm an incoming trade offer, the confirmation request doesn't respond until all items have been exchanged. If a trade offer contains many items, it's very possible that the request will time out (30 seconds) before all items have been exchanged. In this situation, the trade will still complete in the background.

Thank you, I need to confirm that trade successfully got accepted because I'm keeping stats.

Should i watch receivedOfferChanged event for this purpose, instead of chaining everything?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...