DefaultExtension refuses handshake
WebSockets: Closed. Code: 1002, Reason: draft Draft_6455 extension: DefaultExtension refuses handshake, Remote: false why?
It worked for me after adding:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
and updating asp core to 2.1
@Gurgen @daimaXZ I Have This Problem Too. Haw to Fix it ?
@Gurgen @ivanov84 Already I have this permissions, but getting handshake error.(Code: 1002)
@santhoshpulliman After some updates on server or on mobile app I have again this error: WebSockets: Closed. Code: 1000, Reason: , Remote: false I will try to reinstall all stuff.
@ivanov84 Since new signalr version supports bare websocket connection without connectionId. I raised a pull request to set connectionId API call optional, but @Gurgen seems to be offline when I contacted him.
@santhoshpulliman I used it but the problem still exists. I think it can be connected with logic of connection. For example this code I often see after my request to signalr server.
@santhoshpulliman it's needed some development in socket library. Please look at this: https://github.com/aspnet/SignalR/issues/2969#issuecomment-422444772
Also I found this: https://github.com/aspnet/SignalR/tree/release/2.2/clients/java/signalr/src/main/java/com/microsoft/aspnet/signalr
I have some feelings that it may be connected with something in socket. If I connect 1st time - I load content without problems. But If I request the second call within 1 minut then "close" event fires.
If you have any idea please share it here. This task is my actual. Thank you in advance.
@santhoshpulliman I found my mistake. Sorry for the inconvenience. Mistake in my android app architecture. When I call a method from functions in main activity - it's ok. But if I call it from alert - "close" event in mConnection fires. Sorry to all who read it. I can delete these messages if you want. idk how to do.
Hello. Again me. If someone is interested in how I build architecture, then I answer - abstract base activity from here:
https://github.com/Nilhcem/android-websocket-example/tree/master/websockets-example/src/main/java/com/nilhcem/websockets
@ivanov84 how you fixed this issue?, the library has no support over 8 months and i'm trying to use it with net core signalr