Phoenix Endpoint cache access error while updating from 1.2 to 1.3


Finally we got a time to migrate from Phoenix 1.2 to Phoenix 1.3 and there some really enjoyable moments in that process but unfortunately it was blocked by the following problem: using a plug with a router helper inside the controller cause a cache access error.


defmodule FlowmailWeb.SubscriptionSettingsController do
  use FlowmailWeb, :controller
  plug CheckNewsletterSettings, [redirect_path: subscription_settings_path(FlowmailWeb.Endpoint, :edit)] 


** (ArgumentError) argument error
    (stdlib) :ets.lookup(FlowmailWeb.Endpoint, :__phoenix_path__)
    (phoenix) lib/phoenix/config.ex:47: Phoenix.Config.cache/3
    lib/phoenix/endpoint.ex:643: FlowmailWeb.Endpoint.path/1
    lib/flowmail_web/controllers/subscription_settings_controller.ex:14: (module)

I suspect that it’s because of the :ets.lookup tries to access non-existing table which is being created only in the runtime

I assume that it can’t be a bug in Phoenix and I’m missing something in my update. Any ideas what it may be?

1 Like

This is a regression in 1.3

1 Like