ash-project / ash_admin

A super-admin UI dashboard for Ash Framework applications, built with Phoenix LiveView.
https://hexdocs.pm/ash_admin
MIT License
106 stars 48 forks source link

Blank edit page after upgrading to 0.9.8 #83

Closed dewetblomerus closed 1 year ago

dewetblomerus commented 1 year ago

Describe the bug

On 0.9.5 I was able to edit both my resources (yea, I only have 2), after upgrading to 0.9.8 one of my resources just renders a blank page when I try to edit it. I can still edit the User resource, but not the other.

To Reproduce

All I know at the time of this writing is to upgrade an app to Ash Authentication 0.9.8 and try to edit a resource that is not the user. I do not see any errors in the server logs or the web console. If there are debugging steps I can take, I will gladly do that.

Expected behavior

Render the edit form for the resource.

Runtime

ash                         2.17.3   2.17.3  Up-to-date
ash_admin                   0.9.8    0.9.8   Up-to-date
ash_authentication          3.12.0   3.12.0  Up-to-date
ash_authentication_phoenix  1.9.0    1.9.0   Up-to-date
ash_phoenix                 1.2.23   1.2.23  Up-to-date
ash_postgres                1.3.62   1.3.62  Up-to-date
ecto_sql                    3.11.0   3.11.0  Up-to-date
esbuild                     0.8.1    0.8.1   Up-to-date
finch                       0.16.0   0.16.0  Up-to-date
floki                       0.35.2   0.35.2  Up-to-date
gettext                     0.23.1   0.23.1  Up-to-date
jason                       1.4.1    1.4.1   Up-to-date
mix_test_watch              1.1.1    1.1.1   Up-to-date
nimble_csv                  1.2.0    1.2.0   Up-to-date
phoenix                     1.7.10   1.7.10  Up-to-date
phoenix_ecto                4.4.3    4.4.3   Up-to-date
phoenix_html                3.3.3    3.3.3   Up-to-date
phoenix_live_dashboard      0.8.3    0.8.3   Up-to-date
phoenix_live_reload         1.4.1    1.4.1   Up-to-date
phoenix_live_view           0.20.1   0.20.1  Up-to-date
plug_cowboy                 2.6.1    2.6.1   Up-to-date
postgrex                    0.17.3   0.17.3  Up-to-date
swoosh                      1.14.1   1.14.1  Up-to-date
tailwind                    0.2.2    0.2.2   Up-to-date
telemetry_metrics           0.6.1    0.6.1   Up-to-date
telemetry_poller            1.0.0    1.0.0   Up-to-date

Additional context

If I roll ash_admin back to 0.9.5 with all the other dependencies on latest, the problem disappears.

Here is the blank page where the form is supposed to be:

Screenshot 2023-11-22 at 10 36 10 PM
zachdaniel commented 1 year ago

This is very strange...are there any errors in iex?

hoarf commented 1 year ago

Happens sometimes for me too. No errors on iex or chrome dev tools

zachdaniel commented 1 year ago

Is there anything at all that stands out about the forms/actions in question as abnormal? Can you show me the resources primary update actions where you are seeing the issues?

hoarf commented 1 year ago

I noticed this strange query when it loads:

SELECT u0."id", u0."email" FROM "users" AS u0 WHERE (false) []
zachdaniel commented 1 year ago

🤔 that is pretty interesting....are you setting an actor when visiting the admin interface? Or have you selected an actor in some way?

hoarf commented 1 year ago

I think so? Anyway here's the project:

I've flagged the BC.User.Info resource as an actor

https://github.com/hoarf/bindchat

zachdaniel commented 1 year ago

So, when you have your actor selected, it should appear in the top right. Can you deselect the actor and try again? Or ensure an actor is deselected? I'll look at the project tomorrow when I get a chance.

zachdaniel commented 1 year ago

@hoarf thanks for the reproduction. This is fixed in 0.10.0