!api command called with WCF fails with 250 bots loaded.
C:\Users\User\Desktop\ASF>ASF.exe --client api
2017-03-02 23:32:24|ASF-3348|INFO|ASF|InitASF() ASF V2.2.3.1
2017-03-02 23:32:25|ASF-3348|INFO|ASF|IsRuntimeSupported() Your .NET runtime ver
sion is OK.
2017-03-02 23:32:25|ASF-3348|INFO|ASF|IsRuntimeSupported() Required version: 4.6
.1 | Found version: 4.6.2
2017-03-02 23:32:25|ASF-3348|INFO|ASF|SendCommand() Sending command: api to WCF
server on net.tcp://127.0.0.1:1242/ASF...
2017-03-02 23:32:25|ASF-3348|ERROR|ASF|HandleCommand() System.ServiceModel.Commu
nicationException: The maximum message size quota for incoming messages (65536)
has been exceeded. To increase the quota, use the MaxReceivedMessageSize propert
y on the appropriate binding element. ---> System.ServiceModel.QuotaExceededExce
ption: The maximum message size quota for incoming messages (65536) has been exc
eeded. To increase the quota, use the MaxReceivedMessageSize property on the app
ropriate binding element.
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.ClientDuplexConnectionReader.DecodeMessage(By
te[] buffer, Int32& offset, Int32& size, Boolean& isAtEOF, TimeSpan timeout)
at System.ServiceModel.Channels.SessionConnectionReader.DecodeMessage(TimeSpa
n timeout)
at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan time
out)
at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan ti
meout)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.Receive(TimeSpa
n timeout)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceive(Time
Span timeout, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message
, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at ArchiSteamFarm.IWCF.HandleCommand(String input)
at ArchiSteamFarm.Client.HandleCommand(String input)
2017-03-02 23:32:25|ASF-3348|INFO|ASF|ParsePostInitArgs() WCF response received:
C:\Users\User\Desktop\ASF>
Response for 1 bot has size about 900 chars. So it will fail with about 72 bots loaded.
This should be enough, I could simply ignore the limit entirely by pushing it to int.MaxValue, but I intentionally don't want to do that, as stated in the comment.
I do not recommend loading a single ASF instance with more than 255 bots, regardless.
It might be a good idea to add !api <Bots> instead.
I run into this on a single account because I have more than a thousand games to card.
The JSON response is 90-100 KB in a text file.
(the !api output is amazingly useful and by now there's a whole slew of things I do with it, it's just a bit convoluted to get it because I can't just WCF-grab it and pipe that to a file)
@Luckz There is no such limit in current ASF version, current limit is 262144 characters and it should be enough. If it's not, that's what !api <Bots> is for.
Does this require a specific WCFBinding setting (I'm on default) or Win8/Win10 OS (this is Win7)?
ASF V2.3.1.4 / runtime 4.6.2
No, shouldn't be the case, copy paste full ASF log from crash if you want me to look into that.
Like above:
2017-05-21 20:00:44|ASF-6044|INFO|ASF|InitASF() ASF V2.3.1.4
2017-05-21 20:00:44|ASF-6044|INFO|ASF|IsRuntimeSupported() Your .NET runtime version is OK.
2017-05-21 20:00:44|ASF-6044|INFO|ASF|IsRuntimeSupported() Required version: 4.6.1 | Found version: 4.6.2
2017-05-21 20:00:44|ASF-6044|INFO|ASF|SendCommand() Sending command: api lkz to WCF server on net.tcp://localhost:21339/ASF...
2017-05-21 20:00:45|ASF-6044|ERROR|ASF|HandleCommand() System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.ClientDuplexConnectionReader.DecodeMessage(Byte[] buffer, Int32& offset, Int32& size, Boolean& isAtEOF, TimeSpan timeout)
at System.ServiceModel.Channels.SessionConnectionReader.DecodeMessage(TimeSpan timeout)
at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)
at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.Receive(TimeSpan timeout)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceive(TimeSpan timeout, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ArchiSteamFarm.IWCF.HandleCommand(String input)
at ArchiSteamFarm.Client.HandleCommand(String input)
2017-05-21 20:00:45|ASF-6044|INFO|ASF|ParsePostInitArgs() WCF response received:
Normally I run --server as admin; with --client I tried both admin and non-admin, separate exe and same exe, using > to pipe to file and outputting to cmd window. All explode the same way.
@Luckz Try latest AppVeyor build and let me know if the issue is solved - if not, post new log 馃憤.
Thanks, that works well now. The client exe needs this fix; I didn't test if an older server exe as the sender works.
poor ASFui takes a very long while at 100% CPU core load trying to process the entire response :>
Most helpful comment
It might be a good idea to add
!api <Bots>instead.