You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
“The application did not respond” - error within discord #9
Hey, thanks for all your time and effort on this bot. It’s great when it works however we are getting almost daily “the application did not respond” within discord.
We manage a few discord servers. So we have an about 5 requestrr containers.. actually 10… 5 for regular requests and 5 for foreign requests that get added to different arr’s.
We split the containers we use between all of the discord channels to split the load. But a lot lately we are getting this error. We dont know if it’s a requestrr error or an issue with discord api. A lot of the time we either have to reboot the container (sometimes is fixes it), redeploy the container, and if that doesn’t work kick the bot and readd it to discord. It was manageable at first but now we are getting it more and more.
Im hoping we can work together to resolve this issue.
That sounds like an interesting setup, this might be abit tricky.
You could be right, it might be an issue with the discord api, but the only way we can find out is check the logs of each container when they error and capture why it errored.
Can you collect a copy of the logs (in text form) and post them?
That way it should give an idea why it's happening.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Removing movie notification for user with ID 979274836897595462 as it could not be found in any of the guilds.
[2024-02-10 20:27:05 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
[2024-02-10 20:44:19 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
[2024-02-10 22:25:35 +02:00] [105 /WebSocketRec] [Warn ] Unknown event: VOICE_CHANNEL_STATUS_UPDATE
payload: "status": null, "id": "954093177139253318", "guild_id": "953038263797563422"
[2024-02-11 00:00:56 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
Application is shutting down...
Starting Requestrr - build v2.1.4 - Hotfix 4
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
Hosting environment: Production
Content root path: /root
Now listening on: http://[::]:4545
Application started. Press Ctrl+C to shut down.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot configuration changed: restarting bot
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot configuration changed: restarting bot
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:39 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:39 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)
at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection)
at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
[2024-02-11 04:19:29 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
Thanks for posting your error log, I have seen an error similar to what you have and I think I have replicated it.
I will need to test some more to verify the issue then correct it, but can I ask if you have "Hide slash command request messages in channels" enabled?
It can be enabled or disabled, I was wondering if that is the culprit, but from testing I don't think so, it's in the "Chat client" section.
It appears to be with the building of the slash commands when the bot is reset, my guess there could be a network issue and this might be part of the issue as it's not reconnecting to discord... Do you have any special network setting for your containers? And do you have any roles setup in the "Chat clients" section?
Here’s some more logs on a different container. Same issue:
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.HttpGetAsync(HttpClient client, RadarrSettings settings, String url) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 431
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.FindExistingMovieByMovieDbIdAsync(Int32 theMovieDbId) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 405
fail: Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClient[0]
An error occurred finding an existing movie by tmdbId "37541" with Radarr: Name or service not known (radarr:7878)
System.Net.Http.HttpRequestException: Name or service not known (radarr:7878)
---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.HttpGetAsync(HttpClient client, RadarrSettings settings, String url) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 431
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.FindExistingMovieByMovieDbIdAsync(Int32 theMovieDbId) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 405
This might take me a while to pin point.
I will keep thinking about this and try to come up with an answer.
Just to double check, are all the services you connect requestrr too all on the one server?
Is there any known network issues such as drop-outs with the server?
Not at the moment, this is still in the back of my mind and I am looking for issues but haven't seen any links to what you have been expecting.
There is a few things to note however, I have a few long term plans, one of which is to setup requestrr to allow to handle multiple sources (multiple radarr connections and using categories to control each one) and to also change how the slash commands are created.
Both of these are going to be a while and might help your setup, but also don't solve the underlying issue your having, at the moment.
I was still wondering if any of the traffic was through a vpn setup on the network that might be part of the issue, but I'm not sure.
I'll keep exploring, if I find something I will let you know.
@edrock200, interesting, thanks for the feedback :)
It's been a few days since moving and no errors. Also, restarting the host doesn't cause the errors mentioned in the initial post since moving to the dev version, so I think you got it. :)
Hey guys, I've reached to to DSharps support but still waiting for a response... So I am a little bit stuck in which direction we go from here atm. @andrewmcd7 did the dev version help in anyway or the problem is still persisting after giving it some more time? I'm not sure if you moved back to the latest version or stayed with dev after giving it a try?
Hey guys, I've reached to to DSharps support but still waiting for a response... So I am a little bit stuck in which direction we go from here atm. @andrewmcd7 did the dev version help in anyway or the problem is still persisting after giving it some more time? I'm not sure if you moved back to the latest version or stayed with dev after giving it a try?
The dev version appears to have resolved (I am working with @andrewmcd7 as well.) thank you!
On another note, I reached out to DSharp support again on my original post, after commenting on this issue a dev got back to me and confirmed what we have discovered, the commands are best setup as global commands, when not setup this way and setup for a number of guilds/servers, it can cause issues like we saw (due to a few things it seems like rate limiting).
So...I will have to work out the best way to deal with this going forward and update Requestrr to use global commands instead as default, but block and restrict access when permissions are given and/or when direct messaging is not desired.
Once I have something more here, I will update the dev branch and we can go from there.
I will keep you guys posted.
Hey @Spillebulle,
I'll have to have a look into this, it just seems that your bot is losing connection to Discord, are you running it through a VPN by any chance? I've seen something like this happens when a VPN is blocking or losing connection.
It seems like this might be not 100% related to this issue.
Hmmm, ok, I'll have to have a think and toy then, I am working on slowly changing to DSharpPlus v5, I have noticed it has some other info when it comes to feedback, when I have it in a state that's manageable, I plan to push it to the dev branch to test, I'll post here when that's done.
Hey everyone,
I have had a pull request with a fix that might help with this issue.
I am not 100% this will fix everything, however, it is worth a shot, I have setup another container specifically with this fix, if anyone is willing, can you please try this container to see if this helps?
Switch your docker tag to :dev-ratelimit
Please let me know if you use the container and if the problem still occurs, it fixes the issue or if anything else happens.
If you would like compiled files for a select OS, please let me know.
Just an update on this issue
This has also been linked to creating more then 25 commands per group.
That is, if you have 15 categories for movies and 11 for tv shows, this adds up to 26 commands for the request group, going over the command limit and causing this issue.
This is also why turning on message mode help solve this issue, as guide commands are limited to 25 commands, while global commands are limited to 100.
Staying under the 25 limit allows the bot to run correctly
Activity
thomst08 commentedon Feb 10, 2024
Hey @andrewmcd7,
That sounds like an interesting setup, this might be abit tricky.
You could be right, it might be an issue with the discord api, but the only way we can find out is check the logs of each container when they error and capture why it errored.
Can you collect a copy of the logs (in text form) and post them?
That way it should give an idea why it's happening.
If your unsure how to get the logs, this link might help: https://github.com/thomst08/requestrr/wiki/Where-are-the-logs%3F
Let me know how you go. :)
andrewmcd7 commentedon Feb 10, 2024
I will next error. Thank you
andrewmcd7 commentedon Feb 11, 2024
Hope this is helpful.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Removing movie notification for user with ID 979274836897595462 as it could not be found in any of the guilds.
[2024-02-10 20:27:05 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
[2024-02-10 20:44:19 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
[2024-02-10 22:25:35 +02:00] [105 /WebSocketRec] [Warn ] Unknown event: VOICE_CHANNEL_STATUS_UPDATE
payload: "status": null, "id": "954093177139253318", "guild_id": "953038263797563422"
[2024-02-11 00:00:56 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
Failed to determine the https port for redirect.
Application is shutting down...
Starting Requestrr - build v2.1.4 - Hotfix 4
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
Hosting environment: Production
Content root path: /root
Now listening on: http://[::]:4545
Application started. Press Ctrl+C to shut down.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot configuration changed: restarting bot
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot configuration changed: restarting bot
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:36 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:37 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
[2024-02-11 01:11:39 +02:00] [0 / ] [Crit ] There was an error registering application commands
System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Collections.Generic.List
1.set_Capacity(Int32 value) at System.Collections.Generic.List1.InsertRange(Int32 index, IEnumerable1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext() [2024-02-11 01:11:39 +02:00] [0 / ] [Crit ] There was an error registering application commands System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray') at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable) at System.Collections.Generic.List1.set_Capacity(Int32 value)at System.Collections.Generic.List
1.InsertRange(Int32 index, IEnumerable1 collection)at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<b__0>d.MoveNext()
warn: Requestrr.WebApi.RequestrrBot.ChatBot[0]
Bot has been restarted.
[2024-02-11 04:19:29 +02:00] [111 /ConnectionCl] [Crit ] Connection terminated (4000, ''), reconnecting
thomst08 commentedon Feb 11, 2024
Thanks for posting your error log, I have seen an error similar to what you have and I think I have replicated it.
I will need to test some more to verify the issue then correct it, but can I ask if you have "Hide slash command request messages in channels" enabled?
andrewmcd7 commentedon Feb 11, 2024
I believe they are enabled. I just briefly looked and cannot see any settings for that. Where would it be? And should they be enabled or disabled.
thomst08 commentedon Feb 11, 2024
It can be enabled or disabled, I was wondering if that is the culprit, but from testing I don't think so, it's in the "Chat client" section.
It appears to be with the building of the slash commands when the bot is reset, my guess there could be a network issue and this might be part of the issue as it's not reconnecting to discord... Do you have any special network setting for your containers? And do you have any roles setup in the "Chat clients" section?
andrewmcd7 commentedon Feb 11, 2024
Let me find out about the special network settings.
No special roles.
I invite the bot to discord, add the channel ID TO REQUESTRR and everything is good for about a day before it starts erroring.
andrewmcd7 commentedon Feb 11, 2024
We do have I think 5 or 6 requestrrs on 1 host. All named differently. Req1, req2, req3, etc.
I have reached out to the guy who sets them up to see if there’s any weird network settings he’s using.
andrewmcd7 commentedon Feb 11, 2024
No weird network settings on the containers in portainer.
andrewmcd7 commentedon Feb 11, 2024
Here’s some more logs on a different container. Same issue:
fail: Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClient[0]
An error occurred finding an existing movie by tmdbId "37541" with Radarr: Name or service not known (radarr:7878)
System.Net.Http.HttpRequestException: Name or service not known (radarr:7878)
---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.HttpGetAsync(HttpClient client, RadarrSettings settings, String url) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 431
at Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClientV3.FindExistingMovieByMovieDbIdAsync(Int32 theMovieDbId) in D:\Users\thoms\Documents\GitHub\requestrr\Requestrr.WebApi\RequestrrBot\DownloadClients\Radarr\RadarrClientV3.cs:line 405
thomst08 commentedon Feb 11, 2024
Hmmm, they are interesting errors, I will do some more testing and try to find a reason for this.
Where the containers working perfectly on version 2.1.2 of requestrr? (about two months back)
andrewmcd7 commentedon Feb 11, 2024
No. We have been plagued by this for a while.
thomst08 commentedon Feb 11, 2024
This might take me a while to pin point.
I will keep thinking about this and try to come up with an answer.
Just to double check, are all the services you connect requestrr too all on the one server?
Is there any known network issues such as drop-outs with the server?
andrewmcd7 commentedon Feb 18, 2024
Any progress? Not sure what else we can try and do.
thomst08 commentedon Feb 18, 2024
Hey @andrewmcd7,
Not at the moment, this is still in the back of my mind and I am looking for issues but haven't seen any links to what you have been expecting.
There is a few things to note however, I have a few long term plans, one of which is to setup requestrr to allow to handle multiple sources (multiple radarr connections and using categories to control each one) and to also change how the slash commands are created.
Both of these are going to be a while and might help your setup, but also don't solve the underlying issue your having, at the moment.
I was still wondering if any of the traffic was through a vpn setup on the network that might be part of the issue, but I'm not sure.
I'll keep exploring, if I find something I will let you know.
44 remaining items
edrock200 commentedon Sep 21, 2024
It's been a few days since moving and no errors. Also, restarting the host doesn't cause the errors mentioned in the initial post since moving to the dev version, so I think you got it. :)
Znuff commentedon Sep 23, 2024
I can confirm that at least on initial start, the
:devbuild seems to work fine.thomst08 commentedon Sep 23, 2024
Nice, thanks for the feedback, let me know if this changers
thomst08 commentedon Oct 19, 2024
Hey guys, I've reached to to DSharps support but still waiting for a response... So I am a little bit stuck in which direction we go from here atm.
@andrewmcd7 did the dev version help in anyway or the problem is still persisting after giving it some more time? I'm not sure if you moved back to the latest version or stayed with dev after giving it a try?
edrock200 commentedon Oct 19, 2024
The dev version appears to have resolved (I am working with @andrewmcd7 as well.) thank you!
thomst08 commentedon Oct 20, 2024
Oh, excellent!
Glad to hear that :)
On another note, I reached out to DSharp support again on my original post, after commenting on this issue a dev got back to me and confirmed what we have discovered, the commands are best setup as global commands, when not setup this way and setup for a number of guilds/servers, it can cause issues like we saw (due to a few things it seems like rate limiting).
So...I will have to work out the best way to deal with this going forward and update Requestrr to use global commands instead as default, but block and restrict access when permissions are given and/or when direct messaging is not desired.
Once I have something more here, I will update the dev branch and we can go from there.
I will keep you guys posted.
LowLogic2 commentedon Nov 21, 2024
Also encountering this issue. I will test with the dev branch and report back.
Spillebulle commentedon Jan 11, 2025
I am having this same issue I believe on the latest dev build. For me it's been going on for a few weeks.
Someone messages me that the bot is down, I restart the container, and it's back up for a few more days before going down again
A request went through without issue on the 10th at 16:05 then not working the 11th 23:20 (might need to add 1 hr for timezone)
Requestrr_logs.txt
thomst08 commentedon Jan 12, 2025
Hey @Spillebulle,
I'll have to have a look into this, it just seems that your bot is losing connection to Discord, are you running it through a VPN by any chance? I've seen something like this happens when a VPN is blocking or losing connection.
It seems like this might be not 100% related to this issue.
Spillebulle commentedon Jan 12, 2025
@thomst08 Not running through a VPN. My network had no downtime during that time according to my other services
thomst08 commentedon Jan 12, 2025
Hmmm, ok, I'll have to have a think and toy then, I am working on slowly changing to DSharpPlus v5, I have noticed it has some other info when it comes to feedback, when I have it in a state that's manageable, I plan to push it to the dev branch to test, I'll post here when that's done.
qudiqudi commentedon Dec 10, 2025
I am also - still - experience this issue. Discord bot is not working with said message, from time to time. Logs are inconclusive.
fix: Add rate limiting to prevent Discord bot unresponsiveness
thomst08 commentedon Dec 13, 2025
Hey everyone,
I have had a pull request with a fix that might help with this issue.
I am not 100% this will fix everything, however, it is worth a shot, I have setup another container specifically with this fix, if anyone is willing, can you please try this container to see if this helps?
Switch your docker tag to
:dev-ratelimitPlease let me know if you use the container and if the problem still occurs, it fixes the issue or if anything else happens.
If you would like compiled files for a select OS, please let me know.
thomst08 commentedon Jan 23, 2026
Just an update on this issue
This has also been linked to creating more then 25 commands per group.
That is, if you have 15 categories for movies and 11 for tv shows, this adds up to 26 commands for the request group, going over the command limit and causing this issue.
This is also why turning on message mode help solve this issue, as guide commands are limited to 25 commands, while global commands are limited to 100.
Staying under the 25 limit allows the bot to run correctly