Runtime error

16 views
Skip to first unread message

Samir

unread,
Feb 26, 2015, 3:07:25 PM2/26/15
to nitro...@googlegroups.com
Nitrogen 2.3.1
Cowboy 2.0.0-pre
Simplebridge 2.0.1

Hi Jessy

I've (unfortunately) pulled the new librairies of Cowboy 2.0.0 and now my handlers are no longer working.
I get a error when simple_bridge:make is called

 [{cowboy_simple_bridge,init,
                       [{http_req,#Port<0.8007>,ranch_tcp,keepalive,<0.254.0>,
                                  <<"GET">>,'HTTP/1.1',
                                  ...}],
                       [{file,"src/cowboy_bridge_modules/cowboy_simple_bridge.erl"},
                        {line,50}]},
 {simple_bridge,make_nocatch,2,[{file,"src/simple_bridge.erl"},{line,93}]},
 {simple_bridge,inner_make,2,[{file,"src/simple_bridge.erl"},{line,86}]},
 {nitrogen_cowboy,handle,2,[{file,"src/nitrogen_cowboy.erl"},{line,22}]},
 {cowboy_handler,execute,2,[{file,"src/cowboy_handler.erl"},{line,39}]},
 {cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,462}]}]

Did you test CB 2.0.0  ?
Would you mind helping me fix the issue ?

Thank you.

Sincerely

Samir

Samir

unread,
Feb 26, 2015, 3:21:51 PM2/26/15
to nitro...@googlegroups.com
The right error :

Error in simple_bridge:make/2 - error - {badmatch,
                                         [...]}
[{cowboy_simple_bridge,headers,1,
                       [{file,"src/cowboy_bridge_modules/cowboy_simple_bridge.erl"},
                        {line,95}]},
 {sbw,cache_headers,1,[{file,"src/sbw.erl"},{line,120}]},
 {sbw,new,2,[{file,"src/sbw.erl"},{line,101}]},
 {simple_bridge,make_nocatch,2,[{file,"src/simple_bridge.erl"},{line,94}]},
 {simple_bridge,inner_make,2,[{file,"src/simple_bridge.erl"},{line,86}]},
 {nitrogen_cowboy,handle,2,[{file,"src/nitrogen_cowboy.erl"},{line,22}]},
 {cowboy_handler,execute,2,[{file,"src/cowboy_handler.erl"},{line,39}]},
 {cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,462}]}]

Jesse Gumm

unread,
Feb 26, 2015, 3:44:52 PM2/26/15
to nitrogenweb
Hi Samir,

I have not done anything with Cowboy 2.0 yet, as it's still changing
heavily, and being a major release obviously means it's not backwards
compatible yet.

As it approaches release and more stability, I will begin the process
of converting simple_bridge to support cowboy 2.0, but as it's still
beta, while cowboy 1.0.1 is stable, I recommend sticking with 1.0.1
for the time being (unless you want to make your changes to support
the cowboy 2.0 beta, in which case, I'm definitely open to a pull
request).

The easiest fix for now if you accidentally pulled the master branch
of cowboy would be as follows. Update your rebar.config to point to
cowboy's 1.0.1 tag:

{cowboy, "", {git, "git://github.com/ninenines/cowboy", {tag, "1.0.1"}}}

Then delete any cowboy specific dependencies:

$ rm -fr lib/cowboy lib/cowlib lib/ranch

Then re-run make:

$ make

And you should be good to go.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nitrogenweb...@googlegroups.com.
> To post to this group, send email to nitro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nitrogenweb.
> For more options, visit https://groups.google.com/d/optout.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Samir

unread,
Mar 3, 2015, 8:52:20 AM3/3/15
to nitro...@googlegroups.com
Hi Jesse

Did that.
Thank you.

Samir
Reply all
Reply to author
Forward
0 new messages