Atividades de "alex.maiereanu@3sstudio.com"

Hi

I understand that it's difficult for you to move forward, but you also need to understand that we can't just share customer projects :D. What I'm asking from you is for help to see how we can better catch this exception and see what is going on. Is there a way to add better error handling? Would you have a hunch from where this originates?

Thats the issue

I can't reproduce the issue consistently on my project, which has more than 100 tests and of course on a new sample project this is not appearing.

My hunch is that this is starting to be a problem after X amount of tests are added.

Hi liangshiwei,

Thanks for the quick reply.

Since we are running a new project, from template version 8.0.5, we already have all the proposed fixes implemented.

This is the EF test project module:




public class MyEntityFrameworkCoreTestModule : AbpModule
{
private SqliteConnection? \_sqliteConnection;

public override void ConfigureServices(ServiceConfigurationContext context)
{
    Configure<FeatureManagementOptions>(options =>
    {
        options.SaveStaticFeaturesToDatabase = false;
        options.IsDynamicFeatureStoreEnabled = false;
    });
    Configure<PermissionManagementOptions>(options =>
    {
        options.SaveStaticPermissionsToDatabase = false;
        options.IsDynamicPermissionStoreEnabled = false;
    });
    Configure<TextTemplateManagementOptions>(options =>
    {
        options.SaveStaticTemplatesToDatabase = false;
        options.IsDynamicTemplateStoreEnabled = false;
    });
    context.Services.AddAlwaysDisableUnitOfWorkTransaction();

    ConfigureInMemorySqlite(context.Services);

}

private void ConfigureInMemorySqlite(IServiceCollection services)
{
    _sqliteConnection = CreateDatabaseAndGetConnection();

    services.Configure<AbpDbContextOptions>(options =>
    {
        options.Configure(context =>
        {
            context.DbContextOptions.UseSqlite(_sqliteConnection);
        });
    });
}

public override void OnApplicationShutdown(ApplicationShutdownContext context)
{
    _sqliteConnection?.Dispose();
}

private static SqliteConnection CreateDatabaseAndGetConnection()
{
    var connection = new SqliteConnection("Data Source=:memory:");
    connection.Open();

    var options = new DbContextOptionsBuilder<QQDbContext>()
        .UseSqlite(connection)
        .Options;

    using (var context = new QQDbContext(options))
    {
        context.GetService<IRelationalDatabaseCreator>().CreateTables();
    }

    return connection;
}
  • ABP Framework version: v8.1.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

HI ABP team,

When running tests on Azure Devops and very rarely on the developer machine, we get randomly failing unit tests. We can see the following exception:

Starting test execution, please wait... A total of 1 test files matched the specified pattern. [xUnit.net 00:00:18.48] Project.App.EntityFrameworkCore.Repositories.IdentityCustomerUserRepositoryTests.GetCustomerIdentityUsers_Will_Filter_By_Email_Or_UserName(email: null, userName: null, customerName: "CME", customerNumber: null, expectedCount: 1) [FAIL] Failed Project.App.EntityFrameworkCore.Repositories.IdentityCustomerUserRepositoryTests.GetCustomerIdentityUsers_Will_Filter_By_Email_Or_UserName(email: null, userName: null, customerName: "CME", customerNumber: null, expectedCount: 1) [1 ms] Error Message: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Project.App.QQTestBaseModule, Project.App.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Object reference not set to an instance of an object.. See the inner exception for details. ---- System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: 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 Project.App.QQTestBase1..ctor() at Project.App.EntityFrameworkCore.QQEntityFrameworkCoreTestBase..ctor() at Project.App.EntityFrameworkCore.Repositories.IdentityCustomerUserRepositoryTests..ctor() in /home/vsts/work/1/s/test/Project.App.EntityFrameworkCore.Tests/EntityFrameworkCore/Repositories/IdentityCustomerUserRepositoryTests.cs:line 23 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) ----- Inner Stack Trace ----- at Microsoft.Data.Sqlite.SqliteConnection.RemoveCommand(SqliteCommand command) at System.Data.Common.DbCommand.DisposeAsync() at Microsoft.EntityFrameworkCore.Storage.RelationalDataReader.DisposeAsync() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken) at Volo.Abp.SettingManagement.EntityFrameworkCore.EfCoreSettingRepository.GetListAsync(String providerName, String providerKey, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.SettingManagement.SettingManagementStore.SetCacheItemsAsync(String providerName, String providerKey, String currentName, SettingCacheItem currentCacheItem)

As mentioned, each time it's a different test. The only common thing is the exception root: Volo.Abp.AbpInitializationException : An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Project.App.QQTestBaseModule, Project.App.TestBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: Object reference not set to an instance of an object.. See the inner exception for details. ---- System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)

We would gladly work together with you to discover the root cause, but I don't what we can change in the setup to get more details.

Responder

Hi, before closing the ticket,

any news on points:

  • Why are empty “if” statements added in DbContext?
  • ABP recommendations not respected in Domain Service

Regarding your answer on: Will child entities be handled through its master entity? I understand that you want to provide more freedom and I suppose this is the 80% case, but at least in our opinion, by trying to adhere to DDD principles, the child entities should be updated over the AggregateRoot and not have customization points. In my opinion, it would be the best if ABP suite can provide both options to users in order to have freedom to implement based on the application needs. Also, if you automatically create the appservice, it's not possible to hide the api endpoints for the child entity.

Responder

Hi,

Thanks for your replies so far. I have created an ticket related to the angular questions

Pergunta

Database provider: EntityFrameworkCore UI framework: Angular ABP Version: 8.0.5 Generated through ABP Suite

Hi ABP team,

I'm posting here a couple of points related to abp suite. Could you assist us with them?

Frontend angular:

Design:

Is it possible for me to design and implement new templates that can be utilized during the generation process?

CSS

Where should I write CSS for my specific component? Is it necessary to place all of my CSS classes within the global styles.css file, or is there an alternative approach? Regarding advanced filters, is there an option to disable them entirely? Alternatively, is it possible to select which filters are included?

Pergunta

Database provider: EntityFrameworkCore UI framework: Angular ABP Version: 8.0.5 Generated through ABP Suite

Hi ABP team,

I'm posting here a couple of points related to abp suite. Could you assist us with them?

Will value objects be supported? And any time soon?

From the ABP provided documentation, it’s clear that value object type is not supported, but this can’t be achieved through custom code either.

As noticed from the figure, the custom code part indeed can be modified and changes won’t be lost. Or

After applying changes in DbContext class to register the properties from value object SupplierDetails, a new build done through APB suite will delete the custom changes. From the above figure it can be noticed that the value object mapping is lost, regardless of the registration approach.

This cand simply be reproduced by creating a new entity (master or child) and adding even just one property.

Why are empty “if” statements added in DbContext?

Another noticed thing that occurs with every build done from ABP Suite also at DbContext class level is that suite is adding the same empty if statement every time.

This cand simply be reproduced by creating/updating an entity and hitting the “Save and generate” button from ABP Suite.

Will child entities be handled through its master entity?

ABP Suite’s documentation specifies that for child type entities DomainService and AppService classes are created apart from master’s DomainService and AppService classes, meaning that child entities won’t be handled through master’s DomainService and AppService. Couldn’t child entities be handled along with master entity? When creating/updating/deleting master entities, child entities should be created/updated/deleted through master and not through child DomainService or child AppService.

Will there be checks added for create/update DTOs in order to specify which properties to add to each DTO?

While creating or editing an entity, base DTOs are automatically created/updated, but some properties that are not intended for create or update actions are landing in create/update base DTOs that are clearly not modifiable. This option should fall in the user's control.

ABP recommendations not respected in Domain Service

In the generated domain service, repository methods are used to insert / update entities. Based on documentation from ABP, this should happen in the appservice

Frontend angular:

Design:

Is it possible for me to design and implement new templates that can be utilized during the generation process?

CSS

Where should I write CSS for my specific component? Is it necessary to place all of my CSS classes within the global styles.css file, or is there an alternative approach? Regarding advanced filters, is there an option to disable them entirely? Alternatively, is it possible to select which filters are included?

Excel

For exporting to Excel, does the export include all fields from the entity? Can I choose which fields to be included?

General:

If we modify a template how do we maintain it when ABP ships out changes / bug fixing in the templates?

Mostrando 1 até 8 de 8 registros
Made with ❤️ on ABP v8.2.0-preview Updated on março 25, 2024, 15:11