-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“The application did not respond” - error within discord #9
Comments
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. 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. :) |
I will next error. Thank you |
Hope this is helpful. warn: Requestrr.WebApi.RequestrrBot.ChatBot[0] |
Thanks for posting your error log, I have seen an error similar to what you have and I think I have replicated it. |
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. |
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? |
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. |
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. |
No weird network settings on the containers in portainer. |
Here’s some more logs on a different container. Same issue:
fail: Requestrr.WebApi.RequestrrBot.DownloadClients.Radarr.RadarrClient[0] |
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) |
No. We have been plagued by this for a while. |
This might take me a while to pin point. Just to double check, are all the services you connect requestrr too all on the one server? |
Any progress? Not sure what else we can try and do. |
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. |
Hey @andrewmcd7, Sorry this has taken me a while, I think I have some solutions to your problem, I don't think this is an issue with the program, but it might be the setup... First, the second issue you mentioned, this issue has been fixed in the last update, this is because some movies or shows get removed from the TVDB or TMDB and then requestrr can no longer match them, the newest update removes these form the notifications, this should not have been stopping the program, but does fill the logs. The first issue you noted... Let me know if any of this helped, I will keep exploring our options if you are still having issues. |
Thank you! I'm not sure what you are referencing wrt language file, we haven't modified the config. If it helps, without touching any settings restarting it a few times seems to push past the error. Is it possible this error is some sort of discord IP or bot rate limit? |
That's ok, in short, you can setup custom language files for you bot, allowing you to setup for another language if needed, however, if you are just using English, then this can be ignored. Again, it could be a discord error still, but from the errors, it appears to be a building error of the slash commands or at least when its sent to Discord it is rejected. |
Just to add to this, seeing similar errors and restarting several times or proxying seems to resolve, which lends itself to the theory that a rate limit is occuring. One thing I've noticed is right at the start of requestrr, in addition to registering the bot, it attempts to push out any backlogged notifications in rapid succession. Some of them are for users that no longer exist. Deleting notifications.json resolved this, but I'm wondering if combination of the two is also causing rate limiting. Would it be possible to delay the notifications and prune notifications that return "user not found?" @thomst08 |
Hey @edrock200, |
Thank you! Delay was the wrong word. I meant a throttle of notification alerts, e.g. no more than xx a minute. |
Hey everyone, just a small update. Still testing and make a link, I looked over the notifications part, and while that can trigger a lot of requests, I have found that if a user is no longer on your server, it should remove the request once its active, if there is more then 10~ requests it will rate limit, report it in the long and try again in another minute, This part seems to be handling fine and isn't taking down the main bot as it seems to still be functioning. I don't think it in the notification side causing a limit problem in this case by I will keep testing here in other situations to best work it out... I have, however, started to look over the main resetting of the bot and setup, it seems if there is a break in the slash commands the bot should restart and try to rebuild itself, however, there's a chance this doesn't always happen. So, I am looking into a way of check if the bot broken down and failed to reset and reset itself if this happens, there was no check if DSharp's library fails. TLDR: Tested notifications, found some cases where there could be an issue, not confident enough in the fix, needs more testing, working on a fix. |
Thank you! |
Small update, looking into this a bit more. Hopefully when the next update is out this might correct this issue, but DSharp v5 will allow registering dynamic slash commands during run time witch will hopefully solve the root of this issue. (I hope to not have to wait too long to resolve this) |
Thanks for the info and hard work! In the meantime is their a specific phrase we can grep for in the logs when it found, to trigger a log clear and restart? |
@edrock200, good question. |
Hey @andrewmcd7 and @edrock200, Just giving you both a heads up, I have just released version 2.1.6, this contains a few things that link back to these issues. I have also changed where the temp files are created when building the commands, again, this might help prevent your issue. I don't expect this version to solve your issues as it does not solve the underlining issue, but it might help, please let me know if there are any changes and post any new logs you have. |
Thank you so much! |
I've been getting the same error pretty consistently for a few weeks now; only about 1 in every 5 requests actually works. Restarting the container doesn't seem to help, nor does restarting the whole server. It just starts working again seemingly at random. This also occurs whether I request in a channel or through direct message. Below is the resulting log after attempting to request the same movie both by title and by TMDB:
|
These are good points, from my testing, I've found it seems to be a fail in D# when connecting to Discord. The issue is I could find a way of knowing when an error occurred and catching it to restart the setup process again. Currently the bot will watch the settings for any changes and then resets all the commands, it also looks out for new servers and ones dropping off, this will also trigger a reset. Commands are also build dynamically into a temp file and used to connect to each server, if the command file fails to build, it will restart the process. I was waiting for D# v5 to come out (and for the documentation to be updated, looks like there is a migration guide now) as it seems to have a few new things I can use and some changes to the rate limits and dynamic command building. What I might do is turn my attention back to this issue and see if I can implement the nightly builds into a version of Requestrr, I could put it into a docker container for anyone to test and see if that helps resolve the issue. Would anyone be OK to test such a build? |
I'd be happy to! |
Hey guys, I've looked over DSharps latest nightly build and have got it running, however, it is bit unstable at the moment... My intent is to come back to this bug and find a solution, I'm sorry this issue is taking a while. I will comment here when a build is ready to test, if not fix the problem. |
Has there been any progress on this? I’m getting it failing super often now. [2024-09-16 14:10:22 +03:00] [0 / ] [Crit ] There was an error registering application commands |
Hey @andrewmcd7, Partly, the latest version has an updated version of Dsharp+, I haven't looked much more into this issue as I wanted to complete lidarr support first, but I will begin researching this issue again. Has this happened since updating to the new version? |
Yes it’s happening daily. Sent from my iPhoneOn Sep 16, 2024, at 7:18 AM, thomst08 ***@***.***> wrote:
Hey @andrewmcd7,
Partly, the latest version has an updated version of Dsharp+, I haven't looked much more into this issue as I wanted to complete lidarr support first, but I will begin researching this issue again.
Has this happened since updating to the new version?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This bot currently will not submit my request to the arr’s.. I have redeployed in docker numerous times. And rebooted it numberous times. I just cannot get it to respond.warn: Requestrr.WebApi.RequestrrBot.ChatBot[0] Bot configuration changed: restarting bot[2024-09-16 14:43:55 +03:00] [0 / ] [Crit ] There was an error registering application commandsSystem.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.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext()[2024-09-16 14:43:55 +03:00] [0 / ] [Crit ] There was an error registering application commandsSystem.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.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext()[2024-09-16 14:43:55 +03:00] [0 / ] [Crit ] There was an error registering application commandsSystem.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.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext()[2024-09-16 14:43:55 +03:00] [0 / ] [Crit ] There was an error registering application commandsSystem.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.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext()warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect.warn: Requestrr.WebApi.RequestrrBot.ChatBot[0] Bot has been restarted.Sent from my iPadOn Sep 16, 2024, at 7:18 AM, thomst08 ***@***.***> wrote:
Hey @andrewmcd7,
Partly, the latest version has an updated version of Dsharp+, I haven't looked much more into this issue as I wanted to complete lidarr support first, but I will begin researching this issue again.
Has this happened since updating to the new version?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I think I have something! So.... knowing this now and having a look, in its current form, Requestrr assigns the same commands to all servers with each of their guild numbers.... So I quickly setup a version that only assigns the commands as global commands, the draw back is you can only have 100 of them. So as long as you don't have over 98~ categories, you should be ok.... I have setup a docker container for you to try this new version. |
I was also getting the following exception, and yep I did have the bot in multiple servers -
Trying out the |
You sir, are a genius! Thank you! |
Hey @andrewmcd7, Now for the bad news with the fix, after setting it up and thinking about it for a while, this is setting a global list of commands for the bot, the issue for that is it will now mean each command is usable with a private message directly to the bot, that wouldn't be too bad, but it also means permissions are ignored in this case, so this isn't the best fix going forward, just so anyone using the dev container is aware of this exploit. If this does fix the bot form crashing and its working fine, then I will do the following.
But first, I need to know if this 100% fixed the issue, still has the issue or somewhere in between. |
Unfortunately this didn’t resolve the issue. It’s still failing to work quite often. Same issue and errors. Sent from my iPhoneOn Sep 18, 2024, at 6:24 AM, thomst08 ***@***.***> wrote:
Hey @andrewmcd7,
Just checking in to see if you had a chance to test the dev container, just want some feedback to see if that resolves the issue.
If it does, then I will start to find how we can fix this issue going forward and if the next version of DSharp will have this issue.
Now for the bad news with the fix, after setting it up and thinking about it for a while, this is setting a global list of commands for the bot, the issue for that is it will now mean each command is usable with a private message directly to the bot, that wouldn't be too bad, but it also means permissions are ignored in this case, so this isn't the best fix going forward, just so anyone using the dev container is aware of this exploit.
If this does fix the bot form crashing and its working fine, then I will do the following.
Talk with DSharp support and find out how/what we can do to solve this issue and if global commands are the only way.
Depending on the result of that, ether make the bot auto change or have a setting to toggle global vs private servers, and to block direct communications if not desired.
Keep you guys updated on the progress and deploy the fix when ready.
But first, I need to know if this 100% fixed the issue, still has the issue or somewhere in between.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Ok then, I will keep looking, just double checking, do you have "Enable requesting via a private message" enabled? |
No it’s not checked. See attached. Sent from my iPadOn Sep 18, 2024, at 6:24 PM, thomst08 ***@***.***> wrote:
@andrewmcd7,
Ok then, I will keep looking, just double checking, do you have "Enable requesting via a private message" enabled?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
@thomst08 I think something else might be going on here. I believe your fix did resolve the initial error. I think one of our hosts is having some sort of network issue though, so we are moving the bots to another host to test. Please don't spend time on this for now until we can see if it happens on the new host. Apologies for the inconvenience. |
Hey @edrock200, That's all good, thanks for the feedback. |
So far, since moving, things seem good. The host we moved to was getting the errors before the dev version too, but not after. The host still affected I think is being plagued by a docker bug.in which random containers keep dropping packets on their vnics, which is fixed in a a docker update not available to bionic. So I need to rebuild it to jammy. |
@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. :) |
I can confirm that at least on initial start, the |
Nice, thanks for the feedback, let me know if this changers |
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. |
The dev version appears to have resolved (I am working with @andrewmcd7 as well.) thank you! |
Oh, excellent! 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). Once I have something more here, I will update the dev branch and we can go from there. |
Also encountering this issue. I will test with the dev branch and report back. |
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) |
Hey @Spillebulle, |
@thomst08 Not running through a VPN. My network had no downtime during that time according to my other services |
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, 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.
The text was updated successfully, but these errors were encountered: