Qolors / FeedCord

A dead simple RSS Feed with Discord Webhooks
MIT License
127 stars 6 forks source link

E: Hosting failed to start #40

Open revunix opened 2 months ago

revunix commented 2 months ago

Hello guys, I have a question.

To my knowledge, the appsettings.json should be correct, but why does this error occur?

{
    "Instances": [
    {
     "Id": "Apple Software Updates",
     "Username": "Apple Software Updates",
     "YoutubeUrls": "",
     "RssUrls": "https://developer.apple.com/news/releases/rss/releases.rss",
     "DiscordWebhookUrl": "https://discord.com/api/webhooks/1xxxxxxxxx",
     "RssCheckIntervalMinutes": 3,
     "EnableAutoRemove": false,
     "Color": 8411391,
     "DescriptionLimit": 200,
     "Forum": false
    }
    ]
}

here a logfile

Registering Background Service Apple Software Updates
I: Creating new RssCheckerBackgroundService instance for Apple Software Updates
I: Apple Software Updates Created with check interval 3 minutes
I: Apple Software Updates Starting Background Processing at 07/06/2024 10:31:41..
I: Apple Software Updates: Initializing Url Checks..
E: Hosting failed to start
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at FeedCord.src.RssReader.FeedProcessor.GetSuccessCount(String[] urls, Boolean isYoutube) in /src/src/RssReader/FeedProcessor.cs:line 87
   at FeedCord.src.RssReader.FeedProcessor.InitializeUrlsAsync() in /src/src/RssReader/FeedProcessor.cs:line 64
   at FeedCord.src.Services.RssCheckerBackgroundService.RunRoutineBackgroundProcessAsync() in /src/src/Services/RssCheckerBackgroundService.cs:line 52
   at FeedCord.src.Services.RssCheckerBackgroundService.ExecuteAsync(CancellationToken stoppingToken) in /src/src/Services/RssCheckerBackgroundService.cs:line 39
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token)
   at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>g__LogAndRethrow|15_3(<>c__DisplayClass15_0&)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at FeedCord.src.Startup.Initialize(String[] args) in /src/src/Startup.cs:line 21
   at FeedCord.src.Program.Main(String[] args) in /src/src/Program.cs:line 7