Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
- Template: app
- Created ABP Studio Version: 1.0.2
- Current ABP Studio Version: 1.0.2
- Tiered: Yes
- Multi-Tenancy: Yes
- UI Framework: blazor-server
- Theme: leptonx
- Theme Style: system
- Theme Menu Placement: side
- Run Install Libs: Yes
- Database Provider: ef
- Database Management System: sqlserver
- Separate Tenant Schema: Yes
- Create Initial Migration: Yes
- Run Db Migrator: Yes
- Mobile Framework: maui
- Public Website: Yes
- Social Login: Yes
- Include Tests: Yes
- Kubernetes Configuration: No
- Distributed Event Bus: rabbitmq
- Use Local References: No
- Optional Modules:
- GDPR
- FileManagement
- TextTemplateManagement
- LanguageManagement
- AuditLogging
- Chat
- OpenIddictAdmin
- Selected Languages: English, English (United Kingdom), 简体中文, Español, العربية, हिन्दी, Português (Brasil), Français, Русский, Deutsch (Deuthschland), Türkçe, Italiano, Čeština, Magyar, Română (România), Svenska, Suomi, Slovenčina, Íslenska, 繁體中文
- Default Language: English
- Create Command: abp new NewApp -t app --tiered --ui-framework blazor-server --mobile maui --database-provider ef --database-management-system sqlserver --theme leptonx --separate-tenant-schema --public-website --without-cms-kit --dont-run-bundling -chat -file-management
- Exception message and full stack trace:
[19:43:19 INF] Request starting HTTP/2 GET [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js) \- null null
[19:43:19 INF] The access\_token is active.
[19:43:19 DBG] Get dynamic claims cache for user: e69f975f-0a44-9f37-92d2-3a1b2258a050
[19:43:19 INF] Request finished HTTP/2 GET [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js) \- 404 0 null 28\.306ms
[19:43:19 INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: GET [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js), Response status code: 404
[19:43:20 INF] Start processing HTTP request GET [https://localhost:44354/api/abp/api-definition](https://localhost:44354/api/abp/api-definition)
[19:43:20 INF] Sending HTTP request GET [https://localhost:44354/api/abp/api-definition](https://localhost:44354/api/abp/api-definition)
[19:43:20 WRN] Unhandled exception rendering component: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
TypeError: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
TypeError: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
at Microsoft\.JSInterop\.JSRuntime\.InvokeAsync\[TValue\]\(Int64 targetInstanceId\, String identifier\, Object\[\] args\)
at Catalog.Blazor.Pages.Catalog.Products.OnAfterRenderAsync(Boolean firstRender) in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 92
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[19:43:20 ERR] Unhandled exception in circuit 'pD6-ssltpTDcMHVVm\_-6EDmBcqO\_PHTwGURVr-GBUOw'.
Microsoft.JSInterop.JSException: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
TypeError: Failed to fetch dynamically imported module: [https://localhost:44312/Pages/Products.razor.js](https://localhost:44312/Pages/Products.razor.js)
at Microsoft\.JSInterop\.JSRuntime\.InvokeAsync\[TValue\]\(Int64 targetInstanceId\, String identifier\, Object\[\] args\)
at Catalog.Blazor.Pages.Catalog.Products.OnAfterRenderAsync(Boolean firstRender) in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 92
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
[19:43:20 INF] Executed endpoint 'Microsoft.AspNetCore.Routing.RouteEndpoint'
[19:43:20 INF] Request finished HTTP/2 CONNECT [https://localhost:44312/\_blazor?id=Q970FyOnqG6UQyr7VOT6vw](https://localhost:44312/_blazor?id=Q970FyOnqG6UQyr7VOT6vw) \- 200 null null 3553\.1341ms
[19:43:20 INF] Executed endpoint '/signalr-hubs/chat'
[19:43:20 INF] Executed endpoint '/signalr-hubs/chat'
[19:43:20 INF] Request finished HTTP/1.1 GET [https://localhost:44312/signalr-hubs/chat?id=D7GtX4N-i8j3TvV\_Jj2hBw](https://localhost:44312/signalr-hubs/chat?id=D7GtX4N-i8j3TvV_Jj2hBw) \- 101 null null 3416\.3706ms
[19:43:20 INF] Request finished HTTP/1.1 GET [https://localhost:44312/signalr-hubs/chat?id=kQqIwGkbkj0dsYVajWGLKA](https://localhost:44312/signalr-hubs/chat?id=kQqIwGkbkj0dsYVajWGLKA) \- 101 null null 3416\.2868ms
[19:43:20 INF] Connection id "0HNE3U3HKH7SD", Request id "0HNE3U3HKH7SD:00000035": the application completed without reading the entire request body.
[19:43:20 INF] Received HTTP response headers after 180.5206ms - 200
[19:43:20 INF] End processing HTTP request after 180.8364ms - 200
[19:43:20 WRN] Unhandled exception rendering component: 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.
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 System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue() at Volo.Abp.DependencyInjection.CachedServiceProviderBase.GetService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Volo.Abp.DependencyInjection.AbpLazyServiceProvider.LazyGetRequiredService[T]() at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.get\_ClientOptions()
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1\.RequestAsync\[T\]\(ClientProxyRequestContext requestContext\)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy`1.CallRequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1\.CallRequestAsync\[T\]\(ClientProxyRequestContext context\)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle\.DynamicProxy\.AsyncInterceptorBase\.ProceedAsynchronous\[TResult\]\(IInvocation invocation\, IInvocationProceedInfo proceedInfo\)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Catalog.Blazor.Pages.Catalog.Products.GetProductsAsync() in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 135 at Catalog.Blazor.Pages.Catalog.Products.OnDataGridReadAsync(DataGridReadDataEventArgs`1 e) in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 169
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Blazorise.DataGrid.DataGrid`1.HandleReadData(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid`1.HandleReadData(CancellationToken cancellationToken)
at Blazorise.DataGrid.DataGrid`1.ReloadInternal(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid`1.Reload(CancellationToken cancellationToken)
at Blazorise.DataGrid.DataGrid`1.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState) [19:43:20 ERR] Unhandled exception in circuit 'pD6-ssltpTDcMHVVm_-6EDmBcqO_PHTwGURVr-GBUOw'. 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 System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy`1.CreateValue()
at Volo.Abp.DependencyInjection.CachedServiceProviderBase.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
at Volo.Abp.DependencyInjection.AbpLazyServiceProvider.LazyGetRequiredService[T]()
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.get_ClientOptions() at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync(ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase`1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptorClientProxy`1\.CallRequestAsync\[T\]\(ClientProxyRequestContext requestContext\)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.CallRequestAsync[T](ClientProxyRequestContext context) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.GetResultAsync(Task task, Type resultType)
at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor`1.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Catalog.Blazor.Pages.Catalog.Products.GetProductsAsync() in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 135
at Catalog.Blazor.Pages.Catalog.Products.OnDataGridReadAsync(DataGridReadDataEventArgs`1 e) in C:\Dev\NewApp\Modules\catalog\src\Catalog.Blazor\Pages\Catalog\Products.razor.cs:line 169 at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Blazorise.DataGrid.DataGrid`1.HandleReadData(CancellationToken cancellationToken)
at Blazorise.DataGrid.DataGrid`1.HandleReadData(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid`1.ReloadInternal(CancellationToken cancellationToken)
at Blazorise.DataGrid.DataGrid`1.Reload(CancellationToken cancellationToken) at Blazorise.DataGrid.DataGrid`1.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
- Steps to reproduce the issue: Create a new solution using ABP Studio as ABP version 9.2.1, followed to create a new Entity using ABP Suite 9.2.0. Create an Entity Property named Image defining it as File. The application hangs.
This following picutures were provided as sample to reproduce the error, the entire application was created using ABP Studio and ABP Suite.
Create a new module named "Catalog" as the picture below:
Follow the importing procedures as ABP documentation:
Create a new Entity Property as File Property Type
Run the application using ABP Studio, but the Blazor Server runs as Terminal to track the error.
After creating the new field named Image as File type, the application hangs as the picture below:
The requested file "Products.razor.js" exists on the Blazor subfolder but the application can't find it.
It seems to have a fail on the ABP Suite template that is creating faulty application.
5 Answer(s)
-
0
This is a known issue in ABP Suite/Blazor Server projects when adding a "File" property to an entity, especially in modular or tiered solutions. The generated
.razor.js
file (e.g.,Products.razor.js
) is created in the module's Blazor project, but during development, it is not served correctly, resulting in 404 errors and the Blazor UI freezing or failing to load the file input.This problem has been reproduced and acknowledged by the ABP team. The root cause is that static web assets from module projects are not always correctly discovered and served in development mode, especially for dynamically imported JS files generated by Suite for file properties.
Current Status:
- The ABP team has fixed this issue, and the fix will be included in an upcoming patch release.
- No manual workaround is required; after updating to the fixed version, the problem will be resolved.
Reference:
- Official support thread: https://abp.io/support/questions/7478
What to do now:
- Wait for the next patch release of ABP Suite/Framework and update your solution when it becomes available.
- If you need a temporary workaround, you can manually copy the generated
.razor.js
file to the main Blazor project'swwwroot
or ensure it is included as a static asset, but this is only a stopgap until the official fix is released.
Sources:
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.
-
0
-
0
[chrisalves] said: Hi Support Team,
The A.I. answer above provided a reference to a similar situation but it is an 1 year more ticket on a older ABP version as below
Please provide an workaround to apply on my project as it is a BUG unfixed yet to help me move forward with this development.
Hi, please ignore the bot's response. I've identified the problem, and here is a quick workaround for you:
- Open your
Products.razor.cs
file and update the file path:
- _jsObjectRef = await JsRuntime.InvokeAsync<IJSObjectReference>("import", "/Pages/Products.razor.js"); + _jsObjectRef = await JsRuntime.InvokeAsync<IJSObjectReference>("import", "/js/file-cleanup.js");
- Then, open your main application, create a /js/file-cleanup.js file under the wwwroot folder with the content:
export class FileCleanup { static clearInputFiles() { var fileInputs = document.querySelectorAll("input[type='file'].file-input"); for (var i = 0; i < fileInputs.length; i++) { fileInputs[i].value = null; } } } window.FileCleanup = FileCleanup;
Then, it should work as expected. I'll create an internal issue to fix this problem, but you can go with the current workaround.
Regards.
- Open your
-
0
Hi EngincanV,
Thanks so much for your prompt response—the workaround worked perfectly. The ABP team truly are experts!
To streamline development, I’m keeping customizations to a minimum and relying on built-in features whenever possible.
Could you please confirm the version in which this fix will be included, and proceed with refunding the credit for this support ticket?
Appreciate your help, and hope you have a great day!
-
0
Could you please confirm the version in which this fix will be included, and proceed with refunding the credit for this support ticket?
Hi @chrisalves, thank you for your kind words and for bringing this to our attention. I’ve created an issue for this and set its milestone to
9.3-final
, which means we’ll aim to address it in the upcoming patch release.I’ve also refunded your credit just now. Thanks again for reporting the problem.
Regards.