Open jasonItotal opened 2 years ago
This error cannot be reproduced, it may be caused by other reasons. Can you show detailed stack information?
I also have this error. Targeting ASP .Net Core 3.1 Any help solving the issue would be appreciated. I'm basically stuck.
System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan
1 bytes) at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.JsonDocument.Parse(ReadOnlySpan
1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack) at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedBytes) at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory
1 json, JsonDocumentOptions options) at System.Text.Json.JsonDocument.Parse(String json, JsonDocumentOptions options) at SocketIOClient.Messages.ConnectedMessage.Eio4Read(String msg) at SocketIOClient.Messages.ConnectedMessage.Read(String msg) at SocketIOClient.Messages.MessageFactory.CreateMessage(Int32 eio, String msg) at SocketIOClient.Transport.TransportRouter.OnTextReceived(String text) at System.Threading.Tasks.Task.<>c.b__139_1(Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
It looks like setting EIO = 3 in the SocketIOOptions fixed the issue.
Full Exception:
System.Text.Json.JsonReaderException: 'The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.'
This exception was originally thrown at this call stack: [External Code]
Target Framework: .Net Framework 4.7.2 Client side code sample:
Server side code sample: