Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultExtension refuses handshake #20

Open
daimaXZ opened this issue Jul 26, 2018 · 10 comments
Open

DefaultExtension refuses handshake #20

daimaXZ opened this issue Jul 26, 2018 · 10 comments

Comments

@daimaXZ
Copy link

daimaXZ commented Jul 26, 2018

WebSockets: Closed. Code: 1002, Reason: draft Draft_6455 extension: DefaultExtension refuses handshake, Remote: false
why?

@ivanov84
Copy link

ivanov84 commented Aug 5, 2018

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

@farzinp7
Copy link

farzinp7 commented Aug 15, 2018

@Gurgen @daimaXZ I Have This Problem Too.
Haw to Fix it ?

@santhoshpulliman
Copy link

@Gurgen @ivanov84 Already I have this permissions, but getting handshake error.(Code: 1002)

@ivanov84
Copy link

@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.

@santhoshpulliman
Copy link

@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.

@ivanov84
Copy link

ivanov84 commented Sep 18, 2018

@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.

@ivanov84
Copy link

ivanov84 commented Sep 19, 2018

@santhoshpulliman it's needed some development in socket library. Please look at this:
aspnet/SignalR#2969 (comment)

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.

@ivanov84
Copy link

ivanov84 commented Sep 19, 2018

@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.

@ivanov84
Copy link

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

@spardo83
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants