Presence user momentarily disappears in Phoenix 1.4

I set up a simple chat demo app with Phoenix Presence, pretty much following the Presence Guide. The app works, but occasionally when a user posts a new message, the Presence list loses a user or two and then they come back…often it is the user just posting that goes away and comes back a second or two later.

It does the same on my local in dev mode and on the demo app I set up on Heroku ( running in production mode. Just open two tabs or browsers with different users and post some messages to see what I mean.

Any suggestions or ideas what may be happening? (I assume this is not expected behavior)

Do you have the elixir channel and javascript code you can share? Do the logs show a crash when you post a message? There is either a bug on the server or client, since your deployed app shows the client rejoin when sending a message, which would cause the flapping presences you are seeing:

[Log] Joined successfully – Object 
[Log] new_msg received with: {body: bar, name: foo}
[Log] Joined successfully – {} 
1 Like

:man_facepalming: Thanks Chris…Stupid typo bit me…had handler for new message returning no_reply instead of noreply. The errors were not showing in the Heroku logs, but were in the local.

Thanks for the help and sorry for the false alarm! :wink: