From Chris McCord examples on github messages on firefox…
One or more documents in this page is in Quirks Mode, which will render the affected document(s) with quirks incompatible with the current HTML and CSS specifications.
Quirks Mode exists mostly due to historical reasons. If this is not intentional, you can add or modify the DOCTYPE to be `<!DOCTYPE html>` to render the page in No Quirks Mode.
1 element
Document in the DOM tree Mode URL
document Quirks Mode http://localhost:4000/phoenix/live_reload/frame
On chromium…
Cookie “_demo_key” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite
Have you tried to run debug mode on client side? You can find more information here. After you enable it you can see all messages in network panel in browser. Maybe you can share it with us too.
Have you tried 127.0.0.1 instead of localhost? On my Windows computers localhost has problems with WebSocket connections on Chrome. WebSocket connections take very long time to connect. But 127.0.0.1 works fine.
Are sure you are running 100% identical code in both machines? Because liveSocket is a variable that JavaScript related to LiveView should create. If it’s not available then it feels to me that something is wrong with the JavaScript code or maybe the code itself is not run at all.
Exactly. Can you check source code from browser debug tool? Because it looks like your JS is not executed on that machine. Which browser do you use? Do you use some extensions? Ad blockers? What about log from your terminal/console when you start Phoenix app, usually webpack “compile” your assets and generate main js file. What do you use for assets? esbuild? node? webpack?
Yep, I tested with my code, and with examples from Chris McCord downloaded from github and compiled on my machine
I downloaded my on code from repository in different folders and machines
I created new projects, and works on all machines, excepting this one
Everything works fine except in one machine. In that machine, nothing related with liveview works
I’m going to test a client from a different machine against the server. Then I will know if the problem is on server side, or client side (I bet is on server side, elixir/phoenix)
I could, I could create a very simple application that fails on this computer, but… I don’t think it will help
I have problems with my code, with a new project, with code from examples from Chris MacCord on github. And only fails on one machine. The same code in 3 different machines, works perfectly