Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

"The application did not respond" every time the container is restarted #185

Open
Znuff opened this issue Oct 18, 2023 · 2 comments
Open

Comments

@Znuff
Copy link

Znuff commented Oct 18, 2023

Every now and then, Requestrr will just stop responding if I restart the container.

The docker compose logs requestrr will show:

fail: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      An error occurred while sending a private message movie notification to a specific user: Unauthorized: 403
      DSharpPlus.Exceptions.UnauthorizedException: Unauthorized: 403
         at DSharpPlus.Net.DiscordApiClient.CreateMessageAsync(UInt64 channel_id, String content, IEnumerable`1 embeds, Nullable`1 replyMessageId, Boolean mentionReply, Boolean failOnInvalidReply)
         at Requestrr.WebApi.RequestrrBot.Notifications.Movies.PrivateMessageMovieNotifier.NotifyAsync(IReadOnlyCollection`1 userIds, Movie movie, CancellationToken token) in D:\Dev\Requestrr\requestrr\Requestrr.WebApi\RequestrrBot\Notifications\Movies\PrivateMessageMovieNotifier.cs:line 55
fail: Requestrr.WebApi.RequestrrBot.ChatBot[0]
      An error occurred while sending a private message movie notification to a specific user: Unauthorized: 403
      DSharpPlus.Exceptions.UnauthorizedException: Unauthorized: 403
         at DSharpPlus.Net.DiscordApiClient.CreateMessageAsync(UInt64 channel_id, String content, IEnumerable`1 embeds, Nullable`1 replyMessageId, Boolean mentionReply, Boolean failOnInvalidReply)
         at Requestrr.WebApi.RequestrrBot.Notifications.Movies.PrivateMessageMovieNotifier.NotifyAsync(IReadOnlyCollection`1 userIds, Movie movie, CancellationToken token) in D:\Dev\Requestrr\requestrr\Requestrr.WebApi\RequestrrBot\Notifications\Movies\PrivateMessageMovieNotifier.cs:line 55

Logging on the WebUI and hitting the Test button confirms that everything works right.

Restarting the container (again) will show:

requestrr  | [2023-10-18 01:33:45 +00:00] [0   /            ] [Crit ] There was an error registering application commands
requestrr  | System.ArgumentException: Source array was not long enough. Check the source index, length, and the array's lower bounds. (Parameter 'sourceArray')
requestrr  |    at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
requestrr  |    at System.Collections.Generic.List`1.set_Capacity(Int32 value)
requestrr  |    at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
requestrr  |    at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
requestrr  |    at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass39_0.<<RegisterCommands>b__0>d.MoveNext()

And then return An error occurred while sending a private message movie notification to a specific user: Unauthorized: 403 after a while.

Version is v2.1.2, running the darkalfx/requestrr image.

I have tried recreating the container, didn't help. Tried enabling Debugging, found nothing relevant.

Furthermore, on newly joined servers, the bot won't register commands on a new server until it's restarted.

Any advice on how to proceed further?

@zetec
Copy link

zetec commented Oct 19, 2023

I just started having this behavior as well - it was working fine earlier today. Not sure what changed. Maybe a discord-side change?

@Znuff
Copy link
Author

Znuff commented Oct 23, 2023

It happened again for me, today. Docker host was left without internet for about an hour. When it came back online, bot wasn't responding to any commands.

Tried, as usual, restarting the container, rebuilding it, testing & changing settings - nothing worked.

Decided to try something a bit more labor intensive, and I've build it with dotnet 7.0 and dsharpplus 4.4.2

I don't know if what I did made it work, or it's just "fixed" itself eventually.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants