Open Closed

System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed. #6486


User avatar
0
lan.dang created
  • ABP Framework version: v8.0.0
  • UI Type:Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

There are many of error log like this in logs.txt 2024-01-11 09:46:12.929 +07:00 [ERR] Unhandled exception in circuit '7TC-tNTGZqNY1UQMYjHoy1L57wA5BGODJGEihaxAoJE'. System.ObjectDisposedException: Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed. at Autofac.Core.Lifetime.LifetimeScope.ThrowDisposedException() at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.CreateScope(IServiceProvider provider) at Volo.Abp.SimpleStateChecking.SimpleStateCheckerManager1.IsEnabledAsync(TState[] states) at Volo.Abp.UI.Navigation.MenuManager.CheckPermissionsAsync(IServiceProvider serviceProvider, IHasMenuItems menuWithItems) at Volo.Abp.UI.Navigation.MenuManager.GetInternalAsync(String name) at Volo.Abp.UI.Navigation.MenuManager.GetAsync(String[] menuNames) at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Navigation.MainMenuProvider.GetMenuAsync() at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileNavbar.SetMenuAndProfileAsync() at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu.Navigation.MobileNavbar.OnInitializedAsync() at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync() at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) how can I fix this error? Thanks


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Does this affect your UI? Or is it just in the logs?

  • User Avatar
    0
    lan.dang created

    It is just in logs file, actually it does not give error in UI but I hope they are not there so I easy to find out other error

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I have refunded your question credits. If there is a UI problem I will deep-check it.

    Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    It may have many reasons. If you can reproduce it using a template project, please share the steps. Thank you.

  • User Avatar
    0
    torronea created

    Lan will continue with this topic, but sidenote for the purpose: we need to monitor log files for errors because most SaaS users do not report errors they encounter. For example, some may take the free trial, encounter a problem and abandon the app without reporting. Our testing might not find the error because the user may have some unconventional use cases. So, we should monitor all logs to find out unreported exceptions and errors.

    Currently, we have a few types of regular errors in log files after version upgrade that might or might not immediately affect the UI but make monitoring difficult unless we fix the cause, or at least can find why it never matters.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks torronea

    If there are any other errors, please feel free to give feedback.

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