Tyrrrz / DiscordChatExporter

Exports Discord chat logs to a file
MIT License
7.29k stars 668 forks source link

Crash on bad request: "Unknown Emoji" #1226

Closed StefanDimitrov95 closed 3 months ago

StefanDimitrov95 commented 3 months ago

Version

2.43

Flavor

CLI (Command-Line Interface)

Platform

Docker / macOS Sonoma 14.4.1

Export format

JSON

Steps to reproduce

Server: https://discord.com/invite/dJQ8CT5 Message Link: https://discord.com/channels/369493084490170379/373260806735003648/585449836501794826 Command: docker run --rm -it tyrrrz/discordchatexporter:stable export -t <TOKEN> -c 373260806735003648 --format json --after "2019-06-04" --before "2019-06-05" --utc

Details

DiscordChatExporter.Core.Exceptions.DiscordChatExporterException: Failed to export message #585449836501794826 in channel 'large-cap-trading' (#373260806735003648) of guild 'Boiler Room Trading (#369493084490170379)'.
    DiscordChatExporter.Core.Exceptions.DiscordChatExporterException: Request to 'channels/373260806735003648/messages/585449836501794826/reactions/%E2%9B%B7%F0%9F%8F%BC?limit=100&after=0' failed: bad request.
Response content: {"message": "Unknown Emoji", "code": 10014}
      at DiscordChatExporter.Core.Discord.DiscordClient.GetJsonResponseAsync(String url, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Discord/DiscordClient.cs:153
      at DiscordChatExporter.Core.Discord.DiscordClient.GetMessageReactionsAsync(Snowflake channelId, Snowflake messageId, Emoji emoji, CancellationToken cancellationToken)+MoveNext() in /tmp/app/DiscordChatExporter.Core/Discord/DiscordClient.cs:679
      at DiscordChatExporter.Core.Discord.DiscordClient.GetMessageReactionsAsync(Snowflake channelId, Snowflake messageId, Emoji emoji, CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() 
      at DiscordChatExporter.Core.Exporting.JsonMessageWriter.WriteMessageAsync(Message message, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/JsonMessageWriter.cs:449
      at DiscordChatExporter.Core.Exporting.JsonMessageWriter.WriteMessageAsync(Message message, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/JsonMessageWriter.cs:449
      at DiscordChatExporter.Core.Exporting.MessageExporter.ExportMessageAsync(Message message, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/MessageExporter.cs:69
      at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/ChannelExporter.cs:87
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/ChannelExporter.cs:92
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/ChannelExporter.cs:70
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /tmp/app/DiscordChatExporter.Core/Exporting/ChannelExporter.cs:105
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_2.<<ExportAsync>b__2>d.MoveNext() in /tmp/app/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:231
  at DiscordChatExporter.Cli.Utils.Extensions.ConsoleExtensions.StartTaskAsync(ProgressContext context, String description, Func`2 performOperationAsync) in /tmp/app/DiscordChatExporter.Cli/Utils/Extensions/ConsoleExtensions.cs:53
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_1.<<ExportAsync>b__1>d.MoveNext() in /tmp/app/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:205
  at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext() 
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_0.<<ExportAsync>b__0>d.MoveNext() in /tmp/app/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:194
  at Spectre.Console.Progress.<>c__DisplayClass31_0.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:103
  at Spectre.Console.Progress.<>c__DisplayClass32_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:138
  at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in /_/src/Spectre.Console/Internal/DefaultExclusivityMode.cs:40
  at Spectre.Console.Progress.StartAsync[T](Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:121
  at Spectre.Console.Progress.StartAsync(Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:101
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.ExportAsync(IConsole console, IReadOnlyList`1 channels) in /tmp/app/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:184
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.ExportAsync(IConsole console, IReadOnlyList`1 channelIds) in /tmp/app/DiscordChatExporter.Cli/Commands/Base/ExportCommandBase.cs:318
  at DiscordChatExporter.Cli.Commands.ExportChannelsCommand.ExecuteAsync(IConsole console) in /tmp/app/DiscordChatExporter.Cli/Commands/ExportChannelsCommand.cs:25
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /_/CliFx/CliApplication.cs:163
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /_/CliFx/CliApplication.cs:204

The message indeed has an invalid reaction: image

Checklist