Skip to content

NoMethodError: undefined method `tomorrow' for nil:NilClass in ReservationsController #327

@decimalator

Description

@decimalator

Descriptive summary

Bug surfaced in Room Reservation via DataDog. In case the trace vanishes, I will paste the stack trace at the bottom of the ticket. The error is: "NoMethodError: undefined method `tomorrow' for nil:NilClass" and here is a link to the trace:

https://app.datadoghq.com/apm/trace/8978809302256713867

Related work

Stack trace from DD:

/data0/rooms.library.oregonstate.edu/releases/20180817194401/app/controllers/reservations_controller.rb:24:in current_user_reservations' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/implicit_render.rb:4:in send_action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/abstract_controller/base.rb:198:in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/ddtrace-0.13.1/lib/ddtrace/contrib/rails/action_controller_patch.rb:48:in process_action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/rendering.rb:10:in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/abstract_controller/callbacks.rb:20:in block in process_action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:117:in call' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:555:in block (2 levels) in compile'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:505:in call' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:92:in run_callbacks'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in _run_process_action_callbacks' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in run_callbacks'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/abstract_controller/callbacks.rb:19:in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/rescue.rb:29:in process_action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb:32:in block in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in block in instrument'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in instrument' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in instrument'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb:30:in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/params_wrapper.rb:250:in process_action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/activerecord-4.2.10/lib/active_record/railties/controller_runtime.rb:18:in process_action' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/abstract_controller/base.rb:137:in process'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionview-4.2.10/lib/action_view/rendering.rb:30:in process' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal.rb:196:in dispatch'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal/rack_delegation.rb:13:in dispatch' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_controller/metal.rb:237:in block in action'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:74:in dispatch' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:43:in serve'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:43:in block in serve' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in each'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in serve' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:817:in call'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in call' /data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/rack-1.6.10/lib/rack/etag.rb:24:in call'
/data0/rooms.library.oregonstate.edu/shared/bundle/ruby/2.5.0/gems/rack-1.6.10/lib/rack/conditionalget.rb:25...

Request Metadata:

http {
base_url http://rooms.library.oregonstate.edu
method GET
response {
headers {
content_type application/json; charset=utf-8
x_request_id c498497e-c808-45e1-a45c-a537cb8f70d2
}
}
status_code 500
url /reservations.json?date
}
system {
pid 24734
}
{
rails {
route {
action current_user_reservations
controller ReservationsController
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions