AS-Devs / signalr_flutter

A flutter plugin for .net SignalR client.
https://pub.dev/packages/signalr_flutter
MIT License
18 stars 28 forks source link

SignalR Error: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT at path $ #56

Closed usa-12 closed 1 year ago

usa-12 commented 1 year ago

I code app reads data from SignalR Asp.Net. But I have an error when Received data from the hub throw plugin signalr_flutter. My connection is Success. The flutter connection is Ok. Flutter: ConnectionStatus.connected

The main issue is server-side sent messages through ConnectionStatus.connectionError and SignalR Error: java.lang.IllegalStateException: Expected STRING but was BEGIN_OBJECT at path $

rsyd29 commented 1 year ago

Your server side (.Net) sending returns should be with a string value, not an object. Because this package can only accept string values.

usa-12 commented 1 year ago

Changing on the server side is not an option because it is already a big app and would require lots of changes in the web project. Is there any alternate approach that we can use to support this?

usa-12 commented 1 year ago

You probably can. You need to fork the repo and change the native code related to receiving data from the server for both Android & iOS.