Fl4m3Ph03n1x
Unknown registry: MyApp.Pubsub
Background
I have a Phoenix LiveView App inside an umbrella project which is basically a HelloWorld project.
In This Phoenix App is special though, in that it is a Desktop App:
My Phoenix app does not use Ecto nor any DB, so I had to add the usual PubSub line to the supervision tree in application.ex.
Problem
Everything works as expected, except when I close the application. Upon closing it I get an error:
12:19:22.507 [error] GenServer #PID<0.553.0> terminating
** (ArgumentError) unknown registry: WebInterface.PubSub
(elixir 1.13.1) lib/registry.ex:1334: Registry.info!/1
(elixir 1.13.1) lib/registry.ex:985: Registry.register/3
(phoenix_pubsub 2.0.0) lib/phoenix/pubsub.ex:117: Phoenix.PubSub.subscribe/3
(phoenix 1.6.5) lib/phoenix/channel/server.ex:419: Phoenix.Channel.Server.init_join/3
(phoenix 1.6.5) lib/phoenix/channel/server.ex:378: Phoenix.Channel.Server.channel_join/4
(phoenix 1.6.5) lib/phoenix/channel/server.ex:298: Phoenix.Channel.Server.handle_info/2
(stdlib 3.16.1) gen_server.erl:695: :gen_server.try_dispatch/4
(stdlib 3.16.1) gen_server.erl:771: :gen_server.handle_msg/6
Last message: {Phoenix.Channel, %{}, {#PID<0.541.0>, #Reference<0.3172133806.691273734.151736>}, %Phoenix.Socket{assigns: %{}, channel: Phoenix.LiveReloader.Channel, channel_pid: nil, endpoint: WebInterface.Endpoint, handler: Phoenix.LiveReloader.Socket, id: nil, join_ref: "4", joined: false, private: %{}, pubsub_server: WebInterface.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "phoenix:live_reload", transport: :websocket, transport_pid: #PID<0.541.0>}}
State: #Reference<0.3172133806.691273734.151738>
Here is my application.ex file:
defmodule WebInterface.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
alias Desktop
@impl true
def start(_type, _args) do
children = [
WebInterface.Telemetry,
WebInterface.Endpoint,
{Phoenix.PubSub, name: WebInterface.PubSub},
{Desktop.Window,
[
app: :web_interface,
id: WebInterface,
title: "Web Interface",
size: {600, 500},
menubar: WebInterface.MenuBar,
url: &WebInterface.Endpoint.url/0
]}
]
opts = [strategy: :one_for_one, name: WebInterface.Supervisor]
Supervisor.start_link(children, opts)
end
@impl true
def config_change(changed, _new, removed) do
WebInterface.Endpoint.config_change(changed, removed)
:ok
end
end
What am I doing wrong?
Marked As Solved
kokolegorille
Also Liked
shahryarjb
7stud
If you are getting the error:
(ArgumentError) unknown registry: AuctionWeb.PubSub
while trying to follow “Phoenix in Action 1.4”, then you are in luck! Go here:
1
Popular in Questions
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
I tried installing
elixir 1.11.2
erlang 23.3.4
via asdf in my zsh shell. Enabled the versions locally and globally.
When I list them ...
New
Other popular topics
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
Phoenix 1.4.0 released
Phoenix 1.4 is out! This release ships with exciting new features, most notably
with HTTP2 support, improved deve...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









