Open Closed

Error when refreshing page #10017


User avatar
0
maggieryanmail@gmail.com created

Hello,

I recently updated my project to 9.3.1. Everything seems to work fine, until I refresh a page, and then it crashes and I get the following error. It happens on every page. Do you know what the issue could be?

Thank you.

[07:55:24 INF] Request starting HTTP/2 POST https://localhost:31753/_blazor/disconnect - multipart/form-data; boundary=----WebKitFormBoundaryHX3a7psAmKrOgsSj 359 Unhandled exception. 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 Blazorise.ComponentActivator.CreateInstance(Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame[] frames, Int32 frameIndex, Int32 parentComponentId) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForFramesWithSameSequence(DiffContext& diffContext, Int32 oldFrameIndex, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.HandleException(Exception exception) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessPendingRender() at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged() at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<InvokeAsync>g__Execute|8_0(ValueTuple`3 state) --- End of stack trace from previous location --- at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.Common.Breadcrumbs.IynFghwTvG(Object s, PropertyChangedEventArgs ) at System.Threading.Tasks.Task.<>c.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

4 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • The error you are encountering (System.ObjectDisposedException related to Autofac and Blazorise) after upgrading to ABP 9.3.1 with Blazor Server is typically caused by a mismatch or incompatibility between the Blazorise package versions and the ABP/Blazor project dependencies. This is especially common after major upgrades.

    To resolve this issue, follow these steps:

    1. Update Blazorise Packages
      Ensure that all Blazorise-related NuGet packages in your solution are updated to the latest versions compatible with .NET 8/9 and ABP 9.x. You can do this via NuGet Package Manager or by editing your .csproj files.

    2. Clean and Rebuild

      • Delete the bin and obj folders in all projects.
      • Rebuild the solution to clear any cached assemblies.
    3. Check for Duplicate Registrations

      • Make sure you are not registering Blazorise services (e.g., AddBootstrap5Providers, AddFontAwesomeIcons) in both your Blazor and Host projects. Shared registrations should be in a shared module or only in the host for Blazor Server.
    4. Update ABP and Run Bundle

      • Run abp update in your solution root to update all ABP-related packages.
      • Run abp bundle to update static assets.
    5. Review Dependency Injection Configuration

      • Ensure that your DI registrations for Blazorise and other UI components are correct and not duplicated or missing.
    6. Restart Development Environment

      • Sometimes, Visual Studio or your IDE may cache old assemblies. Restart your IDE after the above steps.

    If the problem persists, try creating a new ABP Blazor Server solution with the same version and compare the package versions and startup configuration.

    Sources:

    • https://abp.io/community/articles/2v8590g3
    • https://abp.io/docs/latest/release-info/migration-guides/pro/blazorui-3-3

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a minimal project to show the problem?

    Or you can test with 9.3.x template project.

    Thanks

    liming.ma@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maggieryanmail@gmail.com created

    Thanks - I discovered the solution was moving the functions previously in OnInitializedAsync() to OnAfterRenderAsync(bool firstRender).

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks. 👍

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 16, 2026, 14:50
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.