Skip to content

IllegalArgumentException in ConnectionStateChange #54

@mrsasha

Description

@mrsasha

Hi, lately I've been seeing more and more of these and I don't see any way to stop them because they're inside your library. I already check the state and have put connect/disconnect calls inside try/catch.

Here's the complete stacktrace:
java.lang.IllegalArgumentException: Attempted to create an connection state update where both previous and current state are: CONNECTING at com.pusher.client.connection.ConnectionStateChange.<init>(ConnectionStateChange.java:20) at com.pusher.client.connection.websocket.WebSocketConnection.updateState(WebSocketConnection.java:131) at com.pusher.client.connection.websocket.WebSocketConnection.access$400(WebSocketConnection.java:26) at com.pusher.client.connection.websocket.WebSocketConnection$1.run(WebSocketConnection.java:63) 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:841)

Looking at your code, in WebSocketConnection.java you have an unchecked call from handleConnectionMessage and I think that's the culprit.

Do you know how I could prevent these from happening? We already have 2 crashes a day for this.

Thanks,
Sasa

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions