Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exit Undef cowboy:start_http

Tags:

erlang

cowboy

When I try to upgrade (removing deps/cowboy and deps/cowlib), make and run it again to get the latest COWBOY Web Server, then it failed by cowby:start_http undefined

application: cowboy_test
    exited: {bad_return,
             {{cowboy_test_app,start,[normal,[]]},
              {'EXIT',
               {undef,
                [{cowboy,start_http,
                  [my_http_listener,100,
                   [{port,8080}],
                   [{env,[{dispatch,[{'_',[],[{[],[],hello_handler,[]}]}]}]}]],
                  []},
                 {cowboy_test_app,start,2,
                  [{file,"src/cowboy_test_app.erl"},{line,13}]},
                 {application_master,start_it_old,4,
                  [{file,"application_master.erl"},{line,273}]}]}}}}

Any recommendation please

like image 770
Yarin Nim Avatar asked Mar 26 '26 13:03

Yarin Nim


1 Answers

Please see the answer on this issue, dont use the master branch of CowBoy as it contains breaking changes. I switched back to 2.0.0-pre.3 in my own project and it works for my application.

My Makefile:

PROJECT = webserver
DEPS = cowboy erlydtl
dep_cowboy = git https://github.com/ninenines/cowboy 2.0.0-pre.3
include erlang.mk

Then I build using 'make' and start it with './_rel/webserver/bin/webserver console' (change 'webserver' with your own application name and do not start it with 'make run').

like image 87
dma Avatar answered Mar 28 '26 02:03

dma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!