TwoFactorCodeMismatch after many connections
Hello, I'm having a trouble with my single asf instance that runs about 400 bots now. After some time when almost all of the bots are connected there are a few random bots that can't connect in that run no matter what. Here are some pieces of log from today.
First attempt to connect, blown away
25/03/2016 12:25:32 [*] INFO: Start() <bot234> Starting... 25/03/2016 12:25:32 [*] INFO: OnConnected() <bot234> Connected to Steam! 25/03/2016 12:25:32 [*] INFO: OnConnected() <bot234> Logging in... 25/03/2016 12:25:33 [!] WARNING: OnLoggedOn() <bot234> Unable to login to Steam: InvalidPassword 25/03/2016 12:25:33 [*] INFO: OnDisconnected() <bot234> Disconnected from Steam! 25/03/2016 12:25:33 [*] INFO: OnDisconnected() <bot234> Will retry after 25 minutes...
No luck after almost 4 hours of reconnecting
25/03/2016 16:10:41 [*] INFO: OnDisconnected() <bot234> Reconnecting... 25/03/2016 16:10:41 [*] INFO: OnConnected() <bot234> Connected to Steam! 25/03/2016 16:10:41 [*] INFO: OnConnected() <bot234> Logging in... 25/03/2016 16:10:42 [!] WARNING: OnLoggedOn() <bot234> Unable to login to Steam: InvalidPassword 25/03/2016 16:10:42 [*] INFO: OnDisconnected() <bot234> Disconnected from Steam! 25/03/2016 16:10:42 [*] INFO: OnDisconnected() <bot234> Will retry after 25 minutes...
And then it just starts
25/03/2016 16:35:42 [*] INFO: OnDisconnected() <bot234> Reconnecting... 25/03/2016 16:35:42 [*] INFO: OnConnected() <bot234> Connected to Steam! 25/03/2016 16:35:42 [*] INFO: OnConnected() <bot234> Logging in... 25/03/2016 16:35:43 [!] WARNING: OnLoggedOn() <bot234> Unable to login to Steam: TwoFactorCodeMismatch 25/03/2016 16:35:43 [*] INFO: Stop() <bot234> Stopping...
Stopping and starting again won't help. I can use the !2fa of bot234 alright. I can run separate asf process with copy-pasted configs from "main" config folder and I'll work fine. In my current run I have 5 bots with the same problem, it's bot234, bot236, bot273, bot297 and bot299. It happened earlier when I used only about 200 bots.
Maybe you'll look into it.
You're hitting Valve limit of connected steam clients per IP, nothing will help you with that.
You can try increasing LoginLimiterDelay, althogh I doubt that it will help much with such massive amount of bots.
Why can I connect with the other asf instance from the very same network?
25.03.2016 20:51:33 [*] INFO: RefreshCMs() <Main> Refreshing list of CMs... 25.03.2016 20:51:33 [*] INFO: RefreshCMs() <Main> Success! 25.03.2016 20:51:33 [*] INFO: Start() <bot234> Starting... 25.03.2016 20:51:33 [*] INFO: OnConnected() <bot234> Connected to Steam! 25.03.2016 20:51:33 [*] INFO: OnConnected() <bot234> Logging in... 25.03.2016 20:51:34 [*] INFO: OnLoggedOn() <bot234> Successfully logged on! 25.03.2016 20:51:34 [*] INFO: Init() <bot234> Logging in to ISteamUserAuth... 25.03.2016 20:51:34 [*] INFO: Init() <bot234> Success! 25.03.2016 20:51:37 [*] INFO: IsAnythingToFarm() <bot234> Checking badges... 25.03.2016 20:51:37 [*] INFO: IsAnythingToFarm() <bot234> Checking first page... 25.03.2016 20:51:38 [*] INFO: IsAnythingToFarm() <bot234> Checking other pages... 25.03.2016 20:51:38 [*] INFO: StartFarming() <bot234> We don't have anything to farm on this account!
Why can I connect with the other asf instance from the very same network?
Ask Volvo. There is no limit inside ASF that would enforce you not being able to connect. There is no bug and nothing will get fixed - it's steam prohibiting your bots from logging in, not ASF.
@v3rg Do you use multiple ASF-Instances on the same IP succesfully? Just wondering I wasn´t able to connect more then 100-110 bots with 1 ASF-Instance for 1 IP.
@Pandiora Got a static ip. It takes about 4 hours to be fully online, but yeah.
@v3rg Yeah, I´m also having static ip´s (dedicated). But since I got the invalid-password error, everytime I tried to connect more then 107-110 bots, I had to run 2 ASF-instances with different outgoing ip´s.
Whats a lil bit weird for me: If you try to run the same amount of bots in your browser, you will also hit the same limit, but in this case you will exceed the max. header-size due to every steamMachine-Cookie is set for every of your accounts and your browser sends all of them on every request. (login)
I didn´t looked at the code, but maybe we could bypass that limit by sending different user-agents. But if you use different user-agents you get a 30-day tradehold. I don´t know how this works with those *.bin-Files but there could be a solution to this problem.
Also if you need 4(!) hours to connect all your bots, you must get a lot of "invalid password"-errors and you´re spamming the steam-servers. If Steam detects you´re using so much bots with one IP and abusing their services, this could lead to new protection-mechanisms sooner or later. Even if Steam allows Multiaccounts, your case is extreme. Please think about using more IP´s if we can´t find a better solution.
@Pandiora Well, I've been using 200 bots when I first started using ASF. Plus one-two browser session and steam client. When I use my bots-browser to accept gifts etc I get "banned" pretty fast but it lasts about a minute or so. With ASF yeah, it takes time. I've added another 100 recently and it seems less stable now. Do you run your second ASF on other machine or just mask it somehow?
@v3rg No, I got me a second IP for my Dedicated Server, added a network-namespace and then started ASF by piping the traffic through this virtual network-adapter. This is much more stable then everything I tried before. I think it would be possible to use a proxy for this task, but it would be to unreliable due to proxys going offline or if they´re insecure. So if you want to automate this task you have to write or get a program that automatically gives you a list of actual proxys and restarting ASF if needed. ASF is running for 2 weeks now on my server and I can use my Steam-Client/Browser w/o problems. Also ASF is using other Cookies (*.bin-Files) than my browser/Client and theres no mechanism that prevents you from logging into the same account from multiple locations. (needed for Steam Inhome-Streaming)
What do you mean by "one-two browser session"? Using different user-agents to stay logged into multiple steam-accounts with your browser? I don´t understand what you mean by bots-browser?! Sounds like you coded your own program.
So, if you´re interested I can give you the commands to set up the network namespace. Not 100% sure if this will work for you but here it is (both of my IP´s point to eth0).
Set up Network Namespace (Debian):
ip netns add eth0_ns
ip link add v_eth0a type veth peer name v_eth0b
ip link set v_eth0a netns eth0_ns
ip netns exec eth0_ns ifconfig v_eth0a up 192.168.163.1 netmask 255.255.255.0
ifconfig v_eth0b up 192.168.163.254 netmask 255.255.255.0
ip netns exec eth0_ns route add default gw 192.168.163.254 dev v_eth0a
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.163.0/24 -o eth0 -j SNAT --to-source YOUR_2ND_IP
For testing purposes:
wget http://icanhazip.com -qO-
(should return your 1st IP)
ip netns exec eth0_ns wget http://icanhazip.com -qO-
(should return your 2nd IP)
Then you could start both ASF-Instances like this:
screen -S ASF1 -d -m mono /folder/ASF1/ASF.exe
ip netns exec eth0_ns screen -S ASF2 -d -m mono /folder/ASF2/ASF.exe
@Pandiora Thank you, I managed to set up 3 IPs for my farm. Works great. About browser, I use 64 version of Firefox called Waterfox along with a lot of profiles and cmd scripts, javascripts to do things. I don't use it much nowadays since ASF can do a lot of cool things e.g. accept gifts.
@v3rg Ok, this really sounds like your different profiles using different browser-agents. I'm glad it works with different IP's for you too now. And to give some feedback: ASF is running w/o a problem for over 1 month now. So it's really stable to use different IP's and avoid all these discussed problems. Currently Archi is stealing :D lots of my thoughts I wanted to achieve with my chrome-extension, but when I'm done it would be a good addition to ASF.