Okhttp: Android Crash (java.lang.IllegalStateException: closed)

Created on 3 Oct 2018  路  3Comments  路  Source: square/okhttp

I get AndroidRuntime: FATAL EXCEPTION sometimes. I can't catch the flow. But here are logs:

10-02 18:37:26.946 3708-4058/com.company.app E/AndroidRuntime: FATAL EXCEPTION: EventLoop Process: com.company.app, PID: 3708 java.lang.IllegalStateException: closed at com.squareup.okhttp.internal.ws.RealWebSocket.sendMessage(RealWebSocket.java:109) at com.hosopy.actioncable.Connection.doSend(Connection.java:221) at com.hosopy.actioncable.Connection.access$500(Connection.java:22) at com.hosopy.actioncable.Connection$3.run(Connection.java:165) at com.hosopy.concurrent.EventLoop$2.run(EventLoop.java:69) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

Please, help me with this issue.

All 3 comments

You can't send messages after you close the web socket.

But when I run the application from AndroidStudio everything is ok, it happens if I Install on a tablet from APK file.

Thanks for your question. This issue tracker is only for bug reports with test cases and feature requests. Please ask usage questions on Stack Overflow.
https://stackoverflow.com/questions/tagged/okhttp

Was this page helpful?
0 / 5 - 0 ratings