Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

DeepstreamClient.close() throwing NullPointerException on Android 8(Oreo) #127

Open
sripati opened this issue Jul 19, 2018 · 3 comments
Open

Comments

@sripati
Copy link

sripati commented Jul 19, 2018

When we are closing the deepstream client on Android 8.1.1 version Application crashing.
PHONE_MODEL=Nexus 5X
STACK_TRACE=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)

Note: When the device is going to Offline, above crash is happening. This is only for Android Oreo and up.

@mannyhappenings
Copy link

I am also facing exact same issue on Android Oreo on MI A1.

Is there any workaround for this issue?

@sripati
Copy link
Author

sripati commented Aug 22, 2018

We need to upgrade Java-WebSocket:1.3.5 to Java-WebSocket:1.3.8. This issue is not coming from deepstream. It is coming from Java-WebSocket library. After upgraded Java-WebSocket:1.3.8, it was worked. We should wait to deepstream for upgrade the library. Otherwise we can do ourselves.

@mannyhappenings
Copy link

I updated the client from 1.3.5 to 1.3.8
It resolved Android Crash but something else breaking now.

Following exceptions occurred on devices:

Android 4.4.4 (SM-T116NY)

java.lang.NullPointerException: null
    at io.deepstream.JavaEndpointWebsocket$WebSocket.onError(JavaEndpointWebsocket.java:91)
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:396)
    at java.lang.Thread.run(Thread.java:841)

Android 5.0.1 (Micromax p680)

io.deepstream.DeepstreamException: CONNECTION_ERROR: Write error: ssl=0xb8e26fd0: I/O error during system call, Broken pipe
    at io.deepstream.DeepstreamClientAbstract.onError(DeepstreamClientAbstract.java:59)
    at io.deepstream.Connection$1.run(Connection.java:201)
    at java.util.Timer$TimerImpl.run(Timer.java:284)

Android 7.1.2(H96 Pro+)

io.deepstream.DeepstreamException: CONNECTION_ERROR: Write error: ssl=0xe69ac2c0: I/O error during system call, Broken pipe
    at io.deepstream.DeepstreamClientAbstract.onError(DeepstreamClientAbstract.java:59)
    at io.deepstream.Connection$1.run(Connection.java:201)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)

Can someone please suggest me some get around these issues until it's fixed for good?

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

No branches or pull requests

2 participants