Skip to content
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

System.FormatException parsing through CarlBot auditlog embeds of NQN messages #1157

Closed
LeMeowM opened this issue Nov 15, 2023 · 2 comments
Closed

Comments

@LeMeowM
Copy link

LeMeowM commented Nov 15, 2023

Version

2.42.3

Flavor

CLI (Command-Line Interface)

Platform

MacOS Arm64

Export format

JSON

Steps to reproduce

  1. create a server and invite CarlBot and NQN
  2. set a channel to log message deletes and edits
  3. use NQN to post an emote
  4. try to download the servers messages

It will then error when getting to that channel.

Details

  • Expected behavior: running the program without stopping
  • Actual behavior: ERRORS with this:
System.FormatException: Input string was not in a correct format.
  at System.DateTimeFormat.GetRealFormat(ReadOnlySpan`1 format, DateTimeFormatInfo dtfi) 
  at System.DateTimeFormat.ExpandPredefinedFormat(ReadOnlySpan`1 format, DateTime& dateTime, DateTimeFormatInfo& dtfi, TimeSpan offset) 
  at System.DateTimeFormat.FormatStringBuilder(DateTime dateTime, ReadOnlySpan`1 format, DateTimeFormatInfo dtfi, TimeSpan offset, ValueStringBuilder& result) 
  at System.DateTimeFormat.Format(DateTime dateTime, String format, IFormatProvider provider, TimeSpan offset) 
  at DiscordChatExporter.Core.Exporting.PlainTextMarkdownVisitor.VisitTimestampAsync(TimestampNode timestamp, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\PlainTextMarkdownVisitor.cs:92
  at DiscordChatExporter.Core.Markdown.Parsing.MarkdownVisitor.VisitAsync(MarkdownNode node, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Markdown\Parsing\MarkdownVisitor.cs:137
  at DiscordChatExporter.Core.Markdown.Parsing.MarkdownVisitor.VisitAsync(IEnumerable`1 nodes, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Markdown\Parsing\MarkdownVisitor.cs:146
  at DiscordChatExporter.Core.Exporting.PlainTextMarkdownVisitor.FormatAsync(ExportContext context, String markdown, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\PlainTextMarkdownVisitor.cs:116
  at DiscordChatExporter.Core.Exporting.JsonMessageWriter.FormatMarkdownAsync(String markdown, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\JsonMessageWriter.cs:40
  at DiscordChatExporter.Core.Exporting.JsonMessageWriter.WriteEmbedAsync(Embed embed, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\JsonMessageWriter.cs:282
  at DiscordChatExporter.Core.Exporting.JsonMessageWriter.WriteMessageAsync(Message message, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\JsonMessageWriter.cs:528
  at DiscordChatExporter.Core.Exporting.MessageExporter.ExportMessageAsync(Message message, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\MessageExporter.cs:78
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\ChannelExporter.cs:89
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\ChannelExporter.cs:89
  at DiscordChatExporter.Core.Exporting.ChannelExporter.ExportChannelAsync(ExportRequest request, IProgress`1 progress, CancellationToken cancellationToken) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Core\Exporting\ChannelExporter.cs:89
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_2.<<ExportAsync>b__2>d.MoveNext() in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\Base\ExportCommandBase.cs:233
  at DiscordChatExporter.Cli.Utils.Extensions.ConsoleExtensions.StartTaskAsync(ProgressContext context, String description, Func`2 performOperationAsync) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Utils\Extensions\ConsoleExtensions.cs:60
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_1.<<ExportAsync>b__1>d.MoveNext() in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\Base\ExportCommandBase.cs:240
  at System.Threading.Tasks.Parallel.<>c__50`1.<<ForEachAsync>b__50_0>d.MoveNext() 
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.<>c__DisplayClass63_0.<<ExportAsync>b__0>d.MoveNext() in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\Base\ExportCommandBase.cs:191
  at Spectre.Console.Progress.<>c__DisplayClass27_0.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:98
  at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in /_/src/Spectre.Console/Live/Progress/Progress.cs:133
  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:116
  at Spectre.Console.Progress.StartAsync(Func`2 action) in /_/src/Spectre.Console/Live/Progress/Progress.cs:96
  at DiscordChatExporter.Cli.Commands.Base.ExportCommandBase.ExportAsync(IConsole console, IReadOnlyList`1 channels) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\Base\ExportCommandBase.cs:181
  at DiscordChatExporter.Cli.Commands.ExportGuildCommand.ExecuteAsync(IConsole console) in /D:\a\DiscordChatExporter\DiscordChatExporter\DiscordChatExporter.Cli\Commands\ExportGuildCommand.cs:104
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in /_/CliFx/CliApplication.cs:153
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in /_/CliFx/CliApplication.cs:193```

### Checklist

- [X] I have looked through existing issues to make sure that this bug has not been reported before
- [X] I have provided a descriptive title for this issue
- [X] I have made sure that that this bug is reproducible on the latest version of the application
- [X] I have provided all the information needed to reproduce this bug as efficiently as possible
- [ ] I have sponsored this project
@LeMeowM LeMeowM added the bug label Nov 15, 2023
@LeMeowM LeMeowM closed this as completed Nov 15, 2023
@LeMeowM LeMeowM reopened this Nov 15, 2023
@LeMeowM
Copy link
Author

LeMeowM commented Nov 15, 2023

{ "id": "1044646740399226900", "type": "Default", "timestamp": "2022-11-22T17:13:11.509+01:00", "timestampEdited": null, "callEndedTimestamp": null, "isPinned": false, "content": "", "author": { "id": "1031238198778662965", "name": "Carl-bot Logging", "discriminator": "0000", "nickname": "Carl-bot Logging", "color": null, "isBot": true, "roles": [], "avatarUrl": "https://cdn.discordapp.com/avatars/1031238198778662965/9bdbba85c24c636cf57d7e310d356fe1.png?size=512" }, "attachments": [], "embeds": [ { "title": "Message edited in #vc-chat", "url": null, "timestamp": "2022-11-22T17:13:09.842+01:00" ], "messageCount": 1928 }
this was the offending message that caused the crash

@Tyrrrz Tyrrrz added duplicate and removed bug labels Nov 15, 2023
@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 15, 2023

Looks like a duplicate of #1156

this was the offending message that caused the crash

That message does not have a timestamp tag anywhere in the content though

@Tyrrrz Tyrrrz closed this as completed Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants