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
Hello,
I've got into problems with gun, getting error during WebSocket communication:
05:02:57.569 [error] (<0.6553.0>) gen_statem <0.6553.0> in state connected terminated with reason: {{'function not exported',{gun_http,ws_send,6}},state_functions}
05:02:57.571 [error] (<0.6553.0>) gun_http:ws_send() CRASH REPORT Process <0.6553.0> with 0 neighbours crashed with reason: call to undefined function gun_http:ws_send({text,<<68,73,83,67,79,78,78,69,67,84,10,114,101,99,101,105,112,116,58,49,54,57,56,48,51,55,10,...>>}, {http_state,{sslsocket,{gen_tcp,#Port<0.427>,tls_connection,undefined},[<0.7039.0>,<0.7038.0>]},...}, #Ref<0.677379504.1938030593.128067>, <0.6552.0>, gun_default_event_h, undefined)
05:02:57.571 [error] (<0.408.0>) gun_http:ws_send() Supervisor gun_conns_sup had child gun started with {gun,start_link,undefined} at <0.6553.0> exit with reason call to undefined function gun_http:ws_send({text,<<68,73,83,67,79,78,78,69,67,84,10,114,101,99,101,105,112,116,58,49,54,57,56,48,51,55,10,...>>}, {http_state,{sslsocket,{gen_tcp,#Port<0.427>,tls_connection,undefined},[<0.7039.0>,<0.7038.0>]},...}, #Ref<0.677379504.1938030593.128067>, <0.6552.0>, gun_default_event_h, undefined) in context child_terminated
Can you post the code to reproduce? It looks like you are trying to call ws_send when you're still over HTTP, either the upgrade has not succeeded/completed or you haven't done the upgrade.
Hi essen,
you're probalbly right. It seems the process received gun_down and gun_up and did not upgrade to WS afterwards. I'll investigate further and will let you know in case I discover anything else.
You can close the issue (from my point of view), sorry for bothering.
The crash is not something nice to have it should error out instead. I think I got some todos but having the issue open is a good reminder for an eventual fix. Thanks for the report!
also hit this problem when the remote server started replying unexpectedly - i trtied to reconnect too many times and got rate-limited by the server, causing it to force disconnection when/after sending a message or something like that
Hello,
I've got into problems with gun, getting error during WebSocket communication:
crash.log:
I hope this can identify the problem.
I do use last (hex.pm) version of gun, dependency defined in rebar.config
on Debian Bookworm, Erlang version 1:25.2.3+dfsg-1
The text was updated successfully, but these errors were encountered: