Skip to content

Tracking issue: cache issues on deployments #1723

@ArtOfCode-

Description

@ArtOfCode-

We have a repeating error when we update versions or deploy, which we've seen in local dev environments, on the dev server, and now in prod. The traces seem to point back to something in Rails itself, which seems unlikely, but it's also quite hard to reproduce predictably. The error is of the form:

[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c] ActionView::Template::Error (undefined method `each_with_index' for nil:NilClass

          list.each_with_index do |x, i|
              ^^^^^^^^^^^^^^^^):
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]
Causes:
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c] NoMethodError (undefined method `each_with_index' for nil:NilClass

          list.each_with_index do |x, i|
              ^^^^^^^^^^^^^^^^)
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     75:             <% end %>
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     76:           </div>
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     77:         <% end %>
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     78:         <% if user_signed_in? && post.post_type.has_reactions && post.post_type.reactions.any? %>
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     79:           <div class="post--react has-text-align-center">
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     80:             <% unless post.locked? %>
[meta] [ff794e9a-2385-4ea9-a617-a1e436a4284c]     81:               <button class="react-button button is-muted is-icon-only-button h-fw-bold"

The consistent part is that each_with_index is being called on a nil by the framework. Not sure why. Initial thoughts and tasks to come in comments.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendChanges to server-side codecomplexity: hardWill take significant time/effort/planning to resolve/fix/build correctly.priority: high

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions