You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @eoinsha ! First of all thank you so much for this chat example. I've been using it to create my own version. I had a problem trying to connect the socket. Literally the problem happens when i call connect() method. Here is the error stacktrace:
WebSocket connection error java.net.ProtocolException: Expected HTTP 101 response but was '200 OK' at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:122) at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41) at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 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:818)
Searching for a while i found this problem was reported in another example. I tried to change the host in config.exs file. However, there wasn't a good result . So i was wondering if there was something missing within UserSocket module, maybe in the connect function related with the HTTP status send to the client. But i'm not sure if there is the problem. Thanks for your time, in the meantime i'm going to keep searching.
Hi @eoinsha ! First of all thank you so much for this chat example. I've been using it to create my own version. I had a problem trying to connect the socket. Literally the problem happens when i call
connect()method. Here is the error stacktrace:WebSocket connection error java.net.ProtocolException: Expected HTTP 101 response but was '200 OK' at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:122) at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41) at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 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:818)Searching for a while i found this problem was reported in another example. I tried to change the host in config.exs file. However, there wasn't a good result . So i was wondering if there was something missing within
UserSocketmodule, maybe in theconnectfunction related with the HTTP status send to the client. But i'm not sure if there is the problem. Thanks for your time, in the meantime i'm going to keep searching.