Cowboy and OTP 24

I am building a small RESTful API in cowboy. So far so good… but every now and then when I make things crash, the stack traces really arent telling me anything. I thought “well I guess stack traces maybe aren’t a big Erlang thing, boy I still have a lot to learn” but reading the details of the crash, I see undef, erlang:get_stacktrace/0. I looked at the cowboy source and I see its indeed trying to print a stack trace! I checked the docs and I see noooo such function in the erlang BIF’s, so Im wondering, is that an older function that has since been deprecated? Does cowboy have a preferred flavor of OTP it runs on? Is my OTP (24) a version that isn’t playing nice?

3 Likes

Are you using the latest version of the cowboy? I think 2.9.0 does not contain any erlang:get_stacktrace().

3 Likes

Yes you need to use cowboy 2.9.0 for otp24.

4 Likes

2.6.3 :smiley: ill try 2.9, thank you!

2 Likes

If you want you could try Nova. :slight_smile: GitHub - novaframework/nova: Web framework for Erlang. here is an example app: GitHub - Taure/nova_request_app use Nova from master branch right now, because we had some bugs in the hex release that we are working on. :slight_smile:

4 Likes

Awesome :slight_smile: I’m starting close to the metal to get an idea of nuts and bolts and cowboy seems to be quite pervasive but Nova is definitely on my shopping list of frameworks to try out :smiley:

2 Likes