Qolors / FeedCord

A dead simple RSS Feed with Discord Webhooks
MIT License
150 stars 9 forks source link

Issue with ARM Docker container #4

Closed allenbilly12 closed 9 months ago

allenbilly12 commented 9 months ago

Hello,

Having an issue getting this working with the arm docker container:

info: FeedCord.src.RssReader.FeedProcessor[0] Successfully initialized URL: https://interserver.statuspage.io/history.rss Unhandled exception. System.InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set. at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request) at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) at FeedCord.src.RssReader.FeedProcessor.TestUrlAsync(String url) in /src/src/RssReader/FeedProcessor.cs:line 108 at FeedCord.src.RssReader.FeedProcessor.GetSuccessCount(String[] urls, Boolean isYoutube) in /src/src/RssReader/FeedProcessor.cs:line 78 at FeedCord.src.RssReader.FeedProcessor.InitializeUrlsAsync() in /src/src/RssReader/FeedProcessor.cs:line 63 at FeedCord.src.RssReader.FeedProcessor.CreateAsync(Config config, IHttpClientFactory httpClientFactory, IRssProcessorService rssProcessorService, ILogger1 logger) in /src/src/RssReader/FeedProcessor.cs:line 41 at FeedCord.src.Startup.<>c.<CreateHostBuilder>b__1_3(IServiceProvider serviceProvider) in /src/src/Startup.cs:line 84 at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func`2 valueFactory) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) 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 17 at FeedCord.src.Program.Main(String[] args) in /src/src/Program.cs:line 7

Config:

{ "YoutubeUrls": [""], "RSSUrls": [ "https://interserver.statuspage.io/history.rss" ],

"DiscordWebhookUrl": "https://discord.com/api/webhooks/", "RssCheckIntervalMinutes": 3, "EnableAutoRemove": true, "Username": "Hosting Provider Status", "AvatarUrl": "https://imgur.com/gallery/UHFjdpi", "AuthorIcon": "https://imgur.com/gallery/UHFjdpi", "AuthorName": "Interserver", "AuthorUrl": "https://interserver.statuspage.io/", "FallbackImage": "https://i.imgur.com/f8M2Y5s.png", "FooterImage": "https://imgur.com/gallery/UHFjdpi", "Color": 8411391 }

Any help would be much appreciated.

Qolors commented 9 months ago

Hey there! I suppose this would make sense as I didn't rebuild the arm64 image.. Been a minute and forgot about the different builds I had available for FeedCord - apologies!

This image is updated now. Please try pulling the new image version for arm64 builds (qolors/feedcord:latest-arm64), and let me know if this is resolved for you so I can close this issue :)

Thanks!

allenbilly12 commented 9 months ago

Thank you that worked a charm. Thank you also for the quick turn around much appreciated.

Quick question also:

How does it make a descision on what is new? Is it how long ago it was posted or does it cache the xml and compare everytime?

Qolors commented 9 months ago

You are correct on it checking the date of the post!

FeedCord just uses a basic form of caching..

On startup it requests all of your urls, grabs each of their most recent post and parses the date.

It then takes each url and its respective date and stores it in a hasmap.

While the program runs it will compare the dates. If a newer date is found it will parse the most recent post and form a payload to send to your webhook, and then finish by updating the hash map.

No information other than the date is actually stored..

Hope this makes sense for you and let me know if you have any other questions/issues!