dashboard keeps reloading nonstop
dashingspidy opened this issue · comments
Environment
Make sure you are using the latest LiveView and Dashboard versions before continuing.
- Elixir version (elixir -v): Elixir 1.11.0 (compiled with Erlang/OTP 23)
- Phoenix version (mix deps): 1.5.5
- Phoenix LiveView version (mix deps): 0.12.1
- Phoenix Dashboard version (mix deps): 0.2.0
- Operating system: mac os 10.15.7
- Browsers you attempted to reproduce this bug on (the more the merrier): firefox, safari
Actual behavior
Fresh installation of Elixir and Phoenix. Dashboard just keeps loading.
Logs:
`[error] an exception was raised:
** (FunctionClauseError) no function clause matching in Phoenix.LiveView.Channel.start_link/1
(phoenix_live_view 0.12.1) lib/phoenix_live_view/channel.ex:12: Phoenix.LiveView.Channel.start_link({TwitterWeb.Endpoint, {#PID<0.746.0>, #Reference<0.3387207147.1561067521.32514>}})
(elixir 1.11.0) lib/dynamic_supervisor.ex:693: DynamicSupervisor.start_child/3
(elixir 1.11.0) lib/dynamic_supervisor.ex:679: DynamicSupervisor.handle_start_child/2
(stdlib 3.13.2) gen_server.erl:706: :gen_server.try_handle_call/4
(stdlib 3.13.2) gen_server.erl:735: :gen_server.handle_msg/6
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
`
You are using an old version of Phoenix LiveView. Please run mix archive.install hex phx_new
to make sure you have the latest version of the installer. You should be running on LV ~> 0.14.x or latest. Thanks!
I'm already using latest version of phoenix. But to make sure i re-run the command to update and i just checked mix.lock file and found this {:phoenix_live_view, "~> 0.12.0", [hex: :phoenix_live_view, repo: "hexpm", optional: false]},
so it using version 0.12.0 on latest version of phoenix.
As mentioned, 0.12.0 is not the latest. Run mix archive.install hex phx_new
to update phx_new
(the phx.new
is different from the phoenix
version) and generate a new project. In case there is a already code in the project and you don't want to start from scratch, run phx_new
in a separate directory and copy the contents of defp deps do
from the mix.exs
in the new project to your current project.
Actually, ignore me. There seems to be something wrong with Hex resolution and it is picking up old versions. One second.
Please open up your mix.exs
and change:
{:phoenix_live_dashboard, "~> 0.2"},
to:
{:phoenix_live_dashboard, "~> 0.3 or ~> 0.2.9"},
And it should be good!
Solved. Thank you!
I have updated the phoenix generator so users won't have this problem when generating new apps. 👍
phoenix generator not pulling new version. issue is still there. Just to let you.