Coming from previous thread: Failing To Create New User
I can now create users, but when I try to sign in from the admin dashboard, I press the “run query” button and I get the following message in the console. After that, I am unable to act as this user from the admin dashboard.
warning: Query has already been validated for action :sign_in_with_password.
For safety, we prevent any changes after that point because they will bypass validations or other action logic.
However, you should prefer a pattern like the below, which makes any custom modifications *before* calling the action.
Resource
|> Ash.Query.new()
|> Ash.Query.set_argument(...)
|> Ash.Query.for_read(...)
(ash 2.15.19) lib/ash/query/query.ex:1568: Ash.Query.set_argument/3
(stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
(ash 2.15.19) lib/ash/query/query.ex:429: Ash.Query.for_read/4
(ash_admin 0.9.5) lib/ash_admin/components/resource/data_table.ex:230: anonymous fn/2 in AshAdmin.Components.Resource.DataTable.update/2
(ash_phoenix 1.2.20) lib/ash_phoenix/live_view.ex:173: AshPhoenix.LiveView.keep_live/4
(ash_admin 0.9.5) lib/ash_admin/components/resource/data_table.ex:222: AshAdmin.Components.Resource.DataTable.update/2
(phoenix_live_view 0.20.1) lib/phoenix_live_view/utils.ex:498: Phoenix.LiveView.Utils.maybe_call_update!/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:659: anonymous fn/6 in Phoenix.LiveView.Diff.render_pending_components/6
(elixir 1.15.4) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:635: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6
(stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:629: Phoenix.LiveView.Diff.render_pending_components/6
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:143: Phoenix.LiveView.Diff.render/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:919: Phoenix.LiveView.Channel.render_diff/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:555: Phoenix.LiveView.Channel.mount_handle_params_result/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:1129: Phoenix.LiveView.Channel.verified_mount/8
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:84: Phoenix.LiveView.Channel.handle_info/2
(stdlib 5.0.2) gen_server.erl:1077: :gen_server.try_handle_info/3
warning: Query has already been validated for action :sign_in_with_password.
For safety, we prevent any changes after that point because they will bypass validations or other action logic.
However, you should prefer a pattern like the below, which makes any custom modifications *before* calling the action.
Resource
|> Ash.Query.new()
|> Ash.Query.set_argument(...)
|> Ash.Query.for_read(...)
(ash 2.15.19) lib/ash/query/query.ex:1568: Ash.Query.set_argument/3
(stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
(ash 2.15.19) lib/ash/query/query.ex:429: Ash.Query.for_read/4
(ash_admin 0.9.5) lib/ash_admin/components/resource/data_table.ex:230: anonymous fn/2 in AshAdmin.Components.Resource.DataTable.update/2
(ash_phoenix 1.2.20) lib/ash_phoenix/live_view.ex:173: AshPhoenix.LiveView.keep_live/4
(ash_admin 0.9.5) lib/ash_admin/components/resource/data_table.ex:222: AshAdmin.Components.Resource.DataTable.update/2
(phoenix_live_view 0.20.1) lib/phoenix_live_view/utils.ex:498: Phoenix.LiveView.Utils.maybe_call_update!/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:659: anonymous fn/6 in Phoenix.LiveView.Diff.render_pending_components/6
(elixir 1.15.4) lib/enum.ex:2510: Enum."-reduce/3-lists^foldl/2-0-"/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:635: anonymous fn/4 in Phoenix.LiveView.Diff.render_pending_components/6
(stdlib 5.0.2) maps.erl:416: :maps.fold_1/4
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:629: Phoenix.LiveView.Diff.render_pending_components/6
(phoenix_live_view 0.20.1) lib/phoenix_live_view/diff.ex:143: Phoenix.LiveView.Diff.render/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:919: Phoenix.LiveView.Channel.render_diff/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:555: Phoenix.LiveView.Channel.mount_handle_params_result/3
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:1129: Phoenix.LiveView.Channel.verified_mount/8
(phoenix_live_view 0.20.1) lib/phoenix_live_view/channel.ex:84: Phoenix.LiveView.Channel.handle_info/2
(stdlib 5.0.2) gen_server.erl:1077: :gen_server.try_handle_info/3
[debug] QUERY OK source="users" db=1.0ms queue=0.8ms idle=1868.1ms
SELECT u0."id", u0."email", u0."hashed_password" FROM "users" AS u0 WHERE (u0."email"::citext = $1::citext) LIMIT $2 ["test@test.test", 1000]
I hope you can point me in the right direction to troubleshoot! Appreciate it in advance.