Comments (5)
We haven't introduced any changes to the voice implementation since 3.13.0
from discord.net.
And in the connection system or the one that is responsible for keeping the session active?
from discord.net.
Nothing
You can look at the changelog, no changes have been made to those systems
from discord.net.
I've had this issue with 3.13.0 too. Before discord required the heartbeat thing, I had rarely any disconnects. This must have been at least a few months now. I wish I had more info, but for now, this is the best stacktrace/information I can get.
I've double checked and it is not due to my cancellation token. I used a dummy one and still encountered the issue.
Here are my relevant logs. Ignore the ERR in front of the logs, I'm pretty sure I wrote all the info as errors.
[22:24:20 ERR] Discord: Discord.Net v3.13.1 (API v10)
[22:24:20 ERR] Gateway: Connecting
[22:24:21 ERR] Gateway: You're using the GuildScheduledEvents gateway intent without listening to any events related to that intent, consider removing the intent from your config.
[22:24:21 ERR] Gateway: You're using the GuildInvites gateway intent without listening to any events related to that intent, consider removing the intent from your config.
[22:24:21 ERR] Gateway: Connected
[22:24:22 ERR] Gateway: Ready
[22:24:25 ERR] Audio #1: Connecting
[22:24:25 ERR] Audio #1: Unknown OpCode (18)
[22:24:25 ERR] Audio #1: Unknown OpCode (20)
[22:24:25 ERR] Audio #1: Connected
[22:29:00 ERR] Audio #1: Unknown OpCode (18)
[22:29:00 ERR] Audio #1: Unknown OpCode (20)
[22:42:11 ERR] Audio #1:
[22:42:24 ERR] Audio #1: Disconnecting
(WRITTEN BY MY PROGRAM) [22:42:24 ERR] The operation was canceled. at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Discord.Audio.Streams.BufferedWriteStream.WriteAsync(Byte[] data, Int32 offset, Int32 count, CancellationToken cancelToken)
at Discord.Audio.Streams.OpusEncodeStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancelToken)
at System.IO.Stream.g__Core|29_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at System.IO.Strategies.BufferedFileStreamStrategy.CopyToAsyncCore(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at NCMBot.AudioService.SendAudioAsync(IGuild guild, Byte[] song, CancellationToken ct) in C:\Users\kevin\source\repos\NCMBot\NCMBot\AudioService.cs:line 129
from discord.net.
The close was from here:
From DefaultWebSocketClient.cs
if (socketResult.MessageType == WebSocketMessageType.Close)
throw new WebSocketClosedException((int)socketResult.CloseStatus, socketResult.CloseStatusDescription);
Looking earlier, it seems like it got a message
case GatewayOpCode.Reconnect:
{
await _gatewayLogger.DebugAsync("Received Reconnect").ConfigureAwait(false);
_connection.Error(new GatewayReconnectException("Server requested a reconnect"));
}
Maybe since I'm still sending data when the opcode to reconnect comes in, discord instantly boots the bot from the server? And that somehow prevents the bot from reconnecting again? Or maybe since after catching the exception (I don't know if it's intended for the library to throw the exception), I almost immediately call CreatePCMStream and it doesn't like it? Or it requires re-authentication and since it's sending data, it errors out? I'll see if I can dig deeper.
Update: I have just had another reconnect attempt after running it a while and it succeeded so above could be a red herring.
from discord.net.
Related Issues (20)
- [Bug]: AUTO_MODERATION_FLAG_TO_CHANNEL is not handled correctly (throws on missing ChannelId)
- [Bug]: Modal interactions don't support Regex. HOT 2
- discord.net is missing NuGet package README file HOT 1
- [Bug]: CreateTextChannelAsync/CreateGuildChannelAsync throws a NullReferenceException if Topic is set to null HOT 1
- [Bug]: Can't respond to interaction HOT 2
- discord.net.core is missing NuGet package README file HOT 2
- [Bug]: RespondAsync empty throws an unhandled exception HOT 2
- GuildId is missing in SocketDiscordClient.MessageDeleted event HOT 3
- ReceivedGatewayEvent HOT 5
- [Bug]: Nested attributes are not passed down to commands
- [Bug]: Can`t delete or modify ephemeral message after Interaction error 10008 Unknown Message HOT 2
- [Bug]: HOT 3
- [Bug]: MessageUpdate not showing old message content when bot is rebooted HOT 7
- [Bug]: AutoModActionExecuted doesnt seem to fire HOT 1
- Add Unknown event
- Request: Easy bypass for Defer 3 Second clock sync issue HOT 5
- [Bug]: CreatePostWithFileAsync Throws Error for Forums that Require Tags
- Spanish translation HOT 3
- [Bug]: ModifyMessageAsync timed out HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord.net.