Activities of "jackmcelhinney"

Answer

ABP Framework Version: v4.4.4 UI Type: Angular DB provider: EF Core Identity Server Separated: No

After upgrading to 4.4.4, my existing project and new projects with no changes both log a ExpressionChangedAfterItHasBeenCheckedError error to the console on app component load.

To reproduce:

  1. Create new project from ABP suite
  2. Run the initial migration
  3. Start the application
  4. Open browser developer console
Answer

Follow-up on my issue posted above:

Steps to reproduce:

  • Create new project through the suite
    • Version: 4.3.3
    • UI type: Angular
    • Identity Server Seperated: No
  • Run db-migrator in API, yarn in Angular project
  • Start UI and API

  • Open localhost:4200 in Incognito
  • Clear cookies, local storage, and empty cache and hard reload
  • Click Login
  • A seemingly random error will log and the css of the login page may or not be missing. The error is usually an issue getting something from the libs folder or styles for the theme.
  • Below are some of the errors I have seen while testing this:

My concern is that because it involves the cache, storage, or cookies, this error will only appear for new users coming to the site. Please let me know if you are able to reproduce this.

Thanks!

Answer

Hello. I am having a strange issue after updating from 4.2.2 to 4.3.2. When running the app locally, if I open it in a fresh browser like Chrome Incognito, I get the following console errors.

When logging out:

After navigating back to the login page:

This may be difficult to reproduce as I have been unable to do so in the demo app or a fresh project, but has anyone else experienced this or have any suggestions for what might be causing it? I followed the migration guide closely and used WinMerge to update all other changes.

Details:

  • Angular UI
  • Authorization Code Flow

One other small bug that I noticed was that this dropdown now appears over the button to open it rather than below it:

Answer

Hello! Two small bugs to report:

  1. With Angular UI, the Administration sidebar menu closes after selecting an element. For example, starting from the Home page, click Administration->Identity Management->Roles. It navigates to the Roles page but the Administration menu collapses. Not sure if this was introduced in 4.1 or 4.2 as we upgraded from 4.0 to 4.2.

  2. The lockout message in English could use a few fixes. Please notice the bold and strike-through below.


Your account has been locked by the admin or due to invalid login attempts. Please try again later. Contact ~~to~~ your system administrator if you think this is a mistake.


As always, thanks for the help!

Edit:

Here are two more:

  1. With Angular UI, when signed in with an account that does not have any administration permissions, the administration menu button briefly shows when clicking other menu items. This happens frequently but seemingly randomly.
  2. The cancel button on the login page does not properly return to the unauthenticated app when using Angular UI. It seems to redirect to http://localhost:4200/?error=access_denied and throws this error in the console:

core.js:4197 ERROR OAuthErrorEvent {type: "code_error", reason: {…}, params: {…}}

You need to replace it in the Host project like so:

More information here: https://support.abp.io/QA/Questions/446/How-do-I-customize-login-pages-for-Angular-when-using-new-Authorization-Work-Flow-in-version-31#answer-38188880-0159-b68b-a717-39f7ea546c59

Hope this helps.

Answer

Hello! Two small bugs to report (Angular UI ABP v4.0.2).

  1. The My security logs page is missing a Return to Application link like the Manage your profile page has. So there is no way to return without using the browser back button.
  2. When editing permissions for a role or user, "Identity Management" is misspelled as "Idetity"

Answer

Hi @alper. I mentioned on my original comment that using the built in repository methods like GetAsync(id) are working properly for me as well. The error is only thrown when querying the repository with a LINQ operator like Where(). While my example code for reproducing the issue could be replaced with GetAsync(id), our actual code where we are disabling the UOW has much more complicated queries that cannot be replaced with the repository method. These queries were working before upgrading to 4.0.2 and no other changes have been made.

To reproduce the issue, please try replacing the line in WorkItemAppService.cs with this:

return ObjectMapper.Map<WorkItem, WorkItemDto>(await _workItemRepository.Where(w => w.Id == id).FirstOrDefaultAsync());

Thank you for your help trying to sort this out.

Answer

@alper I should have clarifed. I made both of these changes based on the code you suggested. It produces the same error.

Answer

Thanks @alper. Unfortunately, the same error is still thrown after using FirstOrDefaultAsync(). Let me know if you have any other ideas I could try.

Answer

Having an issue with using [UnitOfWork(IsDisabled = true)] after upgrading to v4.0.2. In an application service method with the unit of work disabled, querying a repository like _repository.Where(x => x.Id == id) throws a 500 error with the following message:

2020-12-22 17:01:26.918 -05:00 [ERR] Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'WebPlatformDbContext'.
System.ObjectDisposedException: Cannot access a disposed context instance. A common cause of this error is disposing a context instance that was resolved from dependency injection and then later trying to use the same context instance elsewhere in your application. This may occur if you are calling 'Dispose' on the context instance, or wrapping it in a using statement. If you are using dependency injection, you should let the dependency injection container take care of disposing context instances.
Object name: 'WebPlatformDbContext'.
   at Microsoft.EntityFrameworkCore.DbContext.CheckDisposed()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_ChangeTracker()
   at Microsoft.EntityFrameworkCore.Query.CompiledQueryCacheKeyGenerator.GenerateCacheKeyCore(Expression query, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.RelationalCompiledQueryCacheKeyGenerator.GenerateCacheKeyCore(Expression query, Boolean async)
   at Microsoft.EntityFrameworkCore.SqlServer.Query.Internal.SqlServerCompiledQueryCacheKeyGenerator.GenerateCacheKey(Expression query, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
   at Company.WebPlatform.WorkItems.WorkItemAppService.ExampleGetAsync(Guid id) in C:\Users\Jack\source\repos\WebPlatform\aspnet-core\src\Company.WebPlatform.Application\WorkItems\WorkItemAppService.cs:line 112
   ...
   ...
   ...
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---

To reproduce, query a repository in a method with unit of work disabled like so:

Controller:

[UnitOfWork(IsDisabled = true)]
[HttpGet]
[Route("test/{id}")]
public virtual Task&lt;WorkItemDto&gt; ExampleGetAsync(Guid id)
{
    return _workItemAppService.ExampleGetAsync(id);
}

AppService:

[UnitOfWork(IsDisabled = true)]
[AllowAnonymous]
public virtual async Task&lt;WorkItemDto&gt; ExampleGetAsync(Guid id)
{
    var test = _workItemRepository.Where(w => w.Id == id).FirstOrDefault(); //&lt;&lt;-- Error thrown here

    return ObjectMapper.Map&lt;WorkItem, WorkItemDto&gt;(test);
}

Execute the route from swagger and notice the error when the uow is disabled. It's worth noting the built in methods like _repository.GetAsync() still work.

Thanks for the help!

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