collegeimprovements
Any JS command, push_patch etc are not working and giving the following error:
live_socket.js:377 Uncaught TypeError: Cannot read properties of null (reading 'el')
at LiveSocket.replaceMain (live_socket.js:377:60)
at live_socket.js:748:12
at LiveSocket.withPageLoading (live_socket.js:718:23)
at LiveSocket.historyRedirect (live_socket.js:747:10)
at Object.exec_navigate (js.js:58:21)
at js.js:17:22
at Array.forEach (<anonymous>)
at js.js:16:40
at Array.forEach (<anonymous>)
at Object.exec (js.js:12:14)
I’m having the following error when I try to apply push_patch.
** (ArgumentError) cannot push_patch/2 to
%URI{authority: nil, fragment: nil, host: "localhost", path: "/events/de98359c-9b32-4197-82f0-fa7b2e283646", port: 4000, query: nil, scheme: "http", userinfo: nil}
because the given path does not point to the current root view APIWeb.Ev.Index`
Relevant handle_event code:
@impl true
def handle_event("debug", %{"event" => event_guid} = _params, socket) do
socket
|> push_patch(to: "/events/#{event_guid}")
|> noreply_socket()
end
push_navigate works but it takes 10 seconds while normal anchor tag just works instantaneously.
What can I try here ?
LiveView Version: 0.18.16
Phoenix Version: 1.16
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
** (ArgumentError) expected :max_attempts to be a positive integer, got: {:@, [line: 10, column: 19], [{:max_attempts, [line: 10, column:...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex











Marked As Solved- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mcrumm
Someone reported a similar issue recently and it was resolved by making sure all dependencies were up-to-date, including making sure to rebuild client assets:
Does any of that advice apply in your case?
Also Liked
mcrumm
Here are the rules around LiveView navigation:
Patch is only for modifying the URL and staying on the current LiveView process. It only works for links to the current LiveView.
Navigate is to move between routes in the same live_session block in your Router. It can also be used to tear down the current LiveView process and start a new one.
Note that if you do not have any explicit live_session blocks in your Router then all live routes are in the default live session.
The slowness you are experiencing with navigate is all of the extra round-trips the client must do because the server returns errors on the invalid navigate call.
Edit: early submit
collegeimprovements
I nuked all the deps and reinstalled them and it fixed it.
Thanks a lot for your help