AS-Devs / signalr_flutter

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

I can't receive hub events on ios. On android everything is working fine. #41

Open Deivid1071 opened 2 years ago

Deivid1071 commented 2 years ago

When starting the app in ios the signal is connected and keeps the connection, but I don't receive any event. If I keep android and ios receiving the same event, on android it is received but on ios not.

Is there any specific configuration for ios at this point to work well?

AyonAB commented 2 years ago

I recently rewrote the plugin using flutter pigeon with few breaking changes. Will push a pre-release version on the pub by tomorrow. Your problem should resolve in that, if not feel free to let me know. Will notify here once it goes live on pub.dev.

Deivid1071 commented 2 years ago

How amazing, thank you very much for your willingness and promptness, I'll wait to use the new version

AyonAB commented 2 years ago

A new pre-release version is released in pub.dev. Feel free to try it out.

Deivid1071 commented 2 years ago

Hi, thanks for the info, I used this new version and the behavior persists. I made a call with the Hub do signal but the event only arrived on the android and did not arrive on the ios simulator. The ios status was "ConnectionStatus.connected"

Do I need to enable some setting?

AyonAB commented 2 years ago

Did you get any error message on your console after the event is dispatched? Will look into it once I get some time.

Deivid1071 commented 2 years ago

I didn't get any error on the console, it just doesn't happen. I tried to run in the debug but nothing came up.

I understand, as soon as something new comes out I'll try again

AyonAB commented 2 years ago

Strange cause I tested on both debug and release mode and the events are arriving fine. Have you tried cleaning your project from vscode/android studio & xcode before trying the pre release version?

Deivid1071 commented 2 years ago

I just updated the plugin, I'll try again cleaning the project. I'm using a Mac M1 I don't know if this is relevant. I will try again later. thanks for the feedback

Deivid1071 commented 2 years ago

Hi, I tried again with a clean project and used the example from the pub dev itself, but I couldn't receive events. On the hub side would need to send something different to work on ios? thanks for the support

xalabax commented 2 years ago

Hello Have same problem on iOS for signalr_flutter: ^0.2.0-dev.2

flutter: @@@ ConnectionStatus.connecting
flutter: @@@ ConnectionStatus.connectionError
flutter: @@@ ConnectionStatus.disconnected

======== Exception caught by services library ======================================================
The following PlatformException was thrown during a platform message callback:
PlatformException(channel-error, ["source": Internal Server Error, "message": Error during start request. Stopping the connection.], 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.<anonymous closure> (package:signalr_flutter/signalr_api.dart:277:21)
#2      SignalRPlatformApi.setup.<anonymous closure> (package:signalr_flutter/signalr_api.dart:270:35)
#3      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:73:49)
#4      BasicMessageChannel.setMessageHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:72:47)
#5      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:379:35)
#6      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:376:46)
#7      _invoke2.<anonymous closure> (dart:ui/hooks.dart:205:15)
#11     _invoke2 (dart:ui/hooks.dart:204: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:92:31)
(elided 3 frames from dart:async)
====================================================================================================

For previous version i had same problem, but empty log

nikhilsingh834783 commented 1 year ago

@xalabax have you fixed this issue ? because i am facing same problem in ios.

nikhilsingh834783 commented 1 year ago

@AyonAB connection is not establishing in ios getting this error. SignalR Error: ["source": , "message": Error during start request. Stopping the connection.] Please help.

potumati commented 10 months ago

When starting the app in ios the signal is connected and keeps the connection, but I don't receive any event. If I keep android and ios receiving the same event, on android it is received but on ios not.

Is there any specific configuration for ios at this point to work well?

Deivid, did you find any solution?