exception_handler icon indicating copy to clipboard operation
exception_handler copied to clipboard

Error during failsafe response: end of file reached

Open iFalcao opened this issue 5 years ago • 4 comments

Hi, @richpeck

I'm currently having this error only on production (it's fine on dev environment), this is my email layout (used for all exceptions):

<h1><%= Rails.application.class.parent_name %> (<%= Rails.env.titleize %>)</h1>

<strong><u><%= @exception.response %> (<%= @exception.status %>)</u></strong>
<p>
  <%= @exception.message %>
</p>

<p>
  <h6>Outras Informações</h6>
  <br>
  Parâmetros: <%= @exception.request.request_parameters %>
  <br>
  Página: <%= @exception.request.referer %>
  <br> 
  Classe de Controle: <%= @exception.request.controller_class %>
  <br>
</p>

Any idea of what might be causing this?

iFalcao avatar May 21 '19 12:05 iFalcao

Hi thanks for the comment :) Do you have a stack trace for the error I could look at?

richpeck avatar May 21 '19 12:05 richpeck

Hey, here it is:

2019-05-21T12:29:30.550175+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Completed 500 Internal Server Error in 47ms (ActiveRecord: 23.5ms)
2019-05-21T12:29:30.551286+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62]
2019-05-21T12:29:30.551386+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] NoMethodError (undefined method `id' for nil:NilClass):
2019-05-21T12:29:30.551469+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62]
2019-05-21T12:29:30.551528+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] app/controllers/organizer_backoffice/withdraws_controller.rb:69:in `load_objects'
2019-05-21T12:29:30.551530+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] app/controllers/organizer_backoffice/withdraws_controller.rb:5:in `index'
2019-05-21T12:29:30.553779+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Processing by ExceptionHandler::ExceptionsController#show as HTML
2019-05-21T12:29:30.553837+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62]   Parameters: {"marathon_id"=>"trilhadamutuca"}
2019-05-21T12:29:30.565588+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62]   Rendering exception_handler/mailers/new_exception.erb within layouts/mailer
2019-05-21T12:29:30.566495+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62]   Rendered exception_handler/mailers/new_exception.erb within layouts/mailer (1.1ms)
2019-05-21T12:29:31.021078+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Exception Sent To → [email protected]
2019-05-21T12:29:31.021301+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] ExceptionHandler::ExceptionMailer#new_exception: processed outbound mail in 466.0ms
2019-05-21T12:29:33.205079+00:00 heroku[router]: at=info method=GET path="/organizer_backoffice/marathons/trilhadamutuca/withdraws" host=www.balcaodeinscricoes.com.br request_id=742550e5-31fe-4f82-90f1-4b42bd9ddc62 fwd="177.82.223.27" dyno=web.1 connect=1ms service=2719ms status=500 bytes=508 protocol=https
2019-05-21T12:29:33.204557+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Sent mail to [email protected] (2182.9ms)
2019-05-21T12:29:33.204581+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Date: Tue, 21 May 2019 12:29:31 +0000
2019-05-21T12:29:33.204583+00:00 app[web.1]: From: [email protected]
2019-05-21T12:29:33.204585+00:00 app[web.1]: To: [email protected]
2019-05-21T12:29:33.204586+00:00 app[web.1]: Message-ID: <5ce3ef2bbb77_43faaa47f70e037613@64350105-9338-4afc-98d9-cad36e93b464.mail>
2019-05-21T12:29:33.204588+00:00 app[web.1]: Subject: New exception
2019-05-21T12:29:33.204589+00:00 app[web.1]: Mime-Version: 1.0
2019-05-21T12:29:33.204591+00:00 app[web.1]: Content-Type: text/html;
2019-05-21T12:29:33.204593+00:00 app[web.1]: charset=UTF-8
2019-05-21T12:29:33.204594+00:00 app[web.1]: Content-Transfer-Encoding: 7bit
2019-05-21T12:29:33.204596+00:00 app[web.1]: 
2019-05-21T12:29:33.204598+00:00 app[web.1]: <!DOCTYPE html>
2019-05-21T12:29:33.204599+00:00 app[web.1]: <html>
2019-05-21T12:29:33.204601+00:00 app[web.1]: <head>
2019-05-21T12:29:33.204602+00:00 app[web.1]: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2019-05-21T12:29:33.204603+00:00 app[web.1]: <style>
2019-05-21T12:29:33.204605+00:00 app[web.1]: dt, dd { float: left }
2019-05-21T12:29:33.204606+00:00 app[web.1]: dt {
2019-05-21T12:29:33.204608+00:00 app[web.1]: clear: both;
2019-05-21T12:29:33.204609+00:00 app[web.1]: font-weight: bold;
2019-05-21T12:29:33.204611+00:00 app[web.1]: }
2019-05-21T12:29:33.204612+00:00 app[web.1]: dl {
2019-05-21T12:29:33.204613+00:00 app[web.1]: overflow: hidden;
2019-05-21T12:29:33.204615+00:00 app[web.1]: display: block;
2019-05-21T12:29:33.204617+00:00 app[web.1]: margin-block-start: 1em;
2019-05-21T12:29:33.204619+00:00 app[web.1]: margin-block-end: 1em;
2019-05-21T12:29:33.204620+00:00 app[web.1]: margin-inline-start: 0px;
2019-05-21T12:29:33.204622+00:00 app[web.1]: margin-inline-end: 0px;
2019-05-21T12:29:33.204623+00:00 app[web.1]: }
2019-05-21T12:29:33.204624+00:00 app[web.1]: .container {
2019-05-21T12:29:33.204626+00:00 app[web.1]: font-family: sans-serif; text-align: center;
2019-05-21T12:29:33.204627+00:00 app[web.1]: padding-right: 15px;
2019-05-21T12:29:33.204629+00:00 app[web.1]: padding-left: 15px;
2019-05-21T12:29:33.204630+00:00 app[web.1]: margin-right: auto;
2019-05-21T12:29:33.204631+00:00 app[web.1]: margin-left: auto;
2019-05-21T12:29:33.204633+00:00 app[web.1]: }
2019-05-21T12:29:33.204634+00:00 app[web.1]: .img-responsive { max-height: 200px; max-width: 100%; }
2019-05-21T12:29:33.204636+00:00 app[web.1]: .athletes_table_title {
2019-05-21T12:29:33.204637+00:00 app[web.1]: font-weight: bold;
2019-05-21T12:29:33.204641+00:00 app[web.1]: font-size: 1.1em;
2019-05-21T12:29:33.204643+00:00 app[web.1]: }
2019-05-21T12:29:33.204644+00:00 app[web.1]: .dl-horizontal:after {
2019-05-21T12:29:33.204646+00:00 app[web.1]: content: '';
2019-05-21T12:29:33.204647+00:00 app[web.1]: display: block;
2019-05-21T12:29:33.204648+00:00 app[web.1]: }
2019-05-21T12:29:33.204650+00:00 app[web.1]: .dl-horizontal {
2019-05-21T12:29:33.204651+00:00 app[web.1]: width: 315px;
2019-05-21T12:29:33.204653+00:00 app[web.1]: margin: 0 auto;
2019-05-21T12:29:33.204654+00:00 app[web.1]: }
2019-05-21T12:29:33.204655+00:00 app[web.1]: .dl-horizontal dt {
2019-05-21T12:29:33.204657+00:00 app[web.1]: display: inline;
2019-05-21T12:29:33.204658+00:00 app[web.1]: float: left;
2019-05-21T12:29:33.204660+00:00 app[web.1]: width: 160px;
2019-05-21T12:29:33.204661+00:00 app[web.1]: margin: 0 auto;
2019-05-21T12:29:33.204662+00:00 app[web.1]: clear: left;
2019-05-21T12:29:33.204664+00:00 app[web.1]: text-align: right;
2019-05-21T12:29:33.204665+00:00 app[web.1]: overflow: hidden;
2019-05-21T12:29:33.204667+00:00 app[web.1]: text-overflow: ellipsis;
2019-05-21T12:29:33.204668+00:00 app[web.1]: white-space: nowrap;
2019-05-21T12:29:33.204669+00:00 app[web.1]: font-weight: bold;
2019-05-21T12:29:33.204671+00:00 app[web.1]: }
2019-05-21T12:29:33.204672+00:00 app[web.1]: .dl-horizontal dd {
2019-05-21T12:29:33.204673+00:00 app[web.1]: display: inline;
2019-05-21T12:29:33.204675+00:00 app[web.1]: margin-left: 15px;
2019-05-21T12:29:33.204676+00:00 app[web.1]: }
2019-05-21T12:29:33.204677+00:00 app[web.1]: .footer-padrao {
2019-05-21T12:29:33.204679+00:00 app[web.1]: padding: 15px 10px;
2019-05-21T12:29:33.204680+00:00 app[web.1]: }
2019-05-21T12:29:33.204682+00:00 app[web.1]: .footer-padrao::before {
2019-05-21T12:29:33.204683+00:00 app[web.1]: content: '';
2019-05-21T12:29:33.204685+00:00 app[web.1]: margin-right: auto;
2019-05-21T12:29:33.204686+00:00 app[web.1]: margin-left: auto;
2019-05-21T12:29:33.204688+00:00 app[web.1]: display: block;
2019-05-21T12:29:33.204690+00:00 app[web.1]: width: 40px;
2019-05-21T12:29:33.204691+00:00 app[web.1]: padding: 1px;
2019-05-21T12:29:33.204693+00:00 app[web.1]: margin-top: 10px;
2019-05-21T12:29:33.204694+00:00 app[web.1]: background-color: black;
2019-05-21T12:29:33.204696+00:00 app[web.1]: border-radius: 3px;
2019-05-21T12:29:33.204697+00:00 app[web.1]: }
2019-05-21T12:29:33.204699+00:00 app[web.1]: .btn-success {
2019-05-21T12:29:33.204700+00:00 app[web.1]: padding: 10px;
2019-05-21T12:29:33.204701+00:00 app[web.1]: color: white !important;
2019-05-21T12:29:33.204702+00:00 app[web.1]: background-color: green !important;
2019-05-21T12:29:33.204703+00:00 app[web.1]: font-size: 1.4em;
2019-05-21T12:29:33.204704+00:00 app[web.1]: font-weight: bold;
2019-05-21T12:29:33.204706+00:00 app[web.1]: border-radius: 5px;
2019-05-21T12:29:33.204707+00:00 app[web.1]: text-decoration: none;
2019-05-21T12:29:33.204708+00:00 app[web.1]: }
2019-05-21T12:29:33.204709+00:00 app[web.1]: .panel {
2019-05-21T12:29:33.204710+00:00 app[web.1]: margin-bottom: 20px;
2019-05-21T12:29:33.204711+00:00 app[web.1]: background-color: #fff;
2019-05-21T12:29:33.204713+00:00 app[web.1]: border: 1px solid transparent;
2019-05-21T12:29:33.204714+00:00 app[web.1]: border-radius: 4px;
2019-05-21T12:29:33.204715+00:00 app[web.1]: -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
2019-05-21T12:29:33.204716+00:00 app[web.1]: box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
2019-05-21T12:29:33.204717+00:00 app[web.1]: }
2019-05-21T12:29:33.204718+00:00 app[web.1]: .panel-body { border: 2px solid #f5f5f5; }
2019-05-21T12:29:33.204723+00:00 app[web.1]: .panel-heading {
2019-05-21T12:29:33.204724+00:00 app[web.1]: font-size: 1.2em;
2019-05-21T12:29:33.204725+00:00 app[web.1]: font-weight: bold;
2019-05-21T12:29:33.204726+00:00 app[web.1]: padding: 8px;
2019-05-21T12:29:33.204727+00:00 app[web.1]: }
2019-05-21T12:29:33.204728+00:00 app[web.1]: .panel-primary > .panel-heading {
2019-05-21T12:29:33.204730+00:00 app[web.1]: color: #fff;
2019-05-21T12:29:33.204731+00:00 app[web.1]: background-color: #337ab7;
2019-05-21T12:29:33.204732+00:00 app[web.1]: border-color: #337ab7;
2019-05-21T12:29:33.204733+00:00 app[web.1]: }
2019-05-21T12:29:33.204734+00:00 app[web.1]: .panel-body { padding: 15px; }
2019-05-21T12:29:33.204735+00:00 app[web.1]: </style>
2019-05-21T12:29:33.204736+00:00 app[web.1]: </head>
2019-05-21T12:29:33.204737+00:00 app[web.1]: 
2019-05-21T12:29:33.204738+00:00 app[web.1]: <body>
2019-05-21T12:29:33.204740+00:00 app[web.1]: <div class="container">
2019-05-21T12:29:33.204742+00:00 app[web.1]: <img class="img-responsive" src="https://www.balcaodeinscricoes.com.br/assets/defaultBanner-90f4c8b5fd2de58d9eac763886119d10513943d6e323b84fcfded62a77c46f56.jpg" alt="Defaultbanner" />
2019-05-21T12:29:33.204743+00:00 app[web.1]: <h1>BalcaoInscricoes (Production)</h1>
2019-05-21T12:29:33.204744+00:00 app[web.1]: 
2019-05-21T12:29:33.204745+00:00 app[web.1]: <strong><u>internal_server_error (500)</u></strong>
2019-05-21T12:29:33.204746+00:00 app[web.1]: <p>
2019-05-21T12:29:33.204748+00:00 app[web.1]: undefined method `id&#39; for nil:NilClass
2019-05-21T12:29:33.204749+00:00 app[web.1]: </p>
2019-05-21T12:29:33.204750+00:00 app[web.1]: 
2019-05-21T12:29:33.204751+00:00 app[web.1]: </div>
2019-05-21T12:29:33.204752+00:00 app[web.1]: </body>
2019-05-21T12:29:33.204753+00:00 app[web.1]: </html>
2019-05-21T12:29:33.204754+00:00 app[web.1]: 
2019-05-21T12:29:33.204985+00:00 app[web.1]: [742550e5-31fe-4f82-90f1-4b42bd9ddc62] Completed 500 Internal Server Error in 2651ms (ActiveRecord: 0.0ms)
2019-05-21T12:29:33.205028+00:00 app[web.1]: Error during failsafe response: end of file reached

iFalcao avatar May 21 '19 12:05 iFalcao

Hmmm very interesting - are you using an external SMTP service or is it a local mail catcher?

richpeck avatar May 21 '19 16:05 richpeck

I'm using Zoho in production.

iFalcao avatar May 22 '19 13:05 iFalcao