pusher / pusher-websocket-android

Library built on top of pusher-websocket-java for Android. Want Push Notifications? Check out Pusher Beams!
MIT License
36 stars 12 forks source link

Crash: Attempted to create an connection state update where both previous and current state are: DISCONNECTED #51

Closed BelooS closed 5 years ago

BelooS commented 5 years ago

What is the issue?

Floating crash on android device

Is it a crash report? Submit stack traces or anything that you think would help

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.(ConnectionStateChange.java:21) at com.pusher.client.connection.websocket.WebSocketConnection.updateState(WebSocketConnection.java:152) at com.pusher.client.connection.websocket.WebSocketConnection.access$000(WebSocketConnection.java:28) at com.pusher.client.connection.websocket.WebSocketConnection$8.run(WebSocketConnection.java:309) at com.pusher.client.util.Factory$1.run(Factory.java:103) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)

... Seems that the issue still occurs https://github.com/pusher/pusher-websocket-java/issues/145

I'm using pusher-android 0.8.0. The crash is reproducible on Galaxy 8 android device and seems that the issue is in the core library

Could you please at least increase supported core library version (current is 1.6.0, but issue may be fixed in 1.8.0) and/or forward the issue to a core team?

ioanalaura12 commented 5 years ago

Hello,

We also encounter this exact same issue in our app:

Stack trace:

Fatal Exception: java.lang.IllegalArgumentExceptionAttempted to create an connection state update where both previous and current state are: DISCONNECTED at

com.pusher.client.connection.ConnectionStateChange.<init> (ConnectionStateChange.java:21)
com.pusher.client.connection.websocket.WebSocketConnection.updateState (WebSocketConnection.java:152)
com.pusher.client.connection.websocket.WebSocketConnection.access$200 (WebSocketConnection.java:28)
com.pusher.client.connection.websocket.WebSocketConnection$8.run (WebSocketConnection.java:309)
com.pusher.client.util.Factory$1.run (Factory.java:103)

We are using v 1.5.0, where this issue was supposed to be fixed from what I've read here.

The issue is reproducible on Android 6, 7, 8, 9.

Are you planning to fix this issue in the near future? Any kind of resolution from your side would be very helpful for us.

Thank you.

kn100 commented 5 years ago

Hey both!

I've got a test app which does not seem to exhibit this behaviour. I was testing on Android 9 on a Oneplus 5t.

Can you provide me a code snippet which triggers this issue?

kn100 commented 5 years ago

Hi all,

Since I was unable to reproduce this issue, I'm closing this issue. feel free to reopen so we can debug further if needed!