no route found for POST /admin
With 1 ash_admin("/admin")` in the router.ex, I can open the admin site and see it perform some actions, but for some others, I get "no route found for POST /admin ". These are some simple read actions with a couple of arguments that I'm running, if that matters. Thanks.
38 Replies
Hm…it shouldn’t be using a post request…
Do you have
ash_admin
inside of a scope?under 'scope "/"'
scope "/" do
# Pipe it through your browser pipeline
# pipe_through [:browser]
if Mix.env() in [:dev, :test] do
pipe_through([:browser])
else
pipe_through([:browser, :admin_basic_auth])
end
ash_admin("/admin")
Hm…that seems fine
What links do you click that get you to that error message?
I tried 3 read actions. Two that require user id as argument give me that error. One without rums fine
Hmm…is liveview set up on your app?
Do you have console js errors?
Yes, my app has Liveview setup. Here is the console error. :my_feed action returns the query results properly (including the calculated my_feed_eligible_by), when run manually from iex.
<my_feed>

This looks like it might be a bug in ash_admin 😓
Might need to look at the form for read action arguments and make sure it’s doing the right thing
@Jason did you ever figure this out?
No, not really
🙂
😢
well, you're not the only one with the issue now
yay!
but we still can't figure it out 😆
:thinkies:
yeah, the same issue here. I'll see if I can debug further what is causing this
So I noticed that the table param is empty here, I see that on my end aswell
@Jason do you have graphql setup in your app?
No
ok, because I had a hunch that that might be the issue because I have, but we can rule that out then
so for me it happened in the create action first, but I also have the same issue when I do a lookup by ID
It seems tied to submitting any form
Like it’s trying to submit forms over http instead of over the socket
can it be related to a change in Phoenix 1.7?
@Jason what version of liveview do you have in your app?
it could potentially, yeah. Although we're using it with Phoenix 1.7 well enough. Perhaps there is some liveview setup that is incorrect in your app?
(that our guide should have told you to do, not saying its your fault 😆)
ok, got it working 😃 I started comparing versions between your Twitter app and my app, so I was using latest and greatest liveview in my app, and that doesn't work apparently 😉
I did override, so it was my fault
0.18.3 seems to work, not sure if later versions will also work, but might . 0.19.5 does not
very interesting...
need to look at their release notes
thank you for hunting this down, we definitely want to make
ash_admin
work against the latest0.19.3
Unfortunately I'm still getting the same error message. 😦
Yeah, @drumusician resolved it by downgrading, so something in the latest versions of LV is causing the issue
now that we know its versions causing this though, I can reproduce, will fix 🙂
I see. Thank you!!
of course now that I'm upgrading I'm having some other weird error 😢
its routing events to the parent liveview for some reason
That's odd. That didn't happen to me.
okay, so I just blasted out the full removal of surface and I believe that should also have fixed your issue @Jason
and @drumusician
however, it was a massive amount of code changed so there will likely be bugs. Mind trying the
main
branch?sure. thanks!
Sorry the error still occurs.
Same error
And I get this too. (UndefinedFunctionError) function Ash.Actions.Helpers.restrict_field_access/2 is undefined or private
Should I upgrade any other dependency?
🤔 I'd upgrade anything ash related if you can 😆
How did you update
ash_admin
?
If you're on the main
branch currently, make sure to do mix deps.update ash_admin
to go to the latest ref of main
It's working!!
after getting ash_admin, authentication, and authentication_phoenix from github.
also checking out the latest main and will test
getting this error now. I am not using everything from github yet. Do you know which one this can be?

hmm this actually seems like it is ash_admin itself. It is when editing a resource
Yeah this is probably just a bug from the changeover
What’s the file/line number?
I bet it’s just a typo of
attributes
to attribute

okay, try again 🙂
awesome! Working now
I'll keep using main for the time being and will let you know if I encounter anything else
🔥