Starts in:
1 DAY
19 HRS
24 MIN
0 SEC
Starts in:
1 D
19 H
24 M
0 S
Open Closed

System.ObjectDisposedException when clicking on Account in the Administration section (LeptonX) #3844


User avatar
0
alin.andersen created

Hey,

we migrated to .NET 6.0.0, OpenIddict and LeptonX.

When we navigate to the following page and press on Account we get and ObjectDisposedException.

All the other items in the list works as expected, except for Account.

  • ABP Framework version: v6.0.0
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC)
  • Exception message and stack trace:
[15:22:21 INF] End processing HTTP request after 2187.5794ms - 200
[15:22:21 WRN] Unhandled exception rendering component: Cannot access a disposed object.
Object name: 'EmailSettingGroupViewComponent'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'EmailSettingGroupViewComponent'.
   at Microsoft.AspNetCore.Components.OwningComponentBase.get_ScopedServices()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.LazyGetRequiredService[TRef](Type serviceType, TRef& reference)
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.LazyGetRequiredService[TService](TService& reference)
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.get_LoggerFactory()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.<get__lazyLogger>b__13_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.get_Logger()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.HandleErrorAsync(Exception exception)
   at Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSettingGroup.EmailSettingGroupViewComponent.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[15:22:21 ERR] Unhandled exception in circuit 'RYycSdzOZ4UKtDrv9-8tLdOcVwyK4AvSiP-oRuJzscw'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'EmailSettingGroupViewComponent'.
   at Microsoft.AspNetCore.Components.OwningComponentBase.get_ScopedServices()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.LazyGetRequiredService[TRef](Type serviceType, TRef& reference)
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.LazyGetRequiredService[TService](TService& reference)
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.get_LoggerFactory()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.<get__lazyLogger>b__13_0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.get_Logger()
   at Volo.Abp.AspNetCore.Components.AbpComponentBase.HandleErrorAsync(Exception exception)
   at Volo.Abp.SettingManagement.Blazor.Pages.SettingManagement.EmailSettingGroup.EmailSettingGroupViewComponent.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Thanks!


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce the problem, could you share a project that can reproduce it with me? thanks. shiwei.liang@volosoft.com

  • User Avatar
    0
    alin.andersen created

    I found out that the exception is not thrown all the time. Only sometimes.

    Try to logout. Then login and immediately go to the account page. Then I get the ObjectDisposedException exception every time.

    It seems the page is loading something from the database (because the site is empty for 1 to 2 seconds). And maybe when the data is not retrieved fast enough the exception occurs.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi Sorry for late I will check it out

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, I still could not reproduce the problem.

    Could you share a project that can reproduce it with me? thanks. shiwei.liang@volosoft.com

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06