JustArchiNET / ArchiSteamFarm

C# application with primary purpose of farming Steam cards from multiple accounts simultaneously.
Apache License 2.0
11.29k stars 1.05k forks source link

Do not send an trade offer (many accs) #88

Closed DemonAk closed 8 years ago

DemonAk commented 8 years ago

use last version 1.5pre2 I write command in the general chat !loot and after 10-30 seconds response 1: Nothing to send, inventory seems empty! 2: Nothing to send, inventory seems empty! 3: Nothing to send, inventory seems empty! 4: Nothing to send, inventory seems empty! 5: Nothing to send, inventory seems empty! .... Inventory from bots is not empty and open profile(inventory) and logs: 26.01.2016 20:19:57 [!!] WTF: GetInventory() <1> Request failed even after 5 tries, WTF? 26.01.2016 20:19:57 [!!] WTF: GetInventory() <2> Request failed even after 5 tries, WTF? 26.01.2016 20:19:57 [!!] WTF: GetInventory() <3> Request failed even after 5 tries, WTF? 26.01.2016 20:19:57 [!!] WTF: GetInventory() <4> Request failed even after 5 tries, WTF? 26.01.2016 20:19:57 [!!] WTF: GetInventory() <5> Request failed even after 5 tries, WTF? 26.01.2016 20:19:57 [!!] WTF: GetInventory() <6> Request failed even after 5 tries, WTF? .... When sending a chat bot separately, then everything is fine. Trade offer sent successfully I think need to solve the problem of delay after each bot sending trade offers in 1-2 seconds

Rudokhvist commented 8 years ago

If your machine or internet is slow enough, and bots have a lot of things in inventory this can cause such problems. After global config would be implemented it could be avoided then by setting a web timeout to higher value (was discussed here). But it can also be some limitation on volve side too, we need to investigate if further.

DemonAk commented 8 years ago

I have a good internet connection and a powerful computer. In bots 6-12 cards

Rudokhvist commented 8 years ago

Well, then it's volvo and we need a workaround.

Shmurdik commented 8 years ago

If you send a lot of requests simultaneously - steam banned trade requests. Request returns response "an error has occured sending your trade offer, please try again later (15)". Code 15 is AccessDenied.

Rudokhvist commented 8 years ago

@Shmurdik bot can't get inventory, not send trade request.

JustArchi commented 8 years ago

@Ryzhehvost

I don't have enough bots to test the root case, but if you do, you can test this issue. Personally I think that adding our workaround:

await Program.LimitSteamRequestsAsync().ConfigureAwait(false);

above https://github.com/JustArchi/ArchiSteamFarm/blob/master/ArchiSteamFarm/Bot.cs#L535 would solve the problem.

JustArchi commented 8 years ago

Question is if this is really enough and not just volvo causing fuckup, you already know how it works so I guess you can determine it yourself. I'd test it myself but I have only 2 bots and can't reproduce the issue.

Rudokhvist commented 8 years ago

Have only three bots, can't reproduce.

DemonAk commented 8 years ago

I will test...

DemonAk commented 8 years ago

Test with 5 sec, nothing happen (no message error or trade succes). Set 1 sec and Trade offer sent successfully. need more testing

JustArchi commented 8 years ago

If nobody else can reproduce this bug I consider it either volvo fuckup or user-specific bug, as there's no real reason why Valve would limit requests considering getting steam inventory. I could understand trade requests, but not getting steam EQ.

Ne3tCode commented 8 years ago

@JustArchi Do you know what this api is rate limited as well as others? ~30 requests/min and you will get an error 429.

JustArchi commented 8 years ago

How can I know that the API is rate limited if it's not documented anywhere, neither stated by anybody?

JustArchi commented 8 years ago

In this case we can just invent the same semaphore as we did with steam logins, just for the trading part.

Which part is rate-limited? The one that returns inventory, sending trade, or both?

DemonAk commented 8 years ago

I came across a limit not accepted offers, for example if you send 30 offers for the main account and do not accept them the 31 offer will give an error sorry for my english =(

Ne3tCode commented 8 years ago

Requesting inventory is limited. I don't know about the limits of trade offers but, if you make offers from bots too often, some of it may be missed on the main account.

DemonAk commented 8 years ago

ok, I tested with all my running accounts. All Trades offers sent successfully. Need a delay of 1 second.

DemonAk commented 8 years ago

Tested with 2 seconds, all Trades offers sent successfully. I think optimally would be 1.5 seconds.

JustArchi commented 8 years ago

https://github.com/JustArchi/ArchiSteamFarm/releases/tag/1.5.0.0-pre3

Please check the pre-release, rate limiting is set to 3 seconds now.

DemonAk commented 8 years ago

tested, it works fine

JustArchi commented 8 years ago

Good, this issue is considered fixed then. Thanks for your report.