Describe the bug
I'm using Bitfinex.Net 5.0.0-alpha1.
I see a lot of KeyNotFound Exceptions.
The given key 'cs' was not present in the dictionary.
cs - WebSocket Checksum for Books and Row Books
I'm using SubscribeToRawOrderBookUpdatesAsync with limit 1. It works as expected.
But sometimes I see exceptions after trying to update existing orders.
To Reproduce
I can't reproduce it. In the new clean project, all works as expected.
2 clients
A few SubscribeToRawOrderBookUpdatesAsync on different symbols
One order with periodic price updates
Expected behavior
No exceptions.
Debug logging
dec 21 12:04:04 ser dotnet[21388]: 2021.12.21 12:04:04:232 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:04 ser dotnet[21388]: 2021.12.21 12:04:04:550 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:04 ser dotnet[21388]: 2021.12.21 12:04:04:620 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:04 ser dotnet[21388]: 2021.12.21 12:04:04:938 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:008 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:322 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:390 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:393 | Error | Bitfinex | Socket 2 unhandled exception during message processing: KeyNotFoundException - The given key 'cs' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Bitfinex.Net.Clients.BitfinexSocketClient.HandleQueryResponse[T](SocketConnection s, Object request, JToken data, CallResult`1& callResult)
at CryptoExchange.Net.BaseSocketClient.<>c__DisplayClass40_0`1.<QueryAndWaitAsync>b__0(JToken data)
at CryptoExchange.Net.Sockets.PendingRequest.CheckData(JToken data)
at CryptoExchange.Net.Sockets.SocketConnection.ProcessMessage(String data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.Handle[T](List`1 handlers, T data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.HandleMessage(Byte[] data, Int32 offset, Int32 count, WebSocketMessageType messageType)
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:703 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:767 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:05 ser dotnet[21388]: 2021.12.21 12:04:05:796 | Error | Bitfinex | Socket 2 unhandled exception during message processing: KeyNotFoundException - The given key 'cs' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Bitfinex.Net.Clients.BitfinexSocketClient.HandleQueryResponse[T](SocketConnection s, Object request, JToken data, CallResult`1& callResult)
at CryptoExchange.Net.BaseSocketClient.<>c__DisplayClass40_0`1.<QueryAndWaitAsync>b__0(JToken data)
at CryptoExchange.Net.Sockets.PendingRequest.CheckData(JToken data)
at CryptoExchange.Net.Sockets.SocketConnection.ProcessMessage(String data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.Handle[T](List`1 handlers, T data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.HandleMessage(Byte[] data, Int32 offset, Int32 count, WebSocketMessageType messageType)
dec 21 12:04:07 ser dotnet[21388]: 2021.12.21 12:04:07:594 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:07 ser dotnet[21388]: 2021.12.21 12:04:07:658 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:10 ser dotnet[21388]: 2021.12.21 12:04:10:995 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:11 ser dotnet[21388]: 2021.12.21 12:04:11:058 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:11 ser dotnet[21388]: 2021.12.21 12:04:11:631 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:11 ser dotnet[21388]: 2021.12.21 12:04:11:699 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:11 ser dotnet[21388]: 2021.12.21 12:04:11:749 | Error | Bitfinex | Socket 2 unhandled exception during message processing: KeyNotFoundException - The given key 'cs' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Bitfinex.Net.Clients.BitfinexSocketClient.HandleQueryResponse[T](SocketConnection s, Object request, JToken data, CallResult`1& callResult)
at CryptoExchange.Net.BaseSocketClient.<>c__DisplayClass40_0`1.<QueryAndWaitAsync>b__0(JToken data)
at CryptoExchange.Net.Sockets.PendingRequest.CheckData(JToken data)
at CryptoExchange.Net.Sockets.SocketConnection.ProcessMessage(String data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.Handle[T](List`1 handlers, T data)
at CryptoExchange.Net.Sockets.CryptoExchangeWebSocketClient.HandleMessage(Byte[] data, Int32 offset, Int32 count, WebSocketMessageType messageType)
dec 21 12:04:14 ser dotnet[21388]: 2021.12.21 12:04:14:537 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:14 ser dotnet[21388]: 2021.12.21 12:04:14:598 | Information | Bitfinex | Going to update order 81931594508
dec 21 12:04:20 ser dotnet[21388]: 2021.12.21 12:04:20:454 | Information | Bitfinex | Going to update order 81931594507
dec 21 12:04:20 ser dotnet[21388]: 2021.12.21 12:04:20:519 | Information | Bitfinex | Going to update order 81931594508
Describe the bug I'm using Bitfinex.Net 5.0.0-alpha1. I see a lot of KeyNotFound Exceptions. The given key 'cs' was not present in the dictionary. cs - WebSocket Checksum for Books and Row Books I'm using
SubscribeToRawOrderBookUpdatesAsync
with limit 1. It works as expected. But sometimes I see exceptions after trying to update existing orders.To Reproduce I can't reproduce it. In the new clean project, all works as expected.
SubscribeToRawOrderBookUpdatesAsync
on different symbolsExpected behavior No exceptions.
Debug logging