Coder Social home page Coder Social logo

centrifuge-android's People

Contributors

fzambia avatar sammyvimes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

centrifuge-android's Issues

Support websocket connection close reason

Centrifugo sends Disconnect Advice in connection close reason (in Close Websocket frame). It's a JSON encoded string which contains 2 fields at moment, for example

{
  "reason": "shutting down",
  "reconnect": true
}

Client should follow this reconnect advice - if it's false then client should not attempt to reconnect.

Use golang as part of IOS and android clients

gomobile allows to easily compile for IOS and Android.

The low hanging fruit is to write the proxy client code in golang and cross compile it to IOS and android.
Its not hard these days.

This is a suggestion, because i have done this on other projects, but i dont use centrifugal, and dont have time to do it.

Fatal Exception: java.lang.UnsatisfiedLinkError centrifuge-android

We use centrifuge lib to communicate with Sockets. Everything works well but this code :

val credentials = Centrifuge.newCredentials(
getCurrentUserId(),
webSocketToken.timestamp,
EMPTY_STRING,
webSocketToken.token
)
throws this error, it only happens with android based on arm structure. Here is the output:

Fatal Exception: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.namba-_dbpnhlp0R3PyG4erhR_2w==/base.apk"],nativeLibraryDirectories=[/data/app/com.namba-_dbpnhlp0R3PyG4erhR_2w==/lib/arm64, /system/lib64, /vendor/lib64]]] couldn't find "libgojni.so"
at java.lang.Runtime.loadLibrary0 + 1012(Runtime.java:1012)
at java.lang.System.loadLibrary + 1669(System.java:1669)
at go.LoadJNI. + 23(LoadJNI.java:23)
at java.lang.Class.classForName(Class.java)
at java.lang.Class.forName + 453(Class.java:453)
at java.lang.Class.forName + 378(Class.java:378)
at go.Seq. + 28(Seq.java:28)
at go.Seq.touch()
at centrifuge.Centrifuge. + 11(Centrifuge.java:11)
at centrifuge.Centrifuge.newCredentials(Centrifuge.java)
at com.namba.websocket.CentrifugoWebSocketClient.createClient + 214(CentrifugoWebSocketClient.kt:214)
at com.namba.websocket.CentrifugoWebSocketClient$initClient$1.invokeSuspend + 145(CentrifugoWebSocketClient.kt:145)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith + 32(ContinuationImpl.kt:32)
at kotlinx.coroutines.DispatchedTask$DefaultImpls.run + 235(Dispatched.kt:235)
at kotlinx.coroutines.DispatchedContinuation.run + 81(Dispatched.kt:81)
at kotlinx.coroutines.scheduling.Task.run + 94(Tasks.kt:94)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely + 586(CoroutineScheduler.kt:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely + 60(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run + 732(CoroutineScheduler.kt:732)

Looking for repo maintainer

This repo needs maintainer, we need a help with current issues and migration to adapt Centrifugo v2 changes very soon.

java.lang.NullPointerException: ssl == null

I have exception
FATAL EXCEPTION: Centrifugo Process: pro.myburse.app, PID: 27180 java.lang.NullPointerException: ssl == null at com.android.org.conscrypt.NativeCrypto.SSL_set_timeout(Native Method) at com.android.org.conscrypt.SslWrapper.setTimeout(SslWrapper.java:101) at com.android.org.conscrypt.ActiveSession.invalidate(ActiveSession.java:147) at com.android.org.conscrypt.DelegatingExtendedSSLSession.invalidate(DelegatingExtendedSSLSession.java:120) at org.java_websocket.SSLSocketChannel2.close(SSLSocketChannel2.java:268) at org.java_websocket.WebSocketImpl.closeConnection(WebSocketImpl.java:453) at org.java_websocket.WebSocketImpl.eot(WebSocketImpl.java:511) at org.java_websocket.client.WebSocketClient.interruptableRun(WebSocketClient.java:249) at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:188) at java.lang.Thread.run(Thread.java:764)
on centrifugo.disconnect()
Probke is not only in exception - I can't catch it

no have send method ?

i want to send message to centrifuge service , but library project Centrifugo.java no have sendMsg method ?

add sendMessage method in Centrifugo.java ?

Handshake error

When connect to secure server (wss) i get the error:
I/CentrifugoClient: onClose: -1, draft org.java_websocket.drafts.Draft_17@bc1f8b0 refuses handshake, false.

SSL certificate issue?

can not connect

After I call centrifugo.connect(); ,it does not work.And It never call ConnectionListener whether the server can not achieve.

Fatal exception

Fatal Exception: or
at org.java_websocket.WebSocketImpl.send(SourceFile:566)
at org.java_websocket.WebSocketImpl.send(SourceFile:543)
at org.java_websocket.client.WebSocketClient.send(SourceFile:171)
at com.centrifugal.centrifuge.android.Centrifugo$Client.access$201(SourceFile:496)
at com.centrifugal.centrifuge.android.Centrifugo$Client$3.run(SourceFile:587)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

@SammyVimes could you look at this?

java.net.SocketTimeoutException: failed to connect to ... after 90000ms

I have gotten this exception several times
bcore.io.IoBridge.connectErrno (IoBridge.java:189) libcore.io.IoBridge.connect (IoBridge.java:127) libcore.io.IoBridge.connect (IoBridge.java:115) java.nio.SocketChannelImpl.connect (SocketChannelImpl.java:199) org.java_websocket.client.WebSocketClient.interruptableRun (WebSocketClient.java:210) org.java_websocket.client.WebSocketClient.run (WebSocketClient.java:188) java.lang.Thread.run (Thread.java:818)

Test with Centrifugo v1.6.0

We just released Centrifugo v1.6.0 - it has no client protocol backwards incompatible changes, but has some protocol optimizations.

To be more concrete: Centrifugo can return single object response now where it returned array of objects in response to command before. For example in connect response. Client should already handle this as it's a protocol requirement to work both with array and single object responses.

@SammyVimes could you test it with Centrifugo v1.6.0? Hopefully it will just work. I can not do this myself unfortunately as I am too far from Android world.

document how to subscribe on private channel

As far as I can see there are 2 methods one and two in subscription object so it's possible to set private sign. But to create sign users also need to know client ID of current connection.

@SammyVimes could you document how to do private channel subscription?

Subscription error: permission denied

After reconnecting and and re-subscribing to the channel receives permission denied error. And then works only on a new session (centrifuge re-initializing). Unfortunately, there are no clear steps to reproduce, happens randomly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.