Handling "Ignoring unmatched topic" error

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:

From my research it appears that the same “Ignoring unmatched topic” error happens in the following cases:

  1. 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
  2. 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.

I’ve never actually seen it in mine actually, do you have a reproducible example? Only times I recall this error being mentioned was a misspelling somewhere or something else like sending a message before the topic was ‘fully’ established (wait for the callback before you start sending data) and so forth.

Yeah I’m pretty sure there’s some sort of client side bug. Especially with the iOS app. Just trying to track it down but having some trouble getting some debug info to tell the app developers.

Any chance at making a log of every-single-packet transmitted across the web socket? That should make it pretty obvious then especially if in a nicely common format like pcap. :slight_smile: