sefidgaran / signalr_client

A Flutter SignalR Client for ASP.NET Core
https://pub.dev/packages/signalr_netcore
MIT License
71 stars 112 forks source link

Package not working with ssl api #27

Closed hasanozkaynak26 closed 2 years ago

hasanozkaynak26 commented 2 years ago

I'm working well with localhost applications, but when i connect to https url i gave error like this.

Here is log. I/flutter (13925): Starting HubConnection. I/flutter (13925): Starting connection with transfer format 'TransferFormat.text'. I/flutter (13925): Sending negotiation request: https://url:2600/notify/negotiate. I/flutter (13925): Selecting transport 'HttpTransportType.serverSentEvents'. I/flutter (13925): (SSE transport) Connecting. I/flutter (13925): SSE connected to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw&access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zeXN0ZW0iOiIxZDMyZGUwYi02MzQ5LTQzNGYtZmMxZi0wOGRhMTNlZjc0NjUiLCJuYW1laWQiOiIzNmYwYjcyOC01NjA4LTQ3MGItYjQ1ZS0zMWI1YjY4YTA0MTUiLCJuYmYiOjE2NTI0NDgzMjgsImV4cCI6MTY1NTA0MDMyOCwiaWF0IjoxNjUyNDQ4MzI4fQ.1nsEoT33fdsV00Mrukq963YGwGsgM4xUtH6CHS1oPKw I/flutter (13925): The HttpConnection connected successfully. I/flutter (13925): Sending handshake request. I/flutter (13925): (SSE transport) sending data. String data of length '32'. I/flutter (13925): (SSE transport) request complete. Response status: 200. I/flutter (13925): Using HubProtocol 'json'. I/flutter (13925): HttpConnection.stopConnection(Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw) called while in state ConnectionState.connected. I/flutter (13925): Connection disconnected with error 'Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw'. I/flutter (13925): HubConnection.connectionClosed(Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw) called while in state HubConnectionState.connecting. I/flutter (13925): Hub handshake failed with error 'Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw' during start(). Stopping HubConnection. I/flutter (13925): Call to HttpConnection.stop(Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw) ignored because the connection is already in the disconnected state. I/flutter (13925): HubConnection failed to start successfully because of error '{Exception: Failed to connect to [https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw.toString()}](https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw.toString()%7D)'. E/flutter (13925): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: Failed to connect to https://url:2600/notify?id=UvR4grgdVXNVH0cd4-Wqzw E/flutter (13925):

sefidgaran commented 2 years ago

Hi @hasanozkaynak26

Thanks for you report, I belive that this issue has been fixed in 1.3.2, please have a check. So I am ging to clsose this issue, let me know if the issue is still available.

Regards