Skip to content

Instantly share code, notes, and snippets.

@goertzenator
Created January 19, 2016 16:42
Show Gist options
  • Save goertzenator/b521a3a7a06fd14a7e07 to your computer and use it in GitHub Desktop.
Save goertzenator/b521a3a7a06fd14a7e07 to your computer and use it in GitHub Desktop.
n2o crash
-module(index).
-compile(export_all).
-include_lib("n2o/include/wf.hrl").
-include_lib("nitro/include/nitro.hrl").
main() -> #dtl{ file="basic",
bindings = [{body, body()}, {title, title()}]
}.
title() -> "This is the DTL title".
body() -> [#p{body = "some unformatted body text"},
#button{body="a button maybe?"}].
=ERROR REPORT==== 19-Jan-2016::10:43:28 ===
Error in process <0.545.0> on node canserver@g550jk with exit value:
{[{reason,undef},
{mfa,{n2o_cowboy,handle,2}},
{stacktrace,
[{basic_view,render,
[[{body,
[[<<"<">>,<<"p">>,
[[],[],[],[],[],[],[],[],[],[],[],[],[],[]],
<<">">>,"some unformatted body text",<<"</">>,<<"p">>,
<<">">>],
<<"<button type=\"button\">a button maybe?</button>">>]},
{title,"This is the DTL title"},
{script,
["var transition = {pid: '",
<<"g2gCZ2QAEGNhbnNlcnZlckBnNTUwamsAAAIkAAAAAANoA2IAAAWtYgADYnBiAAlWBg==">>,
"', ","port:'","8000","'}"]}]],
[]},
{element_dtl,render_element,1,
[{file,
"/home/goertzen/canserver/_build/default/lib/nitro/src/elements/element_dtl.erl"},
{line,12}]},
{wf_render_elements,render_element,1,
[{file,
"/home/goertzen/canserver/_build/default/lib/nitro/src/render/wf_render_elements.erl"},
{line,26}]},
{n2o_document,run,1,
[{file,
"/home/goertzen/canserver/_build/default/lib/n2o/src/endpoints/n2o_document.erl"},
{line,18}]},
{n2o_cowboy,handle,2,
[{file,
"/home/goertzen/canserver/_build/default/lib/n2o/src/endpoints/cowboy/n2o_cowboy.erl"},
{line,14}]},
{cowboy_handler,handler_handle,4,
[{file,
"/home/goertzen/canserver/_build/default/lib/cowboy/src/cowboy_handler.erl"},
{line,111}]},
{cowboy_protocol,execute,4,
[{file,
"/home/goertzen/canserver/_build/default/lib/cowboy/src/cowboy_protocol.erl"},
{line,442}]}]},
{req,
[{socket,#Port<0.1385>},
{transport,ranch_tcp},
{connection,keepalive},
{pid,<0.545.0>},
{method,<<"GET">>},
{version,'HTTP/1.1'},
{peer,{{127,0,0,1},42778}},
{host,<<"localhost">>},
{host_info,undefined},
{port,9002},
{path,<<"/favicon.ico">>},
{path_info,undefined},
{qs,<<>>},
{qs_vals,undefined},
{bindings,[]},
{headers,
[{<<"host">>,<<"localhost:9002">>},
{<<"connection">>,<<"keep-alive">>},
{<<"user-agent">>,
<<"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36">>},
{<<"accept">>,<<"*/*">>},
{<<"referer">>,<<"http://localhost:9002/">>},
{<<"accept-encoding">>,<<"gzip, deflate, sdch">>},
{<<"accept-language">>,<<"en-US,en;q=0.8">>},
{<<"cookie">>,<<"site-sid=566509a61ba22392f0146e2e2aaad2a6">>}]},
{p_headers,[{<<"connection">>,[<<"keep-alive">>]}]},
{cookies,undefined},
{meta,[]},
{body_state,waiting},
{buffer,<<>>},
{multipart,undefined},
{resp_compress,false},
{resp_state,waiting},
{resp_headers,[]},
{resp_body,<<>>},
{onresponse,undefined}]},
{state,{state,undefined,undefined}}],
[{cowboy_protocol,execute,4,
[{file,
"/home/goertzen/canserver/_build/default/lib/cowboy/src/cowboy_protocol.erl"},
{line,442}]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment