nminaya / grammar-nazi-bot

Bot that corrects spelling mistakes.
MIT License
31 stars 8 forks source link

Application Exception: Object reference not set to an instance of an object #30

Closed nminaya closed 3 years ago

nminaya commented 4 years ago

This is an issue created automatically by GrammarNazi when an exception was captured.

Date (UTC): 11/08/2020 02:34:48

Exception:

System.NullReferenceException: Object reference not set to an instance of an object. at GrammarNazi.Core.Services.TelegramCommandHandlerService.HandleCommand(Message message) in /src/GrammarNazi.Core/Services/TelegramCommandHandlerService.cs:line 250 at GrammarNazi.App.HostedServices.TelegramBotHostedService.OnMessageReceived(Object sender, MessageEventArgs messageEvent) in /src/GrammarNazi.App/HostedServices/TelegramBotHostedService.cs:line 87 at GrammarNazi.App.HostedServices.TelegramBotHostedService.b__8_0(Object obj, MessageEventArgs eventArgs) in /src/GrammarNazi.App/HostedServices/TelegramBotHostedService.cs:line 67

nminaya commented 4 years ago

I'm trying to find out a scenario where this line could be null at this point 🤔 https://github.com/nminaya/grammar-nazi-bot/blob/d89f2ea4de83866f635f6cbb9ccba337a6bbd6c2/GrammarNazi.Core/Services/TelegramCommandHandlerService.cs#L250

nminaya commented 4 years ago

The only way I see this could happen is with a failed communication with the database (Firebase) that would make the service to return a null ChatConfiguration. That is weird but is the only thing I belive happened here, so far.

nminaya commented 3 years ago

I'll close this bug since I have no idea how exactly happened and it wasn't possible to replicate