Skip to content

PhoenixKit 1.7.210: Flash fix in PhoenixKit's own test router

PhoenixKit 1.7.210 is a fix to PhoenixKit’s own development and test router. No change for a running site.

That router’s :browser pipeline had no flash plug, so a LiveView that redirected during mount with a message, such as “You must log in to access this page.”, crashed with “flash not fetched” instead of redirecting. The pipeline now has plug :fetch_live_flash. Apps generated with mix phx.new already have this plug in their own router.

Full release notes: PhoenixKit 1.7.210

1.7.210 · 23 July 2026

Fixed

  • Issue #652 — ** (ArgumentError) flash not fetched, call fetch_flash/2 on every router-rendered LiveView that redirects during mount with a flash message set (e.g. :phoenix_kit_ensure_admin‘s “You must log in to access this page.” redirect for unauthenticated admin-route hits). The dev/test router’s :browser pipeline had no fetch_flash/fetch_live_flash plug, so Phoenix.LiveView.Controller.live_render/3 crashed instead of redirecting whenever it tried to fold the on-mount flash back onto the conn. Added plug :fetch_live_flash to lib/phoenix_kit_web/router.ex’s :browser pipeline, plus a regression test. Test-harness-only fix — real parent apps generated via mix phx.new already carry this plug by convention.

PhoenixKit 1.7.210. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.