Unconnected user is stuck inside the server

(#395) Bug Fixed voice

Summary

A user on our server turned off their PC while they were connected to a voice channel using the native Linux desktop app (We no longer have access to their system settings). Since then, a ghost of their user has remained permanently connected. Deleting the voice channel does not resolve the issue and the 'ghost' remains connected. Kicking the user does not solve the issue, and inviting them back causes their app to show the community as duplicated.

Steps to reproduce

This might not be reproducible at the moment, but this is how we suspect it happened: 1 - The user connects to a voice channel. 2 - The user turns off their PC while still connected. Expected result: The user disconnects. Actual result: The user's session gets stuck inside the voice channel.

Environment (optional)

stable build 84 (356bd53), 2026-03-06 03:57:38 UTC, Chrome 144.0.0.0, Windows NT 10.0 (x64)

Logs or screenshots (optional)

image image
  • 560350976-f8297e03-8476-43e3-afa8-89da6f8a6ad0.png

    560350976-f8297e03-8476-43e3-afa8-89da6f8a6ad0.png

    1904×307 | 67 kB

  • 560352081-72f966d9-b429-4d1d-a15d-7bcf262f1959.png

    560352081-72f966d9-b429-4d1d-a15d-7bcf262f1959.png

    418×663 | 81 kB

Merged posts

These posts were merged into this one. Their comments are now part of the conversation below, marked with where they came from.

Merged from #429 Stuck in voice channel that no longer exists

RexSystemoriginally by @Krazy4Games on GitHub

Report details

Summary

A while ago, I joined a voice channel in my new community with a music bot. I later left the channel and closed the app. When I logged in the next day, I was still connected to the channel. Eventually, I was able to get out of the voice channel. I am not connected to it. Despite this, the server icon and the active now section of the home screen both show me still in the call. I have tried the app and the browser, restarting, joining other channels, logging out and signing back in later, kicking the bot from the server, and deleting the channel. It still says I am connected to a channel that no longer exists. This issue does not impact me from being able to join other voice channels, but it does not seem to update the UI. This issue has persisted since 3/4/2026. image image

Steps to reproduce

  • Join voice channel with bot.
  • Leave voice channel.
  • Check if still connected after relaunching app.
  • Leave voice channel and relaunch app.
  • If still connected, delete voice channel.
  • You are now stuck in a channel that does not exist.
  • 565856298-7925c166-e196-4967-b336-1db1a5f0faab.png

    565856298-7925c166-e196-4967-b336-1db1a5f0faab.png

    350×134 | 8 kB

  • 565856424-eaafffda-675d-4290-9950-522b5587e4c5.png

    565856424-eaafffda-675d-4290-9950-522b5587e4c5.png

    181×90 | 7 kB

Merged from #404 Server VC shows members that are not online

RexSystemoriginally by @nimomerole on GitHub

Report details

Summary

When I hover over the server icon, it shows 2 members are currently in VC even though they are not. If other members join a VC, it shows their pfp as normal. Refreshing Fluxer does not fix the issue, and it has not naturally went away for a few days now.

Steps to reproduce

I am unsure how to reproduce it.

Logs or screenshots (optional)

image
  • 562019254-8e9742ec-bde6-4120-a966-6c09bb23fde3.png

    562019254-8e9742ec-bde6-4120-a966-6c09bb23fde3.png

    402×716 | 103 kB

10 comments

Sign in with Fluxer to comment and vote.
Comment by @TheBlindBard1978
RexSystem 1 vote originally by @TheBlindBard1978 on GitHub
I've experienced this in the Just Vibin' server. I banned somebody, mid-sentence from the voice channel and there are a lot of ghosts, even though nobody is connected, and much like the OP, I have deleted voice channels only for ghosts to not fanish.
Comment by @nimomerole
RexSystem 1 vote Merged from #404 originally by @nimomerole on GitHub
The ss above shows that the members in VC are included with the other two members who are not in VC when hovering over the server icon.
Comment by @2new4u
RexSystem 1 vote edited Merged from #404 originally by @2new4u on GitHub OP
Could it be the same issue that I reported here: https://feedback.fluxer.com/p/395 ? At some point, those members were inside that voice channel. They either disconnected by shutting off their PC, or they were banned/kicked, which resulted in their session getting stuck.
Comment by @nimomerole
RexSystem 1 vote Merged from #404 originally by @nimomerole on GitHub
Oh yes it is! Has there been a known fix for it yet?
Comment by @cproudlock
RexSystem 1 vote Merged from #404 originally by @cproudlock on GitHub
I dug into the gateway code — the root cause is that session.erl's terminate/2 callback is a no-op:
terminate(_Reason, _State) ->
    ok.
When a WebSocket drops ungracefully (PC poweroff, network loss), the session flow is:
  1. handle_socket_down marks socket as undefined, starts 10s resume timer
  2. No reconnection → resume_timeout fires → {stop, normal, State}
  3. terminate/2 is called but does nothing
  4. Guild processes are never notified → voice states persist in KeyDB until TTL (up to 1 hour)
Graceful disconnect works fine — session_voice.erl:handle_voice_disconnect/1 calls dispatch_guild_voice_disconnects/2 which notifies all guilds. But that code path is never reached on ungraceful death. Suggested fix: implement cleanup in terminate/2:
terminate(_Reason, State) ->
    case maps:get(voice_channel_id, State, undefined) of
        undefined -> ok;
        _ChannelId ->
            %% Reuse the same disconnect logic as graceful disconnect
            Guilds = maps:get(guilds, State, #{}),
            UserId = maps:get(user_id, State),
            SessionId = maps:get(id, State),
            ConnectionId = maps:get(connection_id, State, null),
            Request = #{
                user_id => UserId,
                session_id => SessionId,
                connection_id => ConnectionId
            },
            dispatch_guild_voice_disconnects(Guilds, Request),
            dm_voice:disconnect_voice_user(UserId, State)
    end,
    ok.
This ensures the same cleanup runs whether the user explicitly disconnects or their connection drops.
Comment by @Krazy4Games
RexSystem 1 vote Merged from #429 originally by @Krazy4Games on GitHub
Because the channel no longer exists (dumb mistake on my part) I also cannot rejoin it again. image
  • 565861432-44b4504b-fe84-4a71-a678-f3a7125c71a0.png

    565861432-44b4504b-fe84-4a71-a678-f3a7125c71a0.png

    360×167 | 9 kB

Comment by @2new4u
RexSystem 1 vote originally by @2new4u on GitHub OP
This issue appears to have been resolved today. We had three 'ghost' sessions, but they have all been cleared. The duplicate community issue was resolved last week by changing the app theme. image
  • 566972075-dc7c6531-e7f0-4e24-aae2-1f016bd68eeb.png

    566972075-dc7c6531-e7f0-4e24-aae2-1f016bd68eeb.png

    273×119 | 16 kB

Comment by @2new4u
RexSystem 1 vote Merged from #404 originally by @2new4u on GitHub OP
I've closed my original issue as the 'ghost' sessions seem to have been cleared today. Has the latest update solved your issues too?
Comment by @Krazy4Games
RexSystem 1 vote Merged from #429 originally by @Krazy4Games on GitHub
As of 3/23/2026 the issue seems to be resolved. The UI has finally updated and it no longer says that I am still connected to the voice channel.