Noisy Warning in Terminal when Running Chat App: [warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
- Dominant language
- No language data
- Stars
- 664
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
While _running_ the [Phoenix Chat Example App](https://github.com/nelsonic/phoenix-chat-example) on `localhost` we are seeing this "noisy" warning:
#### `[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket`

```
code/phoenix-chat-example $ mix phx.server
[info] Running ChatWeb.Endpoint with Cowboy using http://0.0.0.0:4000
09:50:37 - info: compiled 6 files into 2 files, copied 3 in 1.7 sec
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
[info] JOIN "chat_room:lobby" to ChatWeb.ChatRoomChannel
Transport: Phoenix.Transports.WebSocket (2.0.0)
Serializer: Phoenix.Transports.V2.WebSocketSerializer
Parameters: %{}
[info] Replied chat_room:lobby :ok
[debug] QUERY OK source="messages" db=5.9ms decode=7.3ms
SELECT m0."id", m0."message", m0."name", m0."inserted_at", m0."updated_at" FROM "messages" AS m0 []
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
[warn] Ignoring unmatched topic "topic:subtopic" in ChatWeb.UserSocket
```
The warning just keeps being logged in the Terminal/Console indefinitely while the client is open ...
Tried searching Google / GitHub / StackOverflow / Elixir Forum ... 🔍
but no _obvious_ solution ... 😞
https://elixirforum.com/search?q=unmatched%20topic%20%22topic%3Asubtopic%22

If _you_ know how to remove this warning, _please_ share! Thanks! 🖖
# Additional Info
| | Version |
| ----------|:------|
| OS | OSX 10.13.2 (latest) |
| Elixir | `v1.5.3` (_latest_) |
| Phoenix | `v1.3.0` (_current/stable_) |
| Terminal | iTerm `v3.1.5` |
> Question mirrored on StackOverflow and Elixir Forum for community visibility:
+ https://stackoverflow.com/questions/48226553/phoenix-channels-warn-ignoring-unmatched-topic-topicsubtopic-how-to-avoid
+ https://elixirforum.com/t/phoenix-channels-warn-ignoring-unmatched-topic-topic-subtopic-how-to-avoid-terminal-warning-message/11509
Contributor guide
Research direction
Start by reproducing the repeated warning with `mix phx.server` in the Phoenix Chat Example App and inspect `ChatWeb.UserSocket` alongside the client while the connection remains open. Trace the source of the unmatched `topic:subtopic` messages and document a verified change that stops the warning without disrupting the `chat_room:lobby` channel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100