This is an error that we’ve been encountering in production and is causing a fair amount of user issues. I’ve been doing some research into this error and wanted to make a summary and ask for opinions:
Prior discussions and resources:
-
Why I get [warn] Ignoring unmatched topic?
- Most related and most helpful
-
https://github.com/phoenixframework/phoenix/issues/2052
- Not too helpful because the topic actually did not exist
-
https://github.com/phoenixframework/phoenix/issues/1603
- Not really helpful because I’ve been unable to find “similar questions in the issues list”
- Line in the source code: https://github.com/phoenixframework/phoenix/blob/v1.2.5/lib/phoenix/socket/transport.ex#L268
From my research it appears that the same “Ignoring unmatched topic” error happens in the following cases:
- The topic doesn’t actually exist
a. This is generally what I would expect based on the error message
b. I believe this happens on line 231 - There is no channel process running for the given topic and the given user
a. This is unexpected for me
In my mind I would expect #1 and #2 to have different error messages. Than #1 since the solutions to the problem are quite different.
My first question is am I understanding this properly?
My second question is, is it possible to add additional logging to help determine what clients and client versions are causing #2 (I’d like to know the state of socket.assigns
)? Without actually modifying Phoenix I don’t see any way to “hook” into the “reply_ignore” case. I also want to know what event is being sent when this error message is being printed. I think it is message:new
because the client is trying to send a new message.