Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error and Crash on 404 Elixir.Phoenix.Router.NoRouteError #328

Closed
tpitale opened this issue Feb 6, 2019 · 4 comments
Closed

Error and Crash on 404 Elixir.Phoenix.Router.NoRouteError #328

tpitale opened this issue Feb 6, 2019 · 4 comments

Comments

@tpitale
Copy link

tpitale commented Feb 6, 2019

Environment

  • Elixir version (elixir -v): 1.8.1
  • Erlang/OTP version (erl): 21
  • Sentry version (mix deps): 7.0.3
  • Operating system: Mac OS 10.14.2 and Docker elixir-slim-1.8.1

Description

After upgrading to Phoenix 1.4.x and plug_cowboy 2.0, We've seen some vague errors in our logs that appear to happen on 404:

[info] time=21:32:15.579 request_id=2m0e7it2clh3g54eq40001eh method=GET path=/ time_elapsed=21ms status=404  Sent
21:32:15.580 [error] CRASH REPORT Process <0.713.0> with 0 neighbours exited with reason: {{#{'__exception__' => true,'__struct__' => 'Elixir.Phoenix.Router.NoRouteError',conn => #{'__struct__' => 'Elixir.Plug.Conn',adapter => {'Elixir.Plug.Cowboy.Conn',#{bindings => #{},body_length => 0,cert => undefined,has_body => false,headers => #{<<"accept">> => <<"*/*">>,<<"host">> => <<"">>,<<"x-amzn-trace-id">> => <<"">>,<<"x-forwarded-for">> => <<"178.73.215.171">>,<<"x-forwarde...">> => ...,...},...}},...},...},...},...} in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':init/2 line 43 in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':init/2 line 43
21:32:15.591 [error] Cowboy stream 1 with ranch listener 'Elixir.MyApp.Endpoint.HTTP' and connection process <0.712.0> had its request process exit with reason: {{#{'__exception__' => true,'__struct__' => 'Elixir.Phoenix.Router.NoRouteError',conn => #{'__struct__' => 'Elixir.Plug.Conn',adapter => {'Elixir.Plug.Cowboy.Conn',#{bindings => #{},body_length => 0,cert => undefined,has_body => false,headers => #{<<"accept">> => <<"*/*">>,<<"host">> => <<"">>,<<"x-amzn-trace-id">> => <<"">>,<<"x-forwarded-for">> => <<"178.73.215.171">>,<<"x-forwarde...">> => ...,...},...}},...},...},...},...} in 'Elixir.Phoenix.Endpoint.Cowboy2Handler':init/2 line 43

When searching out these errors we've found that other products similar to sentry (appsignal, honeybadger) have experienced similar issues. I'm wondering if you've seen this before and if maybe a similar change needs to happen in Sentry.

Related:

Expected Behavior

404 should not error and crash

Actual Behavior

404 appears to crash

@tpitale tpitale changed the title Error on 404 Error and Crash on 404 Elixir.Phoenix.Router.NoRouteError Feb 6, 2019
@mitchellhenke
Copy link
Contributor

Thanks for opening this issue!

I will take a look to see what I can do about this.

@mitchellhenke
Copy link
Contributor

I am unfortunately unable to reproduce this. I've pushed a repository to show how I'm attempting to reproduce, and if anything in your setup looks different, let me know:

Repository: https://github.com/mitchellhenke/no_route_testing
Sentry installation commit: mitchellhenke/no_route_testing@53a2b1d

hitting any route other than / generates a 404, but I don't receive any events in Sentry, or logs like you are seeing.

Do you have any different Logger configuration or :error_logger things going on?

@tpitale
Copy link
Author

tpitale commented Feb 8, 2019

We don't have this line use Sentry.Phoenix.Endpoint adding and deploying. Might have missed that when upgrading at some point in the past.

This could also all be a red herring. We have no real confirmation that sentry is the issue. Closing until I can reproduce reliably.

@tpitale tpitale closed this as completed Feb 8, 2019
@mitchellhenke
Copy link
Contributor

@tpitale My hunch is that Sentry.Phoenix.Endpoint wouldn't affect this issue, but rather that something different is going on with :logger config. Something Phoenix related is also possible, but I'm less sure.

If you'd like to discuss while you're working through it, I'm in IRC and Elixir Slack (same username) 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants