Failure after connecting to an Elixir node
mentels opened this issue · comments
** Cowboy handler epl_3d_EPL terminating in websocket_handle/3
for the reason error:undef
** Message was {text,<<"<6238.1374.0>">>}
** Options were []
** Handler state was undefined_state
** Request was [{socket,#Port<0.3495>},
{transport,ranch_tcp},
{connection,keepalive},
{pid,<0.184.0>},
{method,<<"GET">>},
{version,'HTTP/1.1'},
{peer,{{127,0,0,1},40159}},
{host,<<"localhost">>},
{host_info,undefined},
{port,8000},
{path,<<"/epl_3d_EPL">>},
{path_info,undefined},
{qs,<<>>},
{qs_vals,undefined},
{bindings,[]},
{headers,[{<<"host">>,<<"localhost:8000">>},
{<<"connection">>,<<"Upgrade">>},
{<<"pragma">>,<<"no-cache">>},
{<<"cache-control">>,<<"no-cache">>},
{<<"upgrade">>,<<"websocket">>},
{<<"origin">>,<<"http://localhost:8000">>},
{<<"sec-websocket-version">>,<<"13">>},
{<<"user-agent">>,
<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36">>},
{<<"accept-encoding">>,
<<"gzip, deflate, sdch, br">>},
{<<"accept-language">>,
<<"en-US,en;q=0.8,pl;q=0.6">>},
{<<"cookie">>,
<<"user_id=a9cf3ecd-6b04-42bb-9e94-8b05c81f1c6f; _tide_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYdnc1RnJ0cCtZVVhnMHFhZ01RbFM4QT09.K1vMyMqaQDdK-gTu5_7NV-E2vsJFHS83WxgFKQl7qjA; menuPosition=right-menu">>},
{<<"sec-websocket-key">>,
<<"7UxEOOT70mx0CRJLhQfXLQ==">>},
{<<"sec-websocket-extensions">>,
<<"permessage-deflate; client_max_window_bits">>}]},
{p_headers,[{<<"upgrade">>,[<<"websocket">>]},
{<<"connection">>,[<<"upgrade">>]}]},
{cookies,undefined},
{meta,[{websocket_version,13}]},
{body_state,waiting},
{multipart,undefined},
{buffer,<<>>},
{resp_compress,false},
{resp_state,done},
{resp_headers,[]},
{resp_body,<<>>},
{onresponse,undefined}]
** Stacktrace: [{epl,proplist_to_json,
[[{pid,<6238.1374.0>},
{current_function,{gen_server,loop,6}},
{initial_call,{proc_lib,init_p,5}},
{status,waiting},
{message_queue_len,0},
{messages,[]},
{links,
[<6238.1366.0>,<6238.1367.0>,#Port<6238.168573>,
<6238.1327.0>]},
{dictionary,
[{'$ancestors',
[<6238.1367.0>,'Elixir.Tide.Repo.Pool',
'Elixir.Tide.Repo','Elixir.Tide.Supervisor',
<6238.1363.0>]},
{'$initial_call',
{'Elixir.DBConnection.Connection',init,1}}]},
{trap_exit,false},
{error_handler,error_handler},
{priority,normal},
{group_leader,<6238.1362.0>},
{total_heap_size,4184},
{heap_size,2586},
{stack_size,9},
{reductions,536457},
{garbage_collection,
[{min_bin_vheap_size,46422},
{min_heap_size,233},
{fullsweep_after,65535},
{minor_gcs,1622}]},
{suspending,[]}]],
[]},
{epl_3d_EPL,websocket_handle,3,
[{file,"src/epl_3d_EPL.erl"},{line,60}]},
{cowboy_websocket,handler_call,7,
[{file,"src/cowboy_websocket.erl"},{line,528}]},
{cowboy_protocol,execute,4,
[{file,"src/cowboy_protocol.erl"},{line,522}]}]
Already fixed in erlanglab/epl_3d#1, please pull the latest deps and rebuild.
The epl_3d
version in the apps/epl/rebar.config has to be bumped appropriately.
Thanks, fixed.