Ash Admin seems to be flakey

I'm having a pretty hard time using Ash Admin consistently. The view seems to randomly die and stop accepting updates. In the console I get messages that look like this: phx-F1UJhmZoL62MpQAj error: view crashed - undefined
4 Replies
ZachDaniel
ZachDaniel3y ago
yoinks Are there any error/log messages in the console?
rohan
rohanOP3y ago
there's a deprecation on the iex console:
warning: Passing an atom to "for" in the form component is deprecated.
Instead of:

<.form :let={f} for={:action} ...>

You might do:

<.form :let={f} for={%{}} as={:action} ...>

Or, if you prefer, use to_form to create a form in your LiveView:

assign(socket, form: to_form(%{}, as: :action))

and then use it in your templates (no :let required):

<.form for={@form}>

(phoenix_live_view 0.18.18) lib/phoenix_component.ex:1415: Phoenix.Component.to_form/2
(phoenix_live_view 0.18.18) lib/phoenix_component.ex:2141: Phoenix.Component."form (overridable 1)"/1
(phoenix_live_view 0.18.18) lib/phoenix_live_view/tag_engine.ex:68: Phoenix.LiveView.TagEngine.component/3
(surface 0.9.4) lib/surface/components/form.ex:101: anonymous fn/2 in Surface.Components.Form."render (overridable 1)"/1
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:517: Phoenix.LiveView.Diff.invoke_dynamic/2
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:398: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:717: Phoenix.LiveView.Diff.render_component/9
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:662: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(stdlib 4.3) maps.erl:411: :maps.fold_1/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:635: Phoenix.LiveView.Diff.render_pending_components/6
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:146: Phoenix.LiveView.Diff.render/3
warning: Passing an atom to "for" in the form component is deprecated.
Instead of:

<.form :let={f} for={:action} ...>

You might do:

<.form :let={f} for={%{}} as={:action} ...>

Or, if you prefer, use to_form to create a form in your LiveView:

assign(socket, form: to_form(%{}, as: :action))

and then use it in your templates (no :let required):

<.form for={@form}>

(phoenix_live_view 0.18.18) lib/phoenix_component.ex:1415: Phoenix.Component.to_form/2
(phoenix_live_view 0.18.18) lib/phoenix_component.ex:2141: Phoenix.Component."form (overridable 1)"/1
(phoenix_live_view 0.18.18) lib/phoenix_live_view/tag_engine.ex:68: Phoenix.LiveView.TagEngine.component/3
(surface 0.9.4) lib/surface/components/form.ex:101: anonymous fn/2 in Surface.Components.Form."render (overridable 1)"/1
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:517: Phoenix.LiveView.Diff.invoke_dynamic/2
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:398: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:544: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:396: Phoenix.LiveView.Diff.traverse/7
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:717: Phoenix.LiveView.Diff.render_component/9
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:662: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6
(elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(stdlib 4.3) maps.erl:411: :maps.fold_1/3
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:635: Phoenix.LiveView.Diff.render_pending_components/6
(phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:146: Phoenix.LiveView.Diff.render/3
ZachDaniel
ZachDaniel3y ago
Yeah, that is probably fine/not the issue
rohan
rohanOP3y ago
it comes in and out, will post any errors in the console when it again

Did you find this page helpful?