Page 1 of 1

TscHubConnection.Send results in InvalidDataException

Posted: Thu 12 Mar 2020 13:26
by oscar
Hi All,

Each function of our signalR server i've tried to call with the TcsHubConnection.Send, results in an exception: InvalidDataException: Unexpected end when reading JSON,
even functions that returns nothing (void).

Our signalR server is build using asp.net core 3.1, is the protocol used not compatible with TscHubConnection?
Any help would be appreciated.

Tia, Rj

Re: TscHubConnection.Send results in InvalidDataException

Posted: Fri 13 Mar 2020 10:01
by ViktorV
Unfortunately, we haven't been able to reproduce the issue.
In order for us to be able to give you a detailed answer, we need a sample demonstrating the behavior you mentioned. Therefore, please, compose a small sample demonstrating the described behavior and send it to us using the contact form https://devart.com/company/contactform.html

Re: TscHubConnection.Send results in InvalidDataException

Posted: Wed 25 Mar 2020 20:13
by rballz79
I get the same thing.

Fresh asp.net core web app, 3.1 -> added latest signalr. Simple ChatHub class with the following method:


Code: Select all

       
        public async Task SendMessage(string user, string message)
        {
            await Clients.All.SendAsync("ReceiveMessage", user, message);
        }
        
The following line of code causes the InvalidDataException->unexpected end reading json

Code: Select all

SignalRConnection.Register('SendMessage', DoMessageReceipt, [varString, varString]);
Comment the register line out and Start() gives no error - of course it also can't do anything with nothing registered...

Re: TscHubConnection.Send results in InvalidDataException

Posted: Wed 25 Mar 2020 20:45
by rballz79
Turned logging on Debug for SignalR.

Code: Select all

--> System.Text.Json.JsonReaderException:  The JSON object contains a trailing comma at the end which is not supported in this mode.  Change the reader options.  Linenumber: 0 | BytePositionInLine: 95.

Re: TscHubConnection.Send results in InvalidDataException

Posted: Thu 26 Mar 2020 09:46
by ViktorV
Please provide your license number and IDE version to us and we will send you a night build which may resolve the issue.

Re: TscHubConnection.Send results in InvalidDataException

Posted: Thu 26 Mar 2020 18:35
by rballz79
Sent via email, thank you

Re: TscHubConnection.Send results in InvalidDataException

Posted: Fri 27 Mar 2020 10:25
by ViktorV
We have answered you via e-mail.

Re: TscHubConnection.Send results in InvalidDataException

Posted: Sun 12 Apr 2020 09:37
by cointec
Hello,
Could you send me the latest version of Securebridge also in order to work with .Net Core 3.1.
Thanks

Re: TscHubConnection.Send results in InvalidDataException

Posted: Mon 13 Apr 2020 12:23
by ViktorV
We have answered you via e-mail.