Open jchukwum opened 11 years ago
When I try this with latest Erlang version (17.3 rev2), I get errors when trying to access from the browser (chrome or safari). Any ideas where to look?
=ERROR REPORT==== 3-Dec-2014::11:34:20 === Error in process <0.150.0> with exit value: {[{reason,undef},{mfa,{ezwebframe,init,2}},{stacktrace,[{ezwebframe,init,[{http_req,#Port<0.1627>,ranch_tcp,keepalive,<0.150.0>,<<3 bytes>>,'HTTP/1.1',{{127,0,0,1},55010},<<9 bytes>>,undefined,1456,<<1 byte>>,undefined,<<0 bytes>>,[],[{<<4 bytes>>,<<14 bytes>>},{<<10 bytes>>,<<10 bytes>>},{<<13 bytes>>,<<9 bytes>>},{<<6 bytes>>,<<74 bytes>>},{<<10 bytes>>,<<120 bytes>>},{<<15 bytes>>,<<19 bytes>>},{<<15 bytes>>,<<14 bytes>>}],[],waiting,<<0 bytes>>,undefined,false,waiting...
=ERROR REPORT==== 3-Dec-2014::11:34:20 ===
Ranch listener ezwebframe had connection process started with cowboy_protocol:start_link/4 at <0.150.0> exit with reason: {[{reason,undef},{mfa,{ezwebframe,init,2}},{stacktrace,[{ezwebframe,init,[{http_req,#Port<0.1627>,ranchtcp,keepalive,<0.150.0>,<<"GET">>,'HTTP/1.1',{{127,0,0,1},55010},<<"localhost">>,undefined,1456,<<"/">>,undefined,<<>>,[],[{<<"host">>,<<"localhost:1456">>},{<<"connection">>,<<"keep-alive">>},{<<"cache-control">>,<<"max-age=0">>},{<<"accept">>,<<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/_;q=0.8">>},{<<"user-agent">>,<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36">>},{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},{<<"accept-language">>,<<"en-US,en;q=0.8">>}],[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{env,#Fun
Thanks for the error report. I got the same error.
The latest version which should now work is at https://github.com/joearms/ezwebframe
Hope it works now
[ what happened: the cowboy interface changed in a non compatible way - the build process always takes the latest version of cowboy]
/Joe
On Wed, Dec 3, 2014 at 5:36 PM, davidrutt1 notifications@github.com wrote:
When I try this with latest Erlang version (17.3 rev2), I get errors when trying to access from the browser (chrome or safari). Any ideas where to look?
=ERROR REPORT==== 3-Dec-2014::11:34:20 === Error in process with exit value: {[{reason,undef},{mfa,{ezwebframe,init,2}},{stacktrace,[{ezwebframe,init,[{http_req,#Port,ranch_tcp,keepalive,,<>,'HTTP/1.1',{{127,0,0,1},55010},<>,undefined,1456,<>,undefined,<>,[],[{<>,<>},{<>,<>},{<>,<>},{<>,<>},{<>,<>},{<>,<>},{<>,<>}],[],waiting,<>,undefined,false,waiting...
=ERROR REPORT==== 3-Dec-2014::11:34:20 === Ranch listener ezwebframe had connection process started with cowboy_protocol:start_link/4 at exit with reason: {[{reason,undef},{mfa,{ezwebframe,init,2}},{stacktrace,[{ezwebframe,init,[{http_req,#Port,ranchtcp,keepalive,,<<"GET">>,'HTTP/1.1',{{127,0,0,1},55010},<<"localhost">>,undefined,1456,<<"/">>,undefined,<<>>,[],[{<<"host">>,<<"localhost:1456">>},{<<"connection">>,<<"keep-alive">>},{<<"cache-control">>,<<"max-age=0">>},{<<"accept">>,<<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp, /_;q=0.8">>},{<<"user-agent">>,<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36">>},{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},{<<"accept-language">>,<<"en-US,en;q=0.8">>}],[],wai ting,<<>>,undefined,false,waiting,[],<<>>,undefined},{env,#Fun}],[]},{cowboy_handler,execute,2,[{file,"src/cowboy_handler.erl"},{line,39}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,428}]}]},{req,[{socket,#Port},{transport,ranch_tcp},{connection,keepalive},{pid,},{method,<<"GET">>},{version,'HTTP/1.1'},{peer,{{127,0,0,1},55010}},{host,<<"localhost">>},{host_info,undefined},{port,1456},{path,<<"/">>},{pathinfo,undefined},{qs,<<>>},{bindings,[]},{headers,[{<<"host">>,<<"localhost:1456">>},{<<"connection">>,<<"keep-alive">>},{<<"cache-control">>,<<"max-age=0">>},{<<"accept">>,<<"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp, /_;q=0.8">>},{<<"user-agent">>,<<"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/3 9.0.2171.71 Safari/537.36">>},{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},{<<"accept-language">>,<<"en-US,en;q=0.8">>}]},{meta,[]},{body_state,waiting},{buffer,<<>>},{multipart,undefined},{resp_compress,false},{resp_state,waiting},{resp_headers,[]},{resp_body,<<>>},{onresponse,undefined}]},{opts,{env,#Fun}}],[{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,428}]}]}
— Reply to this email directly or view it on GitHub https://github.com/joearms/ezwebframe/issues/13#issuecomment-65441765.
I just forked the repo and using rebar I tried to build and run it.
Turns out that there's currently a new dependency on cowboy called cowlib. This means your make file in the demos directory doesn't work with the new cowlib dependency.
One way to fix this is to update line 5 in demos/Makefile to be:
-pa ../deps/*/ebin\
I guess with this change you wont need the "-pa ../deps/cowboy/ebin\ " in line 4.
Thanks
P/S: I'm a great fan. Can't stop reading everything you do