You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need help to solve my problem with my program code. When I create a new message and receive a message from the server an error occurs. When sending a message successfully entered the server, but when receiving a message from a different client the Flutter application could not receive it with an error message:
I/flutter (12014): statusChangeCallback: ConnectionStatus.connectionError
I/flutter (12014): value:
I/flutter (12014): response: null
I/TextInputPlugin(12014): Composing region changed by the framework. Restarting the input method.
======== Exception caught by services library ======================================================
The following PlatformException was thrown during a platform message callback:
PlatformException(channel-error, The handler has 1 parameters, but there are 2 values., null, null)
When the exception was thrown, this was the stack:
#0 SignalR.onStatusChange (package:signalr_flutter/signalr_flutter.dart:46:7) #1 SignalRPlatformApi.setup. (package:signalr_flutter/signalr_api.dart:277:21) #2 SignalRPlatformApi.setup. (package:signalr_flutter/signalr_api.dart:270:35) #3 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:77:49) #4 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:76:47) #5 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:389:35) #6 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:386:46) #7 _invoke2. (dart:ui/hooks.dart:189:15) #11 _invoke2 (dart:ui/hooks.dart:188:10) #12 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5) #13 _Channel.push (dart:ui/channel_buffers.dart:132:31) #14 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17) #15 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:544:22) #16 _dispatchPlatformMessage (dart:ui/hooks.dart:83:31)
(elided 3 frames from dart:async)
Flutter Code Initial Connection
Flutter Code Method sendMessage
.Net Server Code
The text was updated successfully, but these errors were encountered:
The issue has been resolved. The method Send method in the ChatHub class has one argument/parameter with a String data type. To be able to retrieve more than one data, use Map<String, dynamic> to String.
Everything works fine in the debug environment. If you use the release version, you can connect to the server but cannot receive messages sent by the server. Have you encountered this situation?
I need help to solve my problem with my program code. When I create a new message and receive a message from the server an error occurs. When sending a message successfully entered the server, but when receiving a message from a different client the Flutter application could not receive it with an error message:
======== Exception caught by services library ======================================================
The following PlatformException was thrown during a platform message callback:
PlatformException(channel-error, The handler has 1 parameters, but there are 2 values., null, null)
When the exception was thrown, this was the stack:
#0 SignalR.onStatusChange (package:signalr_flutter/signalr_flutter.dart:46:7)
#1 SignalRPlatformApi.setup. (package:signalr_flutter/signalr_api.dart:277:21)
#2 SignalRPlatformApi.setup. (package:signalr_flutter/signalr_api.dart:270:35)
#3 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:77:49)
#4 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:76:47)
#5 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:389:35)
#6 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:386:46)
#7 _invoke2. (dart:ui/hooks.dart:189:15)
#11 _invoke2 (dart:ui/hooks.dart:188:10)
#12 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)
#13 _Channel.push (dart:ui/channel_buffers.dart:132:31)
#14 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)
#15 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:544:22)
#16 _dispatchPlatformMessage (dart:ui/hooks.dart:83:31)
(elided 3 frames from dart:async)
Flutter Code Initial Connection
Flutter Code Method sendMessage
.Net Server Code
The text was updated successfully, but these errors were encountered: