Error with LiveView mounted at a different path


I’ve got a new Phoenix LiveView app that I’m trying to get deployed to our production environment which is Google Cloud w/ Kubernetes. We’re using their ingress. My app will live under the prefix /internal/foo so it would be accessed in a browser at
Of note is that the load balancers does not strip the prefix from the path when making the request to the app, so the app receives GET /internal/foo/things for example

I’ve had to make a bunch of changes to get my app to behave living under this path prefix.

Router changes the root scope:

scope "/internal/foo", FooWeb do
  pipe_through :browser

  live_session :default, on_mount: FooWeb.Live.InitAssigns do
    live "/things", ThingLive.Index, :index
    live "/things/:id", ThingLive.Show, :show

In runtime.exs I have:

path = "/internal/foo"
config :foo, FooWeb.Endpoint, url: [path: path, static_path: path]

In endpoint.ex I have

plug Plug.Static, at: "/internal/foo"
socket "/internal/foo/live", Phoenix.LiveView.Socket

In app.js I have

let liveSocket = new LiveSocket("/internal/foo/live", Socket, {params: {_csrf_token: csrfToken}})

Most of this is working fine. Assets load, I can click around the page, but LiveView itself is broken. Constantly have “we can’t find the internet…” and this error in my logs:

[error] an exception was raised:
   ** (RuntimeError) cannot invoke handle_params/3 for FooWeb.ThingLive.Show because FooWeb.ThingLive.Show was not mounted at the router with the live/3 macro under URL "http://localhost:4009/internal/foo/things/193a75db-610c-4d91-b562-c99e678088f5"
         (phoenix_live_view 0.20.0) lib/phoenix_live_view/channel.ex:542: Phoenix.LiveView.Channel.maybe_call_mount_handle_params/4
         (phoenix_live_view 0.20.0) lib/phoenix_live_view/channel.ex:1129: Phoenix.LiveView.Channel.verified_mount/8
         (phoenix_live_view 0.20.0) lib/phoenix_live_view/channel.ex:84: Phoenix.LiveView.Channel.handle_info/2
         (stdlib 5.1.1) gen_server.erl:1077: :gen_server.try_handle_info/3
         (stdlib 5.1.1) gen_server.erl:1165: :gen_server.handle_msg/6
         (stdlib 5.1.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

What am I missing here? I feel like I’m one small configuration setting away from having this all up and running.

phoenix 1.7.7
phoenix_live_view 0.20.0
plug 1.15.1
elixir 1.14.5

Found where it comes from in the source anyway: