Base solution for your next web application
Open Closed

Getting error in every GetAll function after migrating to v8.0 #8016


User avatar
1
mujthabagroad created

Hi, After upgrading to newer version 8.0, getting an error in all menu which is generated with the RAD tool before.

ERROR 2019-11-14 15:04:01,086 [16   ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'OrderBy<Currency, int>(     source: Where<Currency>(         source: Where<Currency>(             source: DbSet<Currency>,             predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),         predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),     keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. System.InvalidOperationException: The LINQ expression 'OrderBy<Currency, int>(     source: Where<Currency>(         source: Where<Currency>(             source: DbSet<Currency>,             predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),         predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),     keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.    at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& )    at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)    at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)    at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)    at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)    at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)    at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_01.<ExecuteAsync>b__0()    at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func1 compiler)    at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)    at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)    at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable1.GetAsyncEnumerator(CancellationToken cancellationToken)    at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator()    at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)    at ioNob.h2oERP.Base.CurrenciesAppService.GetAll(GetAllCurrenciesInput input) in D:\GitRepo\h2oERPZero\aspnet-core\src\ioNob.h2oERP.Application\Base\CurrenciesAppService.cs:line 82    at lambda_method(Closure , Object )    at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Raising error from these sections in service.

var currencies = await query                 .OrderBy(input.Sorting ?? "currency.id asc")                 .PageBy(input)                 .ToListAsync(); Anythings needs to be changed?

Thanks.


31 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mujthabagroad

    • Does this happen for the newly generated pages ?
    • Could you share your entire query ?
  • User Avatar
    0
    mujthabagroad created

    Hello,

    <span class="colour" style="color: rgb(85, 85, 85);">Does this happen for the newly generated pages ?</span>
    

    Yes, tried with a newly generated view, but that view also has the same problem.

    public async Task<PagedResultDto<GetTestForViewDto>> GetAll(GetAllTestsInput input)
             {
    
    var filteredTests = _testRepository.GetAll()
    .Include( e => e.CostCenterFk)
    .WhereIf(!string.IsNullOrWhiteSpace(input.Filter), e => false  || e.test1.Contains(input.Filter) || e.test2.Contains(input.Filter))
    .WhereIf(!string.IsNullOrWhiteSpace(input.test1Filter),  e => e.test1.ToLower() == input.test1Filter.ToLower().Trim())
    .WhereIf(!string.IsNullOrWhiteSpace(input.test2Filter),  e => e.test2.ToLower() == input.test2Filter.ToLower().Trim())
    .WhereIf(input.Mintest3Filter != null, e => e.test3 >= input.Mintest3Filter)
    .WhereIf(input.Maxtest3Filter != null, e => e.test3 <= input.Maxtest3Filter)
    .WhereIf(!string.IsNullOrWhiteSpace(input.CostCenterNameFilter), e => e.CostCenterFk != null && e.CostCenterFk.Name.ToLower() == input.CostCenterNameFilter.ToLower().Trim());
    
    var pagedAndFilteredTests = filteredTests
                    .OrderBy(input.Sorting ?? "id asc")
                    .PageBy(input);
    
    var tests = from o in pagedAndFilteredTests
                             join o1 in _lookup_costCenterRepository.GetAll() on o.CostCenterId equals o1.Id into j1
                             from s1 in j1.DefaultIfEmpty()
    
                             select new GetTestForViewDto() {
    Test = new TestDto
    {
                                    test1 = o.test1,
                                    test2 = o.test2,
                                    test3 = o.test3,
                                    Id = o.Id
    },
                             	CostCenterName = s1 == null ? "" : s1.Name.ToString()
    };
    
                var totalCount = await filteredTests.CountAsync();
    
                return new PagedResultDto<GetTestForViewDto>(
                    totalCount,
                    await tests.ToListAsync()
                );
             }
    

    Noticed that getting the error in the join section.

    join o1 in _lookup_costCenterRepository.GetAll() on o.CostCenterId equals o1.Id into j1
    

    Error details from error log:

    ERROR 2019-11-15 09:26:31,077 [56   ] Mvc.ExceptionHandling.AbpExceptionFilter - The LINQ expression 'Where<CostCenter>(
        source: DbSet<CostCenter>,
        predicate: (c) => Contains<long>(
            source: (Unhandled parameter: __ef_filter__AssociatedOuIds_2),
            value: ((IMustHaveOrganizationUnit)c).OrganizationUnitId) || (Nullable<long>)((IMustHaveOrganizationUnit)c).OrganizationUnitId == (Unhandled parameter: __ef_filter__CurrentOUId_3) == (Unhandled parameter: __ef_filter__IsOUFilterEnabled_4) && !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_5) && ((IMayHaveTenant)c).TenantId == (Unhandled parameter: __ef_filter__CurrentTenantId_6) || ((IMustHaveTenant)c).TenantId == 0 == (Unhandled parameter: __ef_filter__IsMustHaveTenantFilterEnabled_7))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
    System.InvalidOperationException: The LINQ expression 'Where<CostCenter>(
        source: DbSet<CostCenter>,
        predicate: (c) => Contains<long>(
            source: (Unhandled parameter: __ef_filter__AssociatedOuIds_2),
            value: ((IMustHaveOrganizationUnit)c).OrganizationUnitId) || (Nullable<long>)((IMustHaveOrganizationUnit)c).OrganizationUnitId == (Unhandled parameter: __ef_filter__CurrentOUId_3) == (Unhandled parameter: __ef_filter__IsOUFilterEnabled_4) && !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_5) && ((IMayHaveTenant)c).TenantId == (Unhandled parameter: __ef_filter__CurrentTenantId_6) || ((IMustHaveTenant)c).TenantId == 0 == (Unhandled parameter: __ef_filter__IsMustHaveTenantFilterEnabled_7))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
       at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& )
       at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
       at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
       at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
       at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
       at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass12_0`1.&lt;ExecuteAsync&gt;b__0()
       at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func`1 compiler)
       at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
       at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.GetAsyncEnumerator(CancellationToken cancellationToken)
       at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.GetAsyncEnumerator()
       at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
       at ioNob.h2oERP.Tes.TestsAppService.GetAll(GetAllTestsInput input) in D:\GitRepo\h2oERPZero\aspnet-core\src\ioNob.h2oERP.Application\Tes\TestsAppService.cs:line 71
       at lambda_method(Closure , Object )
       at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    

    One more thing I need to add that, we extended DbContext filter section for filtering OU and associated OU to filter data as the user should not see any data who don't have permission on particular OU, so data should be filtered based on listed OU Ids.

    protected override Expression<Func<TEntity, bool>> CreateFilterExpression<TEntity>()
            {
                var expression = base.CreateFilterExpression<TEntity>();
                expression = null;
                if (typeof(IMayHaveOrganizationUnit).IsAssignableFrom(typeof(TEntity)))
                {
                   Expression<Func<TEntity, bool>> mayHaveOUFilter = e =>
                   AssociatedOuIds.Contains((long)((IMayHaveOrganizationUnit)e).OrganizationUnitId) ||
                  (((IMayHaveOrganizationUnit)e).OrganizationUnitId == CurrentOUId) == IsOUFilterEnabled;
                    expression = expression == null ? mayHaveOUFilter : CombineExpressions(expression, mayHaveOUFilter);
                }
                if (typeof(IMustHaveOrganizationUnit).IsAssignableFrom(typeof(TEntity)))
                {
                    Expression<Func<TEntity, bool>> mayHaveOUFilter = e =>
                    AssociatedOuIds.Contains(((IMustHaveOrganizationUnit)e).OrganizationUnitId) ||
                 (((IMustHaveOrganizationUnit)e).OrganizationUnitId == CurrentOUId) == IsOUFilterEnabled;
                 expression = expression == null ? mayHaveOUFilter : CombineExpressions(expression, mayHaveOUFilter);
                }
    

    We are stuck here and quick support will be helpful to move with.

    Thank You.

  • User Avatar
    0
    mujthabagroad created

    Hello,

    Waiting for the support as we coultdn't resolve it.

    Thanks.

  • User Avatar
    0
    mujthabagroad created

    Hi,

    I generated a new view with RAD Tool to check the issue as instructed. but raising the same error in GetAll function. Getting this error while loading all CRUD views.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team

    hi @mujthabagroad Can you reproduce this problem using the Zero demo project?

    If you can, please share the code, I will download and check it out as quickly as possible. [email protected]

  • User Avatar
    0
    mujthabagroad created

    Hi @maliming Can you take remote access and check, i sent access details to your email.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team

    The network status is not good, Can you reproduce this problem using the Zero demo project?

  • User Avatar
    0
    mujthabagroad created

    Yes, the issue is there on newly downloaded app package. Steps to reproduce:

    1. Create View with RAD Tool with reference to any other table
    2. Goto menu and try to load CRUD view or Lookup in add new.

    I will share this test solution via mail as well.

  • User Avatar
    0
    mujthabagroad created

    Hi @maliming

    I shared the code, kindly check and assist us. also, I can see some DEBUG lines in thelog file which is accumulating.

    DEBUG 2019-11-19 11:55:11,425 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:16,435 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:21,453 [12   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:26,465 [22   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:31,468 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:36,480 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:41,483 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:46,500 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:51,519 [12   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:55:56,533 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:01,536 [14   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:06,553 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:11,583 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:16,583 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:21,600 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:26,604 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:31,606 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:36,609 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:41,620 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:46,624 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:51,638 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:56:56,645 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:01,658 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:06,673 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:11,681 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:16,685 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:21,690 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:26,698 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:31,700 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:36,713 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:41,716 [24   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:46,719 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:51,723 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:57:56,731 [12   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:01,738 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:06,745 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:11,749 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:16,751 [13   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:21,765 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:26,777 [12   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:31,793 [42   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:36,798 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:41,802 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:46,803 [42   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:51,806 [42   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:58:56,810 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:01,815 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:06,825 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:11,829 [40   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:16,834 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:21,840 [35   ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    DEBUG 2019-11-19 11:59:26,845 [4    ] HttpRequestEntityChangeSetReasonProvider - Unable to get URL from HttpRequest, fallback to null
    
  • User Avatar
    0
    maliming created
    Support Team

    Unable to get URL from HttpRequest, fallback to null

    see https://github.com/aspnetboilerplate/aspnetboilerplate/pull/4956

  • User Avatar
    0
    maliming created
    Support Team

    @mujthabagroad

    I can't reproduce the problem. Am I missing any steps?

  • User Avatar
    0
    mujthabagroad created

    Working fine in host login.

    Sign in to the Default tenant and check.

  • User Avatar
    0
    maliming created
    Support Team

  • User Avatar
    0
    mujthabagroad created

    Just try to add one row. displaying language data in lookup modal?. or can you take access to my PC again?. so that I can show you.

  • User Avatar
    0
    maliming created
    Support Team

    You can see the chrome Network panel in my screenshot. All requests are successful (http status code 200), There are no errors in the log.

  • User Avatar
    0
    mujthabagroad created

    My chrome raises the issue with the status of 500. did u try to search on lookup modal search bar?. Is there any libraries that need to be upgraded on my system?

  • User Avatar
    0
    maliming created
    Support Team

    hi @mujthabagroad I have successfully reproduced your problem, I will check it.

  • User Avatar
    0
    maliming created
    Support Team

    Please remove methods like ToString() and ToLower() in the entity expression.

    We will update the RAD Tool template.

  • User Avatar
    0
    mujthabagroad created

    Hi @maliming This error is not related to that I guess, error log also shows that related to client evaluation, I removed all as you instructed and tried, still have the same issue.  This is the error log.

    The LINQ expression 'OrderBy<Currency, int>(
        source: Where<Currency>(
            source: Where<Currency>(
                source: DbSet<Currency>,
                predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
            predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
        keySelector: (c) => (Unhandled parameter: __ObjectMapper_1).Map<CurrencyDto>(c).Id)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
    System.InvalidOperationException: The LINQ expression 'OrderBy<Currency, int>(
        source: Where<Currency>(
            source: Where<Currency>(
                source: DbSet<Currency>,
                predicate: (c) => !(((ISoftDelete)c).IsDeleted) || ((ISoftDelete)c).IsDeleted != (Unhandled parameter: __ef_filter__IsSoftDeleteFilterEnabled_0)),
            predicate: (c) => (Nullable<int>)c.Id != (Unhandled parameter: __ou_CurrencyId_0)),
    

    Can go through this issue, seems similar to me. https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4946

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team

    hi @mujthabagroad

    How to reproduce the above mentioned problems?

    The LINQ expression 'OrderBy<Currency, int>(...
    
  • User Avatar
    0
    mujthabagroad created

    The same steps I mentioned above. Getting this error while executing the expression. am getting this on every menu in a tenant login.

  • User Avatar
    0
    maliming created
    Support Team

    This issue is resolved remotely.

    @yunus emre kalkan Will check and update the Rad tools template.

  • User Avatar
    0
    mujthabagroad created

    Just describe what was the case, so that will be useful for others

  • User Avatar
    0
    maliming created
    Support Team

    The first is that there is a problem with the RAD Tool's template code. As I mentioned above.

    Then there is a problem with your query code. If you like, you can share some of your code.

  • User Avatar
    0
    mujthabagroad created

    Hi maliming,

    The issue still there, we checked the view which doesn't have Tenant filter and IsDeleted filter. can you check it again?. We extended dbcontext for filters and raising an error on that. it is working fine when we comment that expressions. I posted the expressions above. we had done these changes based on documentation https://aspnetboilerplate.com/Pages/Documents/Articles\How-To\add-custom-data-filter-ef-core?searchKey=custom%20filters

    Thanks.