Jump to content
McKay Development

Not receiving sentOfferChanged?


Recommended Posts

I have this code in my offers

offers.on('sentOfferChanged', function(offer, oldState) {
		logger.log("Offer #" + offer.id + " changed: " + TradeOfferManager.getStateName(oldState) + " -> " + TradeOfferManager.getStateName(offer.state));
		if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) {
			offer.getReceivedItems(function(err, items) {
				if (err) {
					console.log("Couldn't get received items: " + err);
				} else {
					var names = items.map(function(item) {
						return item.name;
					});

					logger.log("Received: " + names.join(', '));
			

				}
			});
		}
	});

As of this morning i'm not getting an event when I confirm my trade via my mobile app even though the trade was accepted and the items are now in the bots inventory.

 

Sometimes I will get an err eventually and i'll get this

Couldn't get received items: Error: Steam returned unsuccessful response

However, most trades I wont get anything. Is this a steam issue?

 

 

edit: here's my manager setting

	var offers = new TradeOfferManager({
		steam:        client,
		domain:       config.domain,
		language:     "en", 
		cancelTime:   300000
	});

I assume polling is automatic?

Edited by spock
Link to comment
Share on other sites

    "steam-tradeoffer-manager": "^1.22.0",

    "steam-user": "~1.13.0",

 

I upgrade both steam trade offer manager and steam user to the latest. Still not exactly working.

 

edit: I updated my OP with some more info

Edited by spock
Link to comment
Share on other sites

Here's the output after I do trade.send()

 

info: Trade offer sent successfully
then after I confirmed via mobile for the next few minutes I just see this:
 
Doing trade offer poll since 1460598432
Doing trade offer poll since 1460608495
Doing trade offer poll since 1460608543
Doing trade offer poll since 1 (full update)
Doing trade offer poll since 1460608543
Doing trade offer poll since 1460608543
Edited by spock
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...