Antonin-Artaud / Aled.OpenFoodFactService

0 stars 0 forks source link

Fix service DbMigrator #2

Closed KRXTCH closed 3 months ago

KRXTCH commented 4 months ago

Au lancement du DbMigrator, une exception est levée

Antonin-Artaud commented 4 months ago

@KRXTCH pense à mettre genre un screen de l'erreur pour la prochaine fois :)

KRXTCH commented 4 months ago

@KRXTCH pense à mettre genre un screen de l'erreur pour la prochaine fois :)

Ouais deso j’avais tout cut xD

KRXTCH commented 4 months ago

Tiens si jamais @Antonin-Artaud (t'aurais rien vu si j’avais fait un screen): (De souvenir j'avais essayé d'enlever le tenantRepo du constructeur mais la db ne s'était pas créée non plus)

C:\Users\lorys\AppData\Local\Programs\Rider\plugins\dpa\DotFiles\JetBrains.DPA.Runner.exe --handle=17800 --backend-pid=69568 --etw-collect-flags=67108622 --detach-event-name=dpa.detach.17800 C:/Users/lorys/OneDrive/Documents/Workspace/ALED/Services/aspnet-core/src/Aled.OpenFoodFactService.DbMigrator/bin/Debug/net8.0/Aled.OpenFoodFactService.DbMigrator.exe Unhandled exception. Autofac.Core.DependencyResolutionException: An exception was thrown while activating Aled.OpenFoodFactService.Data.OpenFoodFactServiceDbMigrationService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Aled.OpenFoodFactService.Data.OpenFoodFactServiceDbMigrationService' can be invoked with the available services and parameters: Cannot resolve parameter 'Volo.Abp.TenantManagement.ITenantRepository tenantRepository' of constructor 'Void .ctor(Volo.Abp.Data.IDataSeeder, System.Collections.Generic.IEnumerable`1[Aled.OpenFoodFactService.Data.IOpenFoodFactServiceDbSchemaMigrator], Volo.Abp.TenantManagement.ITenantRepository, Volo.Abp.MultiTenancy.ICurrentTenant)'.

See https://autofac.rtfd.io/help/no-constructors-bindable for more info. at Autofac.Core.Activators.Reflection.ReflectionActivator.<>cDisplayClass14_0.b0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Builder.RegistrationBuilder3.<>cDisplayClass41_0.b0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Builder.RegistrationBuilder3.<>c__DisplayClass39_0.<OnActivated>b__0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.CoreEventMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Extensions.DependencyInjection.KeyedServiceMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request) at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest& request) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest& request) at Autofac.Core.Lifetime.LifetimeScope.Autofac.IComponentContext.ResolveComponent(ResolveRequest& request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Aled.OpenFoodFactService.DbMigrator.DbMigratorHostedService.StartAsync(CancellationToken cancellationToken) in C:\Users\lorys\OneDrive\Documents\Workspace\ALED\Services\aspnet-core\src\Aled.OpenFoodFactService.DbMigrator\DbMigratorHostedService.cs:line 36 at Microsoft.Extensions.Hosting.Internal.Host.b15_1(IHostedService service, CancellationToken token) at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func`3 operation) at Microsoft.Extensions.Hosting.Internal.Host.g__LogAndRethrow|15_3(<>cDisplayClass15_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 Aled.OpenFoodFactService.DbMigrator.Program.Main(String[] args) in C:\Users\lorys\OneDrive\Documents\Workspace\ALED\Services\aspnet-core\src\Aled.OpenFoodFactService.DbMigrator\Program.cs:line 30 at Aled.OpenFoodFactService.DbMigrator.Program.

(String[] args)

Process finished with exit code -532,462,766.

Antonin-Artaud commented 3 months ago

Bug plus d'actualité en vue de la régénération du projet OOF