redsolution / xabber-websocket

Standalone WebSocket connection manager needed to connect Xabber for Web to multiple different XMPP servers
https://www.xabber.com
GNU Affero General Public License v3.0
11 stars 7 forks source link

Unhandled exception error:undef in cowboy_stream:info(1, Msg, State) #4

Closed amirsafiallah closed 6 years ago

amirsafiallah commented 6 years ago

Hello, I installed xabber-websocket on Ubuntu 16.04, after successful compilation and run, it logs the following error when my browser tries to connect to it: note that this error is logged on server side (xabber-websocket) not on the browser:

16:30:21.571 [error] Unhandled exception error:undef in cowboy_stream:info(1, Msg, State) Stacktrace: [{cow_http,status_to_integer,"e",[]},{cowboy_stream_h,info,3,[{file,"src/cowboy_stream_h.erl"},{line,181}]},{cowboy_stream,info,3,[{file,"src/cowboy_stream.erl"},{line,129}]},{cowboy_http,info,3,[{file,"src/cowboy_http.erl"},{line,833}]},{cowboy_http,commands,3,[{file,"src/cowboy_http.erl"},{line,1050}]},{cowboy_http,loop,2,[{file,"src/cowboy_http.erl"},{line,209}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] Msg: {inform,101,#{<<"connection">> => <<"Upgrade">>,<<"date">> => <<"Fri, 01 Jun 2018 12:00:21 GMT">>,<<"sec-websocket-accept">> => <<"zefBykZvFOm2sloNXvtFIaHUKtU=">>,<<"sec-websocket-protocol">> => <<"xmpp">>,<<"server">> => <<"Cowboy">>,<<"upgrade">> => <<"websocket">>}} State: {cowboy_stream_h,{state,http,<0.524.0>,undefined,undefined,undefined,0,nofin,<<>>,0}} 16:30:21.571 [error] CRASH REPORT Process <0.523.0> with 0 neighbours crashed with reason: no match of right hand value false in cowboy_http:commands/3 line 1051 16:30:21.571 [error] Ranch listener http terminated with reason: no match of right hand value false in cowboy_http:commands/3 line 1051 16:31:31.854 [error] Unhandled exception error:undef in cowboy_stream:info(1, Msg, State) Stacktrace: [{cow_http,status_to_integer,"e",[]},{cowboy_stream_h,info,3,[{file,"src/cowboy_stream_h.erl"},{line,181}]},{cowboy_stream,info,3,[{file,"src/cowboy_stream.erl"},{line,129}]},{cowboy_http,info,3,[{file,"src/cowboy_http.erl"},{line,833}]},{cowboy_http,commands,3,[{file,"src/cowboy_http.erl"},{line,1050}]},{cowboy_http,loop,2,[{file,"src/cowboy_http.erl"},{line,209}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}] Msg: {inform,101,#{<<"connection">> => <<"Upgrade">>,<<"date">> => <<"Fri, 01 Jun 2018 12:01:31 GMT">>,<<"sec-websocket-accept">> => <<"3Hw4uAruMV6HBYciKfswJCnggdM=">>,<<"sec-websocket-protocol">> => <<"xmpp">>,<<"server">> => <<"Cowboy">>,<<"upgrade">> => <<"websocket">>}} State: {cowboy_stream_h,{state,http,<0.527.0>,undefined,undefined,undefined,0,nofin,<<>>,0}} 16:31:31.854 [error] CRASH REPORT Process <0.526.0> with 0 neighbours crashed with reason: no match of right hand value false in cowboy_http:commands/3 line 1051 16:31:31.855 [error] Ranch listener http terminated with reason: no match of right hand value false in cowboy_http:commands/3 line 1051

oxoWrk commented 6 years ago

Replace the string in Makefile dep_cowboy_commit = master with dep_cowboy_commit = 2.4.0 Do make distclean and make app again