sacOO7 / socketcluster-client-java

Native java and android client for socketcluster framework in node.js
http://socketcluster.io/
Apache License 2.0
94 stars 43 forks source link

Unable to connect #6

Closed heiba closed 7 years ago

heiba commented 7 years ago

Hello,

Here's my SocketCluster Kubernetes app scc.qurba.io

When I connect using your Android client on url "ws://scc.qurba.io/socketcluster/"

I get the following error

01-05 19:23:57.873 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: === Status Line === 01-05 19:23:57.873 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: HTTP Version = HTTP/1.1 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Status Code = 404 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Reason Phrase = Not Found 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: === HTTP Headers === 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: ConnectionKeep-Alive 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Content-Length27 01-05 19:23:57.874 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Content-Typetext/html; charset=utf-8 01-05 19:23:57.875 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: DateThu, 05 Jan 2017 17:24:09 GMT 01-05 19:23:57.875 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Servernginx/1.11.3 01-05 19:23:57.875 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: Strict-Transport-Securitymax-age=15724800; includeSubDomains; preload 01-05 19:23:57.875 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: X-Content-Type-Optionsnosniff 01-05 19:23:57.875 5249-5396/io.qurba.android.debugtool I/io.github.sac.Socket: X-Powered-ByExpress

If I connect to "ws://scc.qurba.io/", I get the following:

01-05 19:28:21.793 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: === Status Line === 01-05 19:28:21.793 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: HTTP Version = HTTP/1.1 01-05 19:28:21.793 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Status Code = 200 01-05 19:28:21.793 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Reason Phrase = OK 01-05 19:28:21.793 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: === HTTP Headers === 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Age0 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Cache-Controlpublic, max-age=0 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: ConnectionKeep-Alive 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Content-Encodinggzip 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Content-Typetext/html; charset=UTF-8 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: DateThu, 05 Jan 2017 17:28:33 GMT 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: ETagW/"a73-4172037613" 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Last-ModifiedThu, 05 Jan 2017 16:26:39 GMT 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Servernginx/1.11.3 01-05 19:28:21.794 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Strict-Transport-Securitymax-age=15724800; includeSubDomains; preload 01-05 19:28:21.795 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: Transfer-Encodingchunked 01-05 19:28:21.795 9948-10098/io.qurba.android.debugtool I/io.github.sac.Socket: X-Powered-ByExpress

In both cases, I don't get onConnected triggered nor onConnectError

sacOO7 commented 7 years ago

Ok , I will take a look at it. Make sure URL is correct. Try connecting from earlier jar file. If it's working, then I need to take a good look at code.

sacOO7 commented 7 years ago

The url is working from my PC.Try updating to latest client, it will surely work.The latest version can be added using gradle.

heiba commented 7 years ago

Thanks managed to connect fine now with /socketcluster appended. Perhaps it was a network issue my side.