Activities of "PDarioJer"

Once I updated the nuGet packages to the new ABP version, my integration tests throw the following error. As you can see, I used the SampleTests as an example:

Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module MyProject.MyProjectTestBaseModule, MyProject.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Method not found: 'System.String Volo.Abp.Localization.LanguageInfo.get_FlagIcon()'.. See the inner exception for details.  
---- System.MissingMethodException : Method not found: 'System.String Volo.Abp.Localization.LanguageInfo.get_FlagIcon()'.  

I have adjusted the LocalizationOptions according to the migration guide and I have also created a new migration and applied it

Full stacktrace:

ModuleManager.InitializeModules(ApplicationInitializationContext context)  
AbpApplicationBase.InitializeModules()  
AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)  
AbpIntegratedTest`1.ctor()  
MyProjectTestBase`1.ctor()  
MyProjectDomainTestBase`1.ctor()  
SampleDomainTests`1.ctor() Zeile 20  
EfCoreSampleDomainTests.ctor()  
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)  
----- Inner Stack Trace -----  
LanguageManagementDataSeeder.SeedAsync()  
AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)  
LanguageManagementDataSeeder.SeedAsync()  
LanguageManagementDataSeedContributor.SeedAsync(DataSeedContext context)  
DataSeeder.SeedAsync(DataSeedContext context)  
AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)  
CastleAbpMethodInvocationAdapter.ProceedAsync()  
UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)  
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)  
<<SeedTestData>b__0>d.MoveNext() Zeile 41  
--- End of stack trace from previous location ---  
TaskExtensions.WaitAndUnwrapException(Task task)  
<>c__DisplayClass15_0.<Run>b__0(Task t)  
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)  
--- End of stack trace from previous location ---  
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)  
Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)  
--- End of stack trace from previous location ---  
TaskExtensions.WaitAndUnwrapException(Task task)  
AsyncContext.Run(Func`1 action)  
AsyncHelper.RunSync(Func`1 action)  
MyProjectTestBaseModule.SeedTestData(ApplicationInitializationContext context) Zeile 37  
MyProjectTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) Zeile 32  
OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)  
ModuleManager.InitializeModules(ApplicationInitializationContext context)  

Hi, we removed the FlagIcon property in this version, please see the migration guide. You should probably have an old NuGet package version somewhere in your test application, or in one of the dependent projects. Please check package versions manually. If you could not find the reason, feel free to open a new ticket and after that share your project with us, so we can better assist you.

Thank you. Apparently updating the packages via ABP Suite fixed the versioning problem.

Once I updated the nuGet packages to the new ABP version, my integration tests throw the following error. As you can see, I used the SampleTests as an example:

Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module MyProject.MyProjectTestBaseModule, MyProject.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Method not found: 'System.String Volo.Abp.Localization.LanguageInfo.get_FlagIcon()'.. See the inner exception for details.
---- System.MissingMethodException : Method not found: 'System.String Volo.Abp.Localization.LanguageInfo.get_FlagIcon()'.

I have adjusted the LocalizationOptions according to the migration guide and I have also created a new migration and applied it

Full stacktrace:

ModuleManager.InitializeModules(ApplicationInitializationContext context)
AbpApplicationBase.InitializeModules()
AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
AbpIntegratedTest`1.ctor()
MyProjectTestBase`1.ctor()
MyProjectDomainTestBase`1.ctor()
SampleDomainTests`1.ctor() Zeile 20
EfCoreSampleDomainTests.ctor()
RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
----- Inner Stack Trace -----
LanguageManagementDataSeeder.SeedAsync()
AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
LanguageManagementDataSeeder.SeedAsync()
LanguageManagementDataSeedContributor.SeedAsync(DataSeedContext context)
DataSeeder.SeedAsync(DataSeedContext context)
AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
CastleAbpMethodInvocationAdapter.ProceedAsync()
UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
<<SeedTestData>b__0>d.MoveNext() Zeile 41
--- End of stack trace from previous location ---
TaskExtensions.WaitAndUnwrapException(Task task)
<>c__DisplayClass15_0.<Run>b__0(Task t)
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
TaskExtensions.WaitAndUnwrapException(Task task)
AsyncContext.Run(Func`1 action)
AsyncHelper.RunSync(Func`1 action)
MyProjectTestBaseModule.SeedTestData(ApplicationInitializationContext context) Zeile 37
MyProjectTestBaseModule.OnApplicationInitialization(ApplicationInitializationContext context) Zeile 32
OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
ModuleManager.InitializeModules(ApplicationInitializationContext context)

Thank you, this helped!

Unfortunately, the GuidGenerator is a protected property, so I won't be able to set it manually. Getting the ItemManager through DI is an option, however, I don't want it to use the actual ItemRepository but a Substitute, so I can return a fake return value on the FindByItemNrAndVariantAsync(...) method.

My question here is: Is there a way to provide the domain service with an implementation of the GuidGenerator without using the IDomainService interface? Or alternatively, is there a way to get the ItemManager through dependency injection but with a mocked ItemRepository?

Showing 1 to 4 of 4 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11