docintelapp / DocIntel

Open Source Platform for storing, organizing, and searching documents related to cyber threats
https://docintel.org
Other
157 stars 25 forks source link

Scraper crash #23

Closed xme closed 1 year ago

xme commented 1 year ago

Another one:

2022-11-11 08:14:19.6487 [INFO] [MassTransit] Bus stopped: rabbitmq://docintel-dev-rabbitmq/
Unhandled exception. System.InvalidOperationException: Sequence contains more than one element.
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at DocIntel.Core.Services.BaseDataDbService.ApplyYourChangeAsync(IServiceProvider scopedServices) in /src/DocIntel.Core/Services/BaseDataDbService.cs:line 57
   at RunMethodsSequentially.LockAndRunCode.JobRunner.RunJobAsync(IServiceProvider scopedServices)
   at RunMethodsSequentially.LockAndRunCode.PostgreSqlLockAndRunJob.LockAndRunMethodsAsync(IServiceProvider serviceProvider)
   at RunMethodsSequentially.LockAndRunCode.PostgreSqlLockAndRunJob.LockAndRunMethodsAsync(IServiceProvider serviceProvider)
   at RunMethodsSequentially.LockAndRunCode.GetLockAndThenRunServices.LockAndLoadAsync()
   at RunMethodsSequentially.LockAndRunCode.GetLockAndThenRunHostedService.StartAsync(CancellationToken cancellationToken)
   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 DocIntel.Services.Scraper.Program.Main(String[] args) in /src/DocIntel.Services.Scraper/Program.cs:line 33
ancailliau commented 1 year ago

It looks like the scraper is crashing because you have multiple roles named "administrator". While it should not crash, the application should also not let you create two roles with the same label...