Open Closed

⚠️ Bugs & Issues v7.4.x ⚠️ #5642


User avatar
0
alper created
Support Team

⚡ Update ABP CLI and ABP Suite

dotnet tool update -g Volo.Abp.Cli --prerelease
abp suite update --preview

📗 Blog post

  • https://blog.abp.io/abp/ABP.IO-Platform-7-4-RC-Has-Been-Published

📘 Commercial release logs

  • https://docs.abp.io/en/commercial/latest/release-notes
  • https://commercial.abp.io/releases/

🔼 Migration guides

  • https://docs.abp.io/en/abp/latest/Migration-Guides/Index

✏️ Feel free to report any bugs, issues and problems.


66 Answer(s)
  • User Avatar
    0
    rafael.gonzales created
    • ABP Framework version: v7.4.0.rc-1
    • UI Type: MVC
    • Database System: EF Core (PostgreSQL)
    • Tiered (for MVC) or Auth Server Separated (for Angular): no

    There are a lot of warnings that can be included in the next RC. There are related to the IConfiguration interface.

    For example, in OpenIddictDataSeedContributor.cs

    
    Line 86: var webClientRootUrl = configurationSection["Demo74rc1_Web:RootUrl"].EnsureEndsWith('/');
    Line 206: var blazorServerTieredRootUrl = configurationSection["Demo74rc1_BlazorServerTiered:RootUrl"].EnsureEndsWith('/');
    Line 250:var webPublicRootUrl = configurationSection["Demo74rc1_Web_Public:RootUrl"].EnsureEndsWith('/');
    Line 274: var webPublicTieredRootUrl = configurationSection["Demo74rc1_Web_Public_Tiered:RootUrl"].EnsureEndsWith('/');
    

    To avoid those warnings, you include a null-forgiving operator(!) for the configurationSection variable.

  • User Avatar
    0
    rafael.gonzales created

    ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

    There is an issue in test/Demo74rc1.TestBase/Security/FakeCurrentPrincipalAccessor.cs

    private ClaimsPrincipal _principal;

    _principal is not initialized in the constructor making a warning (or error if <WarningsAsErrors>Nullable</WarningsAsErrors> is setup)

    A solution could be to make ClaimsPrincipal nullable private ClaimsPrincipal? _principal;

    In the same file, there is an issue with the implementation of the interface

    The solution could be to change the interface ICurrentPrincipalAccessor.cs in Volo.Abp.Security.Claims and make the IDisposable as IDisposable?

    public interface ICurrentPrincipalAccessor
    {
        ClaimsPrincipal Principal { get; }
    
        IDisposable? Change(ClaimsPrincipal principal);
    }
    
  • User Avatar
    0
    rafael.gonzales created

    ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

    In src/Demo74rc1.Domain/OpenIddict/OpenIddictDataSeedContributor.cs

    There is a possible null reference argument in that method (in visual studio and rider) because it's using the ABP wrapper of string.IsNullOrWhiteSpace(str)

    If I replace the

    if (!webPublicClientId.IsNullOrWhiteSpace()) with this if (!string.IsNullOrWhiteSpace(webPublicClientId))

    The issue with the compiler disappeared.

  • User Avatar
    0
    rafael.gonzales created

    ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

    If <WarningsAsErrors>Nullable</WarningsAsErrors> is enabled, there is an issue with the property name.

    It suggested adding the "required" modifier to solve this issue as shown next.

  • User Avatar
    0
    rafael.gonzales created

    ABP Framework version: v7.4.0.rc-1 UI Type: MVC Database System: EF Core (PostgreSQL) Tiered (for MVC) or Auth Server Separated (for Angular): no

    In a nullable reference-enabled project, there is a missing "?" in the parameter of MapHealthChecksUiEndpoints

    Actual version:

        private static IServiceCollection MapHealthChecksUiEndpoints
            (this IServiceCollection services, 
                Action<global::HealthChecks.UI.Configuration.Options> setupOption = null)
        {
            services.Configure<AbpEndpointRouterOptions>(routerOptions =>
            {
                routerOptions.EndpointConfigureActions.Add(endpointContext =>
                {
                    endpointContext.Endpoints.MapHealthChecksUI(setupOption);
                });
            });
            return services;
        }
    

    It should be:

        private static IServiceCollection MapHealthChecksUiEndpoints
            (this IServiceCollection services, 
                Action<global::HealthChecks.UI.Configuration.Options>? setupOption = null)
        {
            services.Configure<AbpEndpointRouterOptions>(routerOptions =>
            {
                routerOptions.EndpointConfigureActions.Add(endpointContext =>
                {
                    endpointContext.Endpoints.MapHealthChecksUI(setupOption);
                });
            });
            return services;
        }
    

  • User Avatar
    0
    rafael.gonzales created

    In ABP Suite, there is an update in the entity generator, whenever you select a string, there is a new option to allow empty strings but it's only enabled when the "Required" option is checked.

    What is the sense of allowing empty strings if it's required? Why not allow Nullable strings in the ABP Suite entity generator?

  • User Avatar
    0
    rafael.gonzales created

    In ABP Suite Generated Code.

    In the DbContext generated,

    src/Demo74rc1.EntityFrameworkCore/EntityFrameworkCore/Demo74rc1DbContext.cs

    Can you add a null-forgiving operator in the generated DbSet?

    This is to avoid a Warning or Error (if WarningAsError is activated)

  • User Avatar
    0
    rafael.gonzales created

    In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.

    src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs

    A solution could be to use the Check.NotNull method

    Adding this before the CreateAsync method call

    input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));

  • User Avatar
    0
    rafael.gonzales created

    In the AppService generated by ABP Suite, there is an issue in some methods in the AppService if a non-nullable string property is created in an entity.

    src/Demo74rc1.Application/EntityDemos/EntityDemosAppService.cs

    A solution could be to use the Check.NotNull method

    Adding this before the CreateAsync and UpdateAsync method call in the AppService generated class solve this issue.

    input.StringColumn = Check.NotNull(input.StringColumn, nameof(input.StringColumn));

  • User Avatar
    0
    rafael.gonzales created

    In the ABP Suite generated Entity in src/Demo74rc1.Domain/EntityDemos/EntityDemo.cs

    There is no need to add an empty constructor. It will generated a Warning or Error (if WarningAsError is activated).

    Can you consider removing it from the template?

    This also happens in the .Extended version of the Entity generated class. The empty constructor should be removed from the template.

  • User Avatar
    0
    rafael.gonzales created

    In the ABP Suite Generated code, there is an issue in the generated class test/Demo74rc1.TestBase/EntityDemos/EntityDemosDataSeedContributor.cs

    Do we need a null validation in await _unitOfWorkManager.Current.SaveChangesAsync(); ?

    Current property is nullable and there will be a warning or error (if WarningAsNull is activated)

  • User Avatar
    0
    rafael.gonzales created

    In the ABP Suite generated code, there is a massive abuse of the #pragma warning disable CS8618

    Instead of disabling the warnings, can we replace those with the "required" modifier to follow a more organic approach?

    A solution is suggested.

  • User Avatar
    1
    hi.wujj@gmail.com created

    In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.

  • User Avatar
    0
    EngincanV created
    Support Team

    In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.

    Hi, thanks for your suggestion. This really makes sense, because otherwise if a custom method is added to the application service interface, it should be implemented in the application service base class and it will be overridden in the next generation, which we don't want in any case. I will create an internal issue for this.

  • User Avatar
    0
    rafael.gonzales created

    Hello, are there any comments regarding my findings?

  • User Avatar
    0
    EngincanV created
    Support Team

    Hi, I have created an internal issue for your findings related to nullable warnings on Suite-generated codes.

    In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.

    This is fixed with v7.4.0-rc.2. Thanks again for reporting the problem.

  • User Avatar
    0
    hi.wujj@gmail.com created

    Hi, I have created an internal issue for your findings related to nullable warnings on Suite-generated codes.

    In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.

    This is fixed with v7.4.0-rc.2. Thanks again for reporting the problem.

    thanks @EngincanV

  • User Avatar
    0
    hi.wujj@gmail.com created

    in the leptonXtheme , user avatar path 404.

  • User Avatar
    0
    maliming created
    Support Team

    in the leptonXtheme , user avatar path 404.

    hi

    This is fixed in the new version.

  • User Avatar
    0
    maliming created
    Support Team

    We will resolve all nullable warnings in 7.4

  • User Avatar
    0
    rashed created

    Compilation error for angular project with basic theme

    command used for creating project : abp new MyProject1 -t app-pro -u angular --preview -csf --theme basic

    go to angular folder : yarn yarn start

    It shouldn't reference lepton-x package , as we use basic theme

  • User Avatar
    1
    hi.wujj@gmail.com created

    Hi, I have created an internal issue for your findings related to nullable warnings on Suite-generated codes.

    In the ABP Suite generated code,Application Service Extended.cs Should inherit interface ,not in AppServiceBase.

    This is fixed with v7.4.0-rc.2. Thanks again for reporting the problem.

    hi, the same problem also exists in entityFramework layer.

  • User Avatar
    0
    rashed created

    Any quick fix for angular project with basic theme issue please ?

  • User Avatar
    0
    rashed created

    Why you generate all of these clients regardless the template used !!! whatever ui template used ( mvc, angular, blazor, ..) it makes confusion in the deployment

  • User Avatar
    0
    maliming created
    Support Team

    Why you generate all of these clients regardless the template used !!!

    hi

    This is exactly what template projects are for, you can remove clients you don't need.

  • User Avatar
    0
    rashed created

    **I think this is not logic **

    adding not existing clients to your database is very confusing for deployment team

    for example what is the benfite of adding --mobile none -u angular in generation command then you found MVC and Mobile clientIds in your database !!!

  • User Avatar
    0
    maliming created
    Support Team

    Thanks, I will create a internal issue for thsi.

  • User Avatar
    0
    rashed created

    Failed to login from public site

    run this command to create a project

    abp new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer --separate-auth-server

    Then run all web projects and try to login from public site , I got this error

    note: I cleard the cache and remove all cookies many times but still same error

  • User Avatar
    0
    rashed created

    Generated public site

    I notice some diffreneces between public site genrated when using angular template and mvc template in tiered architecture and separate auth server although in both cases the public site created as MVC project

    Do you mean that ? why you don't use the same template for public site

    I use these 2 commands

    abp new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer --separate-auth-server

    abp new MyProject -t app-pro -u mvc --tiered --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-auth-server -dbms SqlServer -cs --separate-auth-server

    then I opened public site project and found these diffrences in angular case

    • no reCaptcha package
    • no BackgroundWorkers

    options.UsePkce = true; only in angular case

  • User Avatar
    0
    maliming created
    Support Team

    hi

    Is this endpoint success? you can open it in your browser.

  • User Avatar
    0
    rashed created

    hi

    Is this endpoint success? you can open it in your browser.

    Hi

    no it's not accessiable,

    looks like the authority url generated in public web app is diffrent than the one generated in api web app

    note: angular app working without issues

  • User Avatar
    0
    maliming created
    Support Team

    Thanks we will confirm the problem.

  • User Avatar
    0
    maliming created
    Support Team

    hi

    You can use --separate-identity-server, we will be compatible in next rc.

    new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-identity-server -dbms SqlServer --separate-identity-server
    
  • User Avatar
    0
    rashed created

    hi

    You can use --separate-identity-server, we will be compatible in next rc.

    new MyProject -t app-pro -u angular --preview -v 7.4.0-rc.2 -csf --theme lepton-x --skip-cache --with-public-website --separate-identity-server -dbms SqlServer --separate-identity-server 
    

    Please note I already use it in my command, you set it 2 times, actually this was not my issue

  • User Avatar
    0
    maliming created
    Support Team

    Use --separate-identity-server and try again, Thanks.

    https://github.com/abpframework/abp/pull/17519

  • User Avatar
    0
    rafael.gonzales created

    There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version

    Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org

  • User Avatar
    0
    EngincanV created
    Support Team

    There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version

    Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org

    Hi, thanks for reporting. We will fix the problem and publish the packages asap.

  • User Avatar
    0
    EngincanV created
    Support Team

    There is an issue with the version 7.4 rc-3. I have an issue with the following packages that couldn't be restored with this version

    Unable to find package Volo.CmsKit.Pro.Common.Web. No packages exist with this id in source(s): ABP Commercial NuGet Source, C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\7.0.307\Sdks\Microsoft.NET.Sdk.Web\library-packs, Microsoft Visual Studio Offline Packages, nuget.org

    We have published the missing packages, please try again. (You might want to clear your Nuget cache if the package cannot be found on your first try.)

  • User Avatar
    0
    rafael.gonzales created

    Hi again, this is your friend Rafael :)

    In this template, can we replace the #pragma warning disable CS8618 for a null forgiven or required operator approach?

  • User Avatar
    0
    rafael.gonzales created

    Also, I noticed that this template lacks a couple of "?" in some nullable string parameters.

  • User Avatar
    0
    rafael.gonzales created

    There are a couple of missing "?" in this template too

    In the same template, this "filterText" should be nullable too

  • User Avatar
    0
    rafael.gonzales created

    ABP Suite still generates EntityManager generated class with methods without null validation checking

    In this example the GeoManager class is generating a Create Method with a parameter of type "string codigoInei = null".

    It should be "string? codigoInei = null". This complicates us if I want to re-generate the ABP Suite. I will need to fix everytime.

  • User Avatar
    0
    rafael.gonzales created

    This situation happen also in the Geo.Extended.cs class in the Domain Project

    The constructor generated in the base class as the extended class are generated properties with the same problem (for nullable properties)

    "string codigoInei = null"

    instead of "string? codigoInei = null"

  • User Avatar
    0
    rafael.gonzales created

    There is another issue in the generated EfCoreEntityRepository.cs class

    The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class

    There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project). One method returns a nullable type while the other expects a non-nullable return value.

    This is a critical error for the new version.

    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly.
    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))".
    3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0
    
  • User Avatar
    1
    rafael.gonzales created

    There is another issue in the generated EfCoreEntityRepository.cs class

    The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class

    There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project). One method returns a nullable type while the other expects a non-nullable return value.

    This is a critical error for the new version.

    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly. 
    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))". 
    3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0 
    

    The solution for this is the following.

    In **EfCoreRepository.cs **

    Replace this code:

    public async override Task&lt;TEntity&gt; FindAsync(
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,
        bool includeDetails = true,
        CancellationToken cancellationToken = default)
    {
        return includeDetails
            ? await (await WithDetailsAsync())
                .Where(predicate)
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))
            : await (await GetDbSetAsync())
                .Where(predicate)
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));
    }
    

    For this

    public async override Task&lt;TEntity?&gt; FindAsync(
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,
        bool includeDetails = true,
        CancellationToken cancellationToken = default)
    {
        return includeDetails
            ? await (await WithDetailsAsync())
                .Where(predicate)
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))
            : await (await GetDbSetAsync())
                .Where(predicate)
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));
    }
    

    And replace this code:

    public virtual async Task&lt;TEntity&gt; FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
    {
        return includeDetails
            ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
            : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
    }
    

    For this one public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }

  • User Avatar
    0
    rafael.gonzales created

    Another observation,

    There is no lepton 2.4.0-rc.3, is this normal?

  • User Avatar
    0
    EngincanV created
    Support Team

    Hi again, this is your friend Rafael :)

    In this template, can we replace the #pragma warning disable CS8618 for a null forgiven or required operator approach?

    Thanks for your suggestion. I will update it.

  • User Avatar
    0
    EngincanV created
    Support Team

    There are a couple of missing "?" in this template too

    In the same template, this "filterText" should be nullable too

    Thanks for reporting. I have created an issue for it and will fix it asap. BTW, I'm also checking your other findings.

  • User Avatar
    0
    byersjus created

    There seems to be a bug when adding navigation collections (n:n) via Suite. In my case, I'm adding a navigation to a 'Tool' entity from 'ToolAssemblies' and get the following errors:

    Edit: I should note this only occurs when using the 'Customizable code' option during crud page generation.

    Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssemblyManagerBase.ToolAssemblyManagerBase(IToolAssemblyRepository, IRepository<Tool, Guid>)' ToolAssemblyManager.Extended.cs

    Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssembliesAppServiceBase.ToolAssembliesAppServiceBase(IToolAssemblyRepository, ToolAssemblyManager, IDistributedCache<ToolAssemblyExcelDownloadTokenCacheItem, string>, IRepository<Tool, Guid>)' ToolAssembliesAppService.Extended.cs

  • User Avatar
    0
    EngincanV created
    Support Team

    There seems to be a bug when adding navigation collections (n:n) via Suite. In my case, I'm adding a navigation to a 'Tool' entity from 'ToolAssemblies' and get the following errors:

    Edit: I should note this only occurs when using the 'Customizable code' option during crud page generation.

    Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssemblyManagerBase.ToolAssemblyManagerBase(IToolAssemblyRepository, IRepository<Tool, Guid>)' ToolAssemblyManager.Extended.cs

    Error CS7036 There is no argument given that corresponds to the required parameter 'toolRepository' of 'ToolAssembliesAppServiceBase.ToolAssembliesAppServiceBase(IToolAssemblyRepository, ToolAssemblyManager, IDistributedCache<ToolAssemblyExcelDownloadTokenCacheItem, string>, IRepository<Tool, Guid>)' ToolAssembliesAppService.Extended.cs

    Thanks for reporting. Whenever a many-to-many relation is established, it seems we also need to re-generate the ctor for the custom manager and appservice classes. I will create an issue for it and will fix it asap.

  • User Avatar
    0
    zhaof created

    In the process of generating CRUD pages with abpSuite, I encountered Error CS1737.

    abp suite 7.4.0-rc4

  • User Avatar
    1
    rafael.gonzales created

    There is another issue in the generated EfCoreEntityRepository.cs class

    The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class

    There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
    One method returns a nullable type while the other expects a non-nullable return value.

    This is a critical error for the new version.

    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly.  
    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))".  
    3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0  
    

    The solution for this is the following.

    In **EfCoreRepository.cs **

    Replace this code:

    public async override Task&lt;TEntity&gt; FindAsync( 
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate, 
        bool includeDetails = true, 
        CancellationToken cancellationToken = default) 
    { 
        return includeDetails 
            ? await (await WithDetailsAsync()) 
                .Where(predicate) 
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) 
            : await (await GetDbSetAsync()) 
                .Where(predicate) 
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); 
    } 
     
    

    For this

    public async override Task&lt;TEntity?&gt; FindAsync( 
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate, 
        bool includeDetails = true, 
        CancellationToken cancellationToken = default) 
    { 
        return includeDetails 
            ? await (await WithDetailsAsync()) 
                .Where(predicate) 
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)) 
            : await (await GetDbSetAsync()) 
                .Where(predicate) 
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken)); 
    } 
     
    

    And replace this code:

    public virtual async Task&lt;TEntity&gt; FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) 
    { 
        return includeDetails 
            ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) 
            : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); 
    } 
     
    

    For this one public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default) { return includeDetails ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken)) : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken)); }

    Hi,

    Is there any news about this issue?

    Thanks!

  • User Avatar
    0
    EngincanV created
    Support Team

    There is another issue in the generated EfCoreEntityRepository.cs class

    The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class

    There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
    One method returns a nullable type while the other expects a non-nullable return value.

    This is a critical error for the new version.

    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly.   
    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))".   
    3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0   
    

    The solution for this is the following.

    In **EfCoreRepository.cs **

    Replace this code:

    public async override Task&lt;TEntity&gt; FindAsync(  
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,  
        bool includeDetails = true,  
        CancellationToken cancellationToken = default)  
    {  
        return includeDetails  
            ? await (await WithDetailsAsync())  
                .Where(predicate)  
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))  
            : await (await GetDbSetAsync())  
                .Where(predicate)  
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));  
    }  
      
    

    For this

    public async override Task&lt;TEntity?&gt; FindAsync(  
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,  
        bool includeDetails = true,  
        CancellationToken cancellationToken = default)  
    {  
        return includeDetails  
            ? await (await WithDetailsAsync())  
                .Where(predicate)  
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))  
            : await (await GetDbSetAsync())  
                .Where(predicate)  
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));  
    }  
      
    

    And replace this code:

    public virtual async Task&lt;TEntity&gt; FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)  
    {  
        return includeDetails  
            ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))  
            : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));  
    }  
      
    

    For this one
    public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
    {
    return includeDetails
    ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
    : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
    }

    Hi,

    Is there any news about this issue?

    Thanks!

    Hi Rafael, thanks for reporting. We have already fixed this (see https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs#L304) and enabled nullable annotations for all projects of both ABP Framework & ABP Commercial (https://github.com/abpframework/abp/issues/16610) and it will be available in v8.0.

  • User Avatar
    0
    rafael.gonzales created

    There is another issue in the generated EfCoreEntityRepository.cs class

    The issue corresponds to the **FindAsync **method inside the **EfCoreRepository ** class

    There seems to be a problem between the nullable-enabled project and the non-enabled nullable project (EntityFramework Project).
    One method returns a nullable type while the other expects a non-nullable return value.

    This is a critical error for the new version.

    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match member "Task<Ubigeo?> IRepository<Ubigeo>.FindAsync(Expression<Func<Ubigeo, bool>> predicate, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" implemented implicitly.    
    3>EfCoreUbigeoRepository.cs(14,106): Error CS8613 : Nullability of reference types of the return type of "Task<Ubigeo> EfCoreRepository<DemoDbContext, Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))" does not match the implicitly implemented member "Task<Ubigeo?> IReadOnlyBasicRepository<Ubigeo, Guid>.FindAsync(Guid id, bool includeDetails = true, CancellationToken cancellationToken = default(CancellationToken))".    
    3>------- Finished building project: D.EntitemoyFrameworkCore. Succeeded: False. Errors: 2. Warnings: 0    
    

    The solution for this is the following.

    In **EfCoreRepository.cs **

    Replace this code:

    public async override Task&lt;TEntity&gt; FindAsync(   
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,   
        bool includeDetails = true,   
        CancellationToken cancellationToken = default)   
    {   
        return includeDetails   
            ? await (await WithDetailsAsync())   
                .Where(predicate)   
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))   
            : await (await GetDbSetAsync())   
                .Where(predicate)   
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));   
    }   
       
    

    For this

    public async override Task&lt;TEntity?&gt; FindAsync(   
        Expression&lt;Func&lt;TEntity, bool&gt;> predicate,   
        bool includeDetails = true,   
        CancellationToken cancellationToken = default)   
    {   
        return includeDetails   
            ? await (await WithDetailsAsync())   
                .Where(predicate)   
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken))   
            : await (await GetDbSetAsync())   
                .Where(predicate)   
                .SingleOrDefaultAsync(GetCancellationToken(cancellationToken));   
    }   
       
    

    And replace this code:

    public virtual async Task&lt;TEntity&gt; FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)   
    {   
        return includeDetails   
            ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))   
            : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));   
    }   
       
    

    For this one
    public virtual async Task<TEntity?> FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
    {
    return includeDetails
    ? await (await WithDetailsAsync()).OrderBy(e => e.Id).FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
    : await (await GetDbSetAsync()).FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
    }

    Hi,

    Is there any news about this issue?

    Thanks!

    Hi Rafael, thanks for reporting. We have already fixed this (see https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs#L304) and enabled nullable annotations for all projects of both ABP Framework & ABP Commercial (https://github.com/abpframework/abp/issues/16610) and it will be available in v8.0.

    Thanks for your answer!!

    Why is not that solution included in 7.4? In my opinion, the fix of EfCoreRepository, it's critical because it can lead to data issues right now. Is it possible to include at least the EfCoreRepository fix only or a temporary workaround?

  • User Avatar
    0
    EngincanV created
    Support Team

    Why is not that solution included in 7.4? In my opinion, the fix of EfCoreRepository, it's critical because it can lead to data issues right now. Is it possible to include at least the EfCoreRepository fix only or a temporary workaround?

    We aimed to enable nullable annotations for all our projects in v8.0 (https://github.com/abpframework/abp/issues/16610), therefore we have made the related changes on the dev branch and because of that all of those changes will be included in v8.0 and unfortunately, it's not possible for us to include this change in the 7.4 release.

  • User Avatar
    0
    Emanuele.Filardo created

    Hi, there is an issue in MAUI Android, ThemeManager doesnt change theme in dialog, you have to add the following line:

    public class ThemeManager : ISingletonDependency
    {
        private readonly IStorage _storage;
    
        public ThemeManager(IStorage storage)
        {
            _storage = storage;
        }
    
        public async Task<AppTheme> GetAppThemeAsync()
        {
            var storedTheme = await _storage.GetAsync(GeSAConsts.Settings.Theme);
    
            if (!storedTheme.IsNullOrEmpty())
            {
    #if ANDROID
                HandleAndroidDialogTheme();
    #endif
                return Enum.Parse<AppTheme>(storedTheme);
            }
    
            return AppTheme.Unspecified;
        }
    
        public async Task SetAppThemeAsync(AppTheme theme)
        {
            App.Current!.UserAppTheme = theme;
    
    #if ANDROID
            HandleAndroidDialogTheme();
    #endif
    
            await _storage.SetAsync(GeSAConsts.Settings.Theme, theme.ToString());
        }
    
        private static void HandleAndroidDialogTheme()
        {
            AndroidX.AppCompat.App.AppCompatDelegate.DefaultNightMode = App.Current!.UserAppTheme switch
            {
                AppTheme.Light => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightNo,
                AppTheme.Dark => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightYes,
                AppTheme.Unspecified => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightFollowSystem,
                _ => AndroidX.AppCompat.App.AppCompatDelegate.ModeNightFollowSystem
            };
        }
    }
    

    HTH :-)

  • User Avatar
    0
    ash.jackson created

    Suite fails when generating angular front-end in microservice solution

    Steps to produce:

    1. Create new microservice solution with abp new Test -t microservice-pro -u angular -csf
    2. Migrate databases and launch project
    3. Use suite to generate a new entity in the ProductService
    4. Observe suite produces a success message:
    5. Re-load the angular UI
    6. Observe the permission for the new entity is created, but no UI has been added.

    I've reverted Cli and Suite to 7.3.3 and confirmed that this sequence works correctly in the previous version.

    This is the suite log output showing the error:

    2023-10-21 18:18:10.157 +01:00 [INF] 1/14 - EntityGenerateCommand started...
    2023-10-21 18:18:12.449 +01:00 [INF] 1/14 - EntityGenerateCommand completed.                           | Duration: 2287 ms.
    2023-10-21 18:18:12.449 +01:00 [INF] 2/14 - RepositoryCommand started...
    2023-10-21 18:18:12.583 +01:00 [INF] 2/14 - RepositoryCommand completed.                               | Duration: 134 ms.
    2023-10-21 18:18:12.583 +01:00 [INF] 3/14 - ManagerCommand started...
    2023-10-21 18:18:12.625 +01:00 [INF] 3/14 - ManagerCommand completed.                                  | Duration: 41 ms.
    2023-10-21 18:18:12.625 +01:00 [INF] 4/14 - AppServiceCommand started...
    2023-10-21 18:18:18.596 +01:00 [INF] 4/14 - AppServiceCommand completed.                               | Duration: 5970 ms.
    2023-10-21 18:18:18.596 +01:00 [INF] 5/14 - ProxyControllerCommand started...
    2023-10-21 18:18:18.627 +01:00 [INF] 5/14 - ProxyControllerCommand completed.                          | Duration: 31 ms.
    2023-10-21 18:18:18.627 +01:00 [INF] 6/14 - PermissionCommand started...
    2023-10-21 18:18:18.677 +01:00 [INF] 6/14 - PermissionCommand completed.                               | Duration: 49 ms.
    2023-10-21 18:18:18.677 +01:00 [INF] 7/14 - ApplicationObjectMappingCommand started...
    2023-10-21 18:18:18.692 +01:00 [INF] 7/14 - ApplicationObjectMappingCommand completed.                 | Duration: 14 ms.
    2023-10-21 18:18:18.692 +01:00 [INF] 8/14 - UnitTestCommandCommand started...
    2023-10-21 18:18:18.762 +01:00 [INF] 8/14 - UnitTestCommandCommand completed.                          | Duration: 70 ms.
    2023-10-21 18:18:18.762 +01:00 [INF] 9/14 - GenerateProxyCommand started...
    2023-10-21 18:18:18.814 +01:00 [INF] 9/14 - GenerateProxyCommand completed.                            | Duration: 52 ms.
    2023-10-21 18:18:18.815 +01:00 [INF] 10/14 - MvcUiGenerateCommand started...
    2023-10-21 18:18:19.016 +01:00 [INF] 10/14 - MvcUiGenerateCommand completed.                            | Duration: 201 ms.
    2023-10-21 18:18:19.016 +01:00 [INF] 11/14 - MvcObjectMappingCommand started...
    2023-10-21 18:18:19.035 +01:00 [INF] 11/14 - MvcObjectMappingCommand completed.                         | Duration: 19 ms.
    2023-10-21 18:18:19.035 +01:00 [INF] 12/14 - MvcMenuContributorCommand started...
    2023-10-21 18:18:19.101 +01:00 [INF] 12/14 - MvcMenuContributorCommand completed.                       | Duration: 65 ms.
    2023-10-21 18:18:19.101 +01:00 [INF] 13/14 - AngularUiGenerateWithSchematicsCommand started...
    2023-10-21 18:18:51.525 +01:00 [INF] Running the Angular Schematics command:
    node run-schematics.mjs '/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/.bin/ng' g '.suite/schematics/collection.json:entity' microservice-pro Test.ProductService '/Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json' '/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular' 
    2023-10-21 18:18:56.009 +01:00 [INF] Angular Schematics command failed.
    /Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:60
    		error = new Error(message);
    		        ^
    
    Error: Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json
    [Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.
        at makeError (/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/lib/error.js:60:11)
        at handlePromise (/Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/node_modules/execa/index.js:118:26)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async file:///Users/ashjackson/Git/cloudbiz-so/Test/apps/angular/.suite/schematics/run-schematics.mjs:6:20 {
      shortMessage: 'Command failed with exit code 1: .suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json',
      command: '.suite/schematics/node_modules/.bin/ng g .suite/schematics/collection.json:entity --template microservice-pro --target Test.ProductService --source /Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json',
      escapedCommand: '".suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" --template microservice-pro --target Test.ProductService --source "/Users/ashjackson/Git/cloudbiz-so/Test/services/product/.suite/entities/Sku.json"',
      exitCode: 1,
      signal: undefined,
      signalDescription: undefined,
      stdout: '',
      stderr: '[Project Not Found] A project matching entity solution name or a default project does not exist in your Angular workspace.',
      failed: true,
      timedOut: false,
      isCanceled: false,
      killed: false
    }
    
    Node.js v18.17.1
    
    2023-10-21 18:18:56.025 +01:00 [INF] 13/14 - AngularUiGenerateWithSchematicsCommand completed.          | Duration: 36923 ms.
    
  • User Avatar
    0
    rafael.gonzales created

    Hello!

    There is an issue in the interface with the following structure

    public interface IDEMODbContext : IEfCoreDbContext

    The DbSet properties there shouldn't have the null forgiven because it's an interface. There is no template to customize it and even if you fix it, every time you generate it from Suite, a new line with the same error gets created.

  • User Avatar
    0
    rafael.gonzales created

    There is also an issue in the file DEMOApplicationTests.cs

    There should be a null forgiven in every result.Property or we will be having compilation error. It happens because the result is a nullable variable.

    It happens in the following methods.

    • public async Task CreateAsync()
    • public async Task UpdateAsync()
  • User Avatar
    0
    zhaof created

    ABP Suite does not support generating CRUD pages for entities with GUID types.

    Only the Application template does not support it.

  • User Avatar
    0
    Navneet@aol.com.au created

    Bug Report: IdentityClaimType Version: 7.4.1 App: MVC Application How to reproduce Bug:-

    1. Create a new ClaimType
    2. Assign ClaimType to Users and Roles
    3. Bug1: When you delete previously created and assigned ClaimTypes, it doesn't give any error that this claim is in use in User & Role.
    4. Bug 2: Deleting Claim Types, delete from AbpClaimTypes but it doesn't delete from AbpRoleClaims and AbpUserClaims.
    5. Bug 3: AbpRoleClaims and AbpUserClaims can only be deleted by deleting them from the backend DatabaseServer, not from UI

    . . . Is there any quickfix I can use in my production server?

  • User Avatar
    0
    linhhn@arius.vn created

    In Angular UI 7.4.1, modal add/edit user When username contains non-alphabetic characters, the validate message is displaying incorrectly even though the server returns the correct error

  • User Avatar
    0
    Emanuele.Filardo created

    if someone has startup issue with MAUI Mobile for Android see this

  • User Avatar
    0
    464199480 created

    abp update ABP CLI 7.4.2 Cannot update Volo.* packages! An error occurred while updating the package "Volo.Abp.Core". Error: Object reference not set to an instance of an object. Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Volo.Abp.Cli.ProjectModification.VoloNugetPackagesVersionUpdater.UpdateVoloPackagesAsync(String content, Boolean includeNightlyPreviews, Boolean includeReleaseCandidates, Boolean switchToStable, SemanticVersion latestNugetVersion, SemanticVersion latestNugetReleaseCandidateVersion, String latestMyGetVersion, String specifiedVersion) in D:\ci\Jenkins\workspace\abp-volo-release\abp\framework\src\Volo.Abp.Cli.Core\Volo\Abp\Cli\ProjectModification\VoloNugetPackagesVersionUpdater.cs:line 184 Volo packages are updated in Taitans.Abp.Commercial.Core project.

  • User Avatar
    0
    rafael.gonzales created

    Hello, Can we have a "Bugs & Issues" thread for v8.0.0?

  • User Avatar
    0
    EngincanV created
    Support Team

    Hello, Can we have a "Bugs & Issues" thread for v8.0.0?

    Hi, thanks for reminding. Here is the thread link: https://support.abp.io/QA/Questions/6260/Bugs--Issues-v80x

Made with ❤️ on ABP v8.0.0 Updated on November 17, 2023, 08:43