jle
Hi, I have a problem in one computer with applications running liveview
It has to be a problem with my computer configuration
The same application running on different computers works perfectly
I also ran the examples from Chris McCord with same problem
All these worked some days ago
I tested with firefox and chrome with same behaviour
I tested with elixir 12 and 13. No surprises it didn’t work with both, I’m sure it has to be a configuration problem in my computer
My question is about how to try to debug this issue
I added this trace on mount
def mount(_params, _session, socket) do
...
Logger.info("_____________ connected?(socket) #{connected?(socket)}")
...
and this is the output
[info] Running DemoWeb.Endpoint with cowboy 2.9.0 at 0.0.0.0:4000 (http)
[info] Access DemoWeb.Endpoint at http://localhost:4000
[watch] build finished, watching for changes...
[info] CONNECTED TO Phoenix.LiveView.Socket in 64µs
Transport: :websocket
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "bDccJkAePU00HgMdJj8GPgAgNFgqXBwXYm-OmNl4UXdHkG4VthU6L6xg", "vsn" => "2.0.0"}
[info] GET /
[debug] Processing with Phoenix.LiveView.Plug.Elixir.DemoWeb.ImageLive/2
Parameters: %{}
Pipelines: [:browser]
[info] _____________ connected?(socket) false
[info] Sent 200 in 68ms
[info] CONNECTED TO Phoenix.LiveView.Socket in 53µs
Transport: :websocket
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "RH4FFgYQDjAOXy1QBidWKAVzFgIDLC4n450cwzwahoHbuU7EwGSKdJB_", "vsn" => "2.0.0"}
Any tip of how could I investigate where the problem is?
Thanks (marvellous language, phoenix is impressive, nice community… congrats!!!)
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
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
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
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
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
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 47 to 38- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jle
Sadly I cannot reproduce the problem any more
After moving .cache to .cache.old and deleting priv/static/assets, it worked (assets where regenerated on mix phx.server correctly)
Then I deleted .cache and moved back .cache.old to .cache, and deleted again priv/static/assets in order to reproduce the problem and investigate what was producing this behavour… but… it didn’t fail anymore
I’ve created a new project with the “original and perhaps corrupted cache”, and everything is working fine
Perhaps, I did a mistake, and I didn’t close a browser when manipulating .cache folder. Not sure
I’m not happy because I cannot reproduce the problem and try to understand the exact point that produced it. I also was interested on checking if could be possible to have better information on phoenix side when problems arrive.
The app.js as derek-zhou detected was wrong, probably because someone (esbuild?) was getting an old and invalid version from .cache
After manipulating this folder… it worked due to… don’t know, could be due to updated timestamps, running application…
Thank to all of you, I learned a lot trying to understand this problem
jle
ALMOST SOLVED!!!
I’ve moved the full .cache folder to a new name, and it’s WORKING!!!
now I’m going to check what is producing this inside this folder
jle
BUM!!!
They are different!!! quite different
I cannot put the differences here because is a huge file and there are many differences
I have no idea of what can be happening with esbuild, I’m going to try to investigate and try to solve it
I’ll keep you informed if I can get any advance about it
Regards
derek-zhou
Now you have the same project, built in 2 different machines, one working, one not working. Can you compare
priv/static/assets/app.jsfrom the 2 machines. Are they the same? If not, then youresbuilddid not do the right thing on the bad machine.jle
I’ve deleted cache, not fixed
I’ve moved full browser folder (chromium and firefox), therefore starting with a new instalation, same behaviour
I’ve installed brave browser, and no changes

Liveview doesn’t work, and liveSocket returns root instead of roots
jle
good point about root vs roots
I runned on a “normal” computer, and the exit of liveView is…
There are some diferences
wanton7
Anyway your JavaScript file your browser gets is quite likely from old LiveView. Now you just have to find out why this is happening. I would close all tabs and clear browser cache.
jle
same project on different machine has enableDebug and runs as espected
These are dependencies on mix.exs
The client (browser) console, propose in autocompletio enableDebug (twice), but it returns an error when invoqued
wanton7
If you look at phoenix_live_view/assets/js/phoenix_live_view/live_socket.js at 1480b49e52e973f551c88bede2f802e5f5d8c298 · phoenixframework/phoenix_live_view · GitHub
You can see that LiveSocket should have function called enableDebug
also your object has field root but newest LiveSocket should have field called roots phoenix_live_view/assets/js/phoenix_live_view/live_socket.js at 1480b49e52e973f551c88bede2f802e5f5d8c298 · phoenixframework/phoenix_live_view · GitHub
I don’t think you are running the latest LiveView. I just created new project with latest LiveView and object has field roots.
By running
mix phx.new --versionI getPhoenix installer v1.6.5.jle
This is the result of executing liveSocket on console