<div dir="ltr">Hmm that helped, but now a different error about a compress param is showing up<div><br></div><div><div>Error in process <0.989.0> on node '<a href="mailto:example@127.0.0.1">example@127.0.0.1</a>' with exit value: {badarg,[{lists,keyfind,[compress,1,{env,[{dispatch,[{'_',[{[<<6 bytes>>,'...'],sockjs_cowboy_handler,{service,"/socket",#Fun<example_sockjs_handler.0.4868432>,[{callback,example_callback}],"<a href="https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.min.js">https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.min.js</a>",false... </div>
<div><br></div><div><br></div><div>09:45:40.850 [error] Supervisor ranch_conns_sup had child ranch_conns_sup started with {ranch_conns_sup,start_protocol,undefined} at <0.989.0> exit with reason bad argument in call to lists:keyfind(compress, 1, {env,[{dispatch,[{'_',[{[<<"socket">>,'...'],sockjs_cowboy_handler,{service,"/socket",#Fun<outbre..>,...}},...]}]}]}) in cowboy_protocol:get_value/3 line 97 in context child_terminated</div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 10, 2013 at 9:24 AM, Fred Hebert <span dir="ltr"><<a href="mailto:mononcqc@ferd.ca" target="_blank">mononcqc@ferd.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The latest cowboy now uses [{env, [{dispatch, Routes}]}] as its options<br>
for the dispatching rather than the old format.<br>
<br>
I got the same error yesterday and this fixed it. The documentation didn't<br>
follow through with the changes, but that's what we get for using the<br>
bleeding edge rather than tagged versions.<br>
<br>
Regards,<br>
Fred.<br>
<div class="HOEnZb"><div class="h5"><br>
On 01/10, AD wrote:<br>
> hello,<br>
><br>
>   Using sockjs and the latest cowboy/ranch, I am running into a badarg<br>
> error with cowboy_router.  Not sure what is causing this, i captured the<br>
> debug info here in this gist<br>
><br>
> <a href="https://gist.github.com/4502255" target="_blank">https://gist.github.com/4502255</a><br>
><br>
> I am starting like this<br>
><br>
> SockjsState = sockjs_handler:init_state(<<"/socket">>,fun<br>
> wsocket_handler/3, state, []),<br>
><br>
> VRoutes = [{[<<"socket">>, '...'], sockjs_cowboy_handler, SockjsState},<br>
><br>
>                    {'_', ?MODULE, []}],<br>
>  Routes = [{'_',  VRoutes}],<br>
><br>
>  lager:info("Starting the cowboy listener on port ~p..~n",[?COWBOY_HTTP_PORT]),<br>
><br>
>  cowboy:start_http(my_http_listener, ?COWBOY_HTTP_ACCEPTORS, [{port,<br>
> ?COWBOY_HTTP_PORT}], [{dispatch, Routes}]).<br>
><br>
> But the call to lists:keyfind(dispatch, 1, Env) seems to be failing<br>
> for some reason.<br>
><br>
>  Any ideas ?<br>
><br>
>  Thanks<br>
> - AD<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</div></div></blockquote></div><br></div>