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

IllegalArgumentException in ConnectionStateChange.java: previous and current state are: DISCONNECTED #218

Open
Jeff11 opened this issue Aug 29, 2019 · 2 comments
Labels

Comments

@Jeff11
Copy link

Jeff11 commented Aug 29, 2019

Hi there,

I got a crash in ConnectionStateChange
using implementation 'com.pusher:pusher-java-client:2.0.0'

All crashes are happening on Android 9 systems and the previous and current state are always DISCONNECTED.

java.lang.IllegalArgumentException: Attempted to create an connection state update where both previous and current state are: DISCONNECTED
       at com.pusher.client.connection.ConnectionStateChange. + 4(ConnectionStateChange.java:4)
       at com.pusher.client.connection.websocket.WebSocketConnection.updateState + 155(WebSocketConnection.java:155)
       at com.pusher.client.connection.websocket.WebSocketConnection.access$200 + 27(WebSocketConnection.java:27)
       at com.pusher.client.connection.websocket.WebSocketConnection$8.run + 322(WebSocketConnection.java:322)
       at com.pusher.client.util.Factory$1.run + 109(Factory.java:109)
       at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run + 764(Thread.java:764)
@jtulley
Copy link

jtulley commented Sep 26, 2019

We are also seeing this, affecting a lot of our customers. We had a client version after the posted fix of 2 years ago, and updated to 1.8.2 with hopes that it would fix the problem, but it did not.

Is there anything that the user of pusher-websocket-java could do wrong to get in this state, or is it completely in the hands of the client?

@Deeptimay
Copy link

Deeptimay commented Apr 12, 2021

Hi I'm getting the same crash
Across all android devices majorly on android 10 and 11

I'm using api 'com.pusher:pusher-java-client:1.8.0'

Fatal Exception: java.lang.IllegalArgumentException: Attempted to create an connection state update where both previous and current state are: DISCONNECTED
       at com.pusher.client.connection.ConnectionStateChange.<init>(ConnectionStateChange.java:21)
       at com.pusher.client.connection.websocket.WebSocketConnection.updateState(WebSocketConnection.java:155)
       at com.pusher.client.connection.websocket.WebSocketConnection.access$200(WebSocketConnection.java:27)
       at com.pusher.client.connection.websocket.WebSocketConnection$8.run(WebSocketConnection.java:312)
       at com.pusher.client.util.Factory$1.run(Factory.java:109)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:761)

Any fix or suggestion for the same ?

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

No branches or pull requests

4 participants