The issue happens on seeding. If I skip seeding, it works. Well works until a test runs that expected that seeding to run. Its consistent. Mongo2Go may be the issue in my case. I simply cant seed it seems.
Uninstalled CLI and suite. Checked my tools folder. Deleted it. Deleted my cache. Created a new project. Added one simple entity. Run tests. Failed. Okay, so then in frustration, I think your template is broken. Let me try the one on the site. Its so bad, it includes the Entity Framework model in the MongoDb solution. Can someone send me 1 project with any namespace and 1 entity where the tests work maybe. Tests dont work on the public download either.
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor...
Volo.Abp.AbpInitializationException
An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module SampleApp.ForecastTestBaseModule, SampleApp.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating SampleApp.Levels.LevelsDataSeedContributor -> SampleApp.Levels.LevelsDataSeedContributor.. See the inner exception for details.
at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
at Volo.Abp.AbpApplicationBase.InitializeModules()
at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
at Volo.Abp.Testing.AbpIntegratedTest1..ctor() at SampleApp.ForecastTestBase
1..ctor()
at SampleApp.ForecastDomainTestBase..ctor()
at SampleApp.Samples.SampleDomainTests..ctor() in C:\Users\devbox\Documents\Projects\SampleApps\aspnet-core\test\SampleApp.Domain.Tests\Samples\SampleDomainTests.cs:line 19
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
Autofac.Core.DependencyResolutionException
An exception was thrown while activating SampleApp.Levels.LevelsDataSeedContributor -> SampleApp.Levels.LevelsDataSeedContributor.
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action
1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0()
at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func1 creator) at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable
1 qualifyingId, Func1 creator) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action
1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) 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.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable
1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable
1 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 Volo.Abp.Data.DataSeeder.SeedAsync(DataSeedContext context)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at SampleApp.ForecastTestBaseModule.<>c__DisplayClass3_0.<<SeedTestData>b__0>d.MoveNext() in C:\Users\devbox\Documents\Projects\SampleApps\aspnet-core\test\SampleApp.TestBase\ForecastTestBaseModule.cs:line 55
--- End of stack trace from previous location ---
at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)
at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t)
at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task)
at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func
1 action)
at SampleApp.ForecastTestBaseModule.SeedTestData(ApplicationInitializationContext context) in C:\Users\devbox\Documents\Projects\SampleApps\aspnet-core\test\SampleApp.TestBase\ForecastTestBaseModule.cs:line 51
at SampleApp.ForecastTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) in C:\Users\devbox\Documents\Projects\SampleApps\aspnet-core\test\SampleApp.TestBase\ForecastTestBaseModule.cs:line 46
at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
Autofac.Core.DependencyResolutionException
Circular component dependency detected: SampleApp.Levels.LevelsDataSeedContributor -> SampleApp.Levels.LevelsDataSeedContributor -> SampleApp.Levels.LevelsDataSeedContributor.
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext ctxt) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) at Autofac.Core.Resolving.Pipeline.DefaultResolveRequestContext.ResolveComponent(ResolveRequest request) at Autofac.Core.Activators.Reflection.AutowiringParameter.<>c__DisplayClass0_0.<CanSupplyValue>b__0() at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable
1 parameters)
at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action
1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Builder.RegistrationBuilder
3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action
1 next)
at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
The new 5.3 RC1 suite tool is unable to create a new project if the DB is Postgres
Im looking at using the abp suite to model our API faster but we want a base application running. Ive removed all the ABP for authorisation, permissions, features, saas etc. I only really have auditing left. It builds but the automapper isnt getting registered. I cant see where and how I need to correctly register my AutoMapper profile again.
I can get it working via swagger if i modify {MyProject}HttpApiHostModule : AbpModule adding the following.
context.Services.AddAutoMapperObjectMapper<{MyProject}HttpApiHostModule>();
Configure<AbpAutoMapperOptions>(options => { options.AddProfile<{MyProject}ApplicationAutoMapperProfile>(validate: true); });
The problem is i cant find a way to get tests to run and is this a suitable place to register it.
Ive built the project, tried different namespaces but no matter what i cant link to a enum.
Thanks for the pointer. At this point, I'm simply trying to get the entire solution running with the commercial template in MongoDB. For clarity, ill mention each step. I ran the following command. abp new TestApi -t microservice-pro -u mvc The solution is created. I then navigated to etc\docker after i signed all the ps1files and ran up.ps1. All containers are created and show in docker desktop. I then built the solution by navigating to the solution root and running dotnet build. It completes with "Build succeeded." I then ran .\run-tye.ps1 As i have a valid HTTPS certificate that is already present, it prints this out. I checked each link and it loads the relavant site or swagger. I navigated to http://localhost:15672/#/connections and all connections are running and there are 9 Queues. If i navigate to http://localhost:9200/ it shows me the json.
The next part gets confusing. I navigated to http://localhost:5601/ which then gives me some options. Looking at the documentation from https://docs.abp.io/en/commercial/latest/startup-templates/microservice/infrastructure the image shows the discover tab so i navigated to that tab. Nothing is logged so i checked http://localhost:9090/targets in Prometheusand it shows the following. Basically all the sites say Get "https://administration-service:443/metrics": context deadline exceeded etc The documentation says "If you are not running the solution on docker, you may have to change the prometheus static_config targets such as -targets: ['auth-server'] to -targets: ['host.docker.internal:44322']" BUT i am running docker.
As such i cant get the solution working with logging before even attempting to migrate to MongoDB. Thanks James PS The original question still stands in that the documentation at https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb is for 4.4.4 not 5.0.1
ABP Framework version:** v5.0.1 UI type**: MVC DB provider**: MongoDB Tiered (MVC) or Identity Server Separated (Angular)**: yes
I used the start-up microservices template to create a solution but the documents to migrate it to use MongoDB are not updated. They seem to be for 4.4.4 https://docs.abp.io/en/commercial/latest/guides/microservice-mongodb Is there any updated documentation on how to achieve this in v5. It would also be very helpful for myself and many others if Issue 1269 had a in depth explanation. We have multiple API's using mongoDB, we want to expose leveraging the same solution. https://support.abp.io/QA/Questions/1269/using-MongoDB-in-microservice-service-inside-microservice-solution-which-uses-efcore