Closed pspsales closed 3 years ago
Updated the dependency in the beta release
Thanks, I believe the actual issue relates to the buffer size of WebSockets:
The value of the 'receiveBufferSize' parameter (5242880) must be less than or equal to 65536.
Parameter name: receiveBufferSize
Actual value was 5242880. - at System.Net.WebSockets.WebSocketHelpers.ValidateBufferSizes(Int32 receiveBufferSize, Int32 sendBufferSize)
at System.Net.WebSockets.ClientWebSocketOptions.SetBuffer(Int32 receiveBufferSize, Int32 sendBufferSize)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.CreateSocket()
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient..ctor(Log log, String url, IDictionary2 cookies, IDictionary
2 headers)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient..ctor(Log log, String url)
at Bittrex.Net.Sockets.BittrexHubConnection..ctor(Log log, ApiProxy proxy, HubConnection connection)
at Bittrex.Net.Sockets.ConnectionFactory.CreateWebsocket(Log log, String url)
at CryptoExchange.Net.SocketClient.CreateSocket(String address)
at Bittrex.Net.BittrexSocketClient.CreateSocket(String address)
at Bittrex.Net.BittrexSocketClient.GetSocketConnection(String address, Boolean authenticated)
at CryptoExchange.Net.SocketClient.
Error thrown at: Await Bittrex_socketClient.SubscribeToOrderUpdatesAsync(Sub(data As CryptoExchange.Net.Sockets.DataEvent(Of BittrexOrderUpdate)) DummySub())
Interesting, it seems .net framework has a max buffer size of 64kb while dotnet core and up doesn't seem to have a hard limit for max size. Can you confirm you're using .net framework?
Yes, to confirm I am using .NET Framework 4.7.2. When reverting to version 5.2.0 beta4: Method 'add_OnOrderPlaced' in type 'Bittrex.Net.BittrexClient' from assembly 'Bittrex.Net, Version=5.2.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation
Can you try with CryptoExchange.Net beta 8? Just install latest version of Bittrex.Net again and additionally install CryptoExchange.Net version beta8. I've adjusted the buffer size.
Awesome, this fixed it instantly, many thanks :) Edit - To note - only updated to CryptoExchange.Net beta 8 for this to fix.
Microsoft.AspNet.SignalR.Client 2.4.1 is failing at line 215 of BittrexSocketClient.cs with: System.MissingMethodException: 'Method not found: 'Void Microsoft.AspNet.SignalR.Client.Transports.ClientTransportBase.TransportFailed(System.Exception)'.'
Updating Microsoft.AspNet.SignalR.Client 2.4.2 resolves this issue, with adjustment to Line 71 of WebsocketcustomTransport.cs due to 'TransportFailed' not existing any longer.
Re-produce error in debug mode with Await client.SubscribeToOrderUpdatesAsync(...)