kamaroly
Hi all,
I just deployed an app to production, but it is behaving in a wild way. The liveview pages show that something went wrong, but sometimes it works well. I checked the log and found the following. It looks like it keeps trying to mount the view continuously. It is happening in most of the view.
What could I be doing wrong?
Here is how the liveview mount looks like.
def mount(%{"person_id" => person_id}, _session, %{assigns: %{user: user}} = socket) do
person = get_record(person_id, actor: user)
socket
|> assign(:record_id, nil)
|> assign(:person, person)
|> assign(:jobs, person.jobs)
|> assign(:person_id, person_id)
|> assign_mobile_header_actions()
|> ok(layout: {ZippikerWeb.Layouts, :employee})
end
Here are logs:
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "vsn" => "2.0.0"}
20:31:55.383 [info] CONNECTED TO Phoenix.LiveView.Socket in 47µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "vsn" => "2.0.0"}
20:31:55.532 [info] CONNECTED TO Phoenix.LiveView.Socket in 47µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "vsn" => "2.0.0"}
20:31:55.719 [info] CONNECTED TO Phoenix.LiveView.Socket in 34µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "vsn" => "2.0.0"}
20:31:55.977 [info] CONNECTED TO Phoenix.LiveView.Socket in 34µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "vsn" => "2.0.0"}
20:31:58.214 [info] CONNECTED TO Phoenix.LiveView.Socket in 56µs
Transport: :longpoll
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "CUoCJBwyCR8DBHEeLCQHECogFxksFQk6cxZAy_k2gF5KGg4RbSeKxZNM", "_live_referer" => "undefined", "_mount_attempts" => "3", "_mounts" => "0", "_track_static" => %{"0" => "https://zippiker.com/assets/app-38549519718ce176d5d8a730d0671ae3.css?vsn=d", "1" => "https://zippiker.com/assets/app-22ba20c83c6a2e1e3c5dd785acf8c039.js?vsn=d"}, "token" => "SFMyNTY.g2gDaAR3AnYxbQAAABZ0VFpZVjUzTEZ5emhVYi8rVWhPMW9BWHcRYXBwXzQwMjBAemlwcGlrZXIAABXoAAAAAGdA60ZtAAAALHBoeDpscDpxVmxPR3hXdnRNMVEzaU9BT0FIOVl3PT0xNzMzNDMwNzE1OTc2bgYASaaFmJMBYgASdQA.l9vdKwPLPB9Bo5ApQNnhnnd7ozgPrXxgi4kVZcpPd6U", "vsn" => "2.0.0"}
20:32:00.534 [info] CONNECTED TO Phoenix.LiveView.Socket in 51µs
Transport: :longpoll
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
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
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
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
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
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
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
zachdaniel
I don’t think this is necessarily an Ash-specific question, so I will move to the LiveView forums. Unless there is some kind of exception coming from the Ash code you’re calling in your LiveView (which would cause repeated mounts in this way potentially), I’m not sure what to tell you
kamaroly
Thanks for jumping in @zachdaniel. I noticed that this is happening to authenticated users, and strangely, when I clear the cache and hard-reset the browser, the issues goes away.
I am using Ash + Ash Authentication phoenix with password strategy.
zachdaniel
kamaroly
I had a logical error in the
require_authenticated_user/2. I fixed it.