- ABP Framework version: v8.0.0
- UI Type: Blazor Server
- Database System: EF Core (SQL Server)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace: An unhandled exception has occurred while executing the request. Volo.Abp.AbpException: Could not find file '/_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js'
- Steps to reproduce the issue:
We are trying to deploy our application on Azure, the build was succeeded and the application was able to start up. But it shows a 500 internal server server and blocking the log in UI after the application starts.
The Runtime error exception is below:
2024-09-05 19:45:25.561 +00:00 [ERR] An unhandled exception has occurred while executing the request.
Volo.Abp.AbpException: Could not find file '/_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js'
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetFileInfo(IBundlerContext context, String file)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetAndMinifyFileContent(IBundlerContext context, String fileName)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.GetFileContentConsideringMinification(IBundlerContext context, String fileName)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.AddFileToBundle(IBundlerContext context, StringBuilder bundleContentBuilder, String fileName)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundlerBase.Bundle(IBundlerContext context)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.<>c__DisplayClass17_0.<AddToBundleCache>b__0()
at System.Collections.Generic.AbpDictionaryExtensions.<>c__DisplayClass7_02.<GetOrAdd>b__0(TKey k) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd(TKey key, Func2 valueFactory) at System.Collections.Generic.AbpDictionaryExtensions.GetOrAdd[TKey,TValue](ConcurrentDictionary
2 dictionary, TKey key, Func1 factory) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleCache.GetOrAdd(String bundleName, Func
1 factory)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.AddToBundleCache(String bundleName, IBundler bundler, List1 bundleFiles) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.GetBundleFilesAsync(BundleConfigurationCollection bundles, String bundleName, IBundler bundler) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.BundleManager.GetScriptBundleFilesAsync(String bundleName) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperScriptService.GetBundleFilesAsync(String bundleName) at Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpTagHelperResourceService.ProcessAsync(ViewContext viewContext, TagHelper tagHelper, TagHelperContext context, TagHelperOutput output, List
1 bundleItems, String bundleName)
at Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers.AbpBundleTagHelperService2.ProcessAsync(TagHelperContext context, TagHelperOutput output) at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, Int32 i, Int32 count) at AboveGoal.Blazor.Pages.Pages__Host.<ExecuteAsync>b__18_1() at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync() at AboveGoal.Blazor.Pages.Pages__Host.ExecuteAsync() in /home/vsts/work/1/s/src/AboveGoal.Blazor/Pages/_Host.cshtml:line 9 at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts) at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context) at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable
1 statusCode)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
After investigation, It seems like it can not find three files at the following path: "/_content/Volo.Saas.Host.Blazor/libs/chart/chart.min.js /_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js /_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/authority-delegation.js
and we replace the Account Module with the source code.
After commenting out the lines in AbpAccountBlazorBundleContributor, we were able to get away from this issue. public override void ConfigureBundle(BundleConfigurationContext context) { //context.Files.AddIfNotContains("/_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js"); if (context.ServiceProvider.GetRequiredService<IOptions
13 Answer(s)
-
0
hi
You are right. We have removed them in the new version.
I have refunded your ticket.
Sorry for that.
-
0
Hi, after some testing, we figure out that we are not able to access to these two pages after commenting out those two lines
so these two files are sitting under here(this is my local env and i don't know how they are being generated)
I am pretty sure these files are generated by abp install-libs command right? but we are not able to run it in the Account.Pro project
-
0
If you say they are removed in the newer version, does that mean these two pages are no longer available? Do you think we should upgrade our project abp version again?
-
0
hi
I will confirm this again.
-
0
-
0
-
0
hi
You can keep it.
You should run the
abp install-libs
command to restore libs. This is the default setting of an abp template project. -
0
The thing is that the files are not able to be generated even though we already ran this command(both locally and on the pipeline). Let's say we run this command in our root folder, can it detect the module itself and install the corresponding library for them as well? If not where should we run the command for the modules? Any suggestion?
-
0
This command generates the file from
node_modules.
https://abp.io/docs/latest/CLI#install-libs
But these files are from the package. you don't need to run
install-libs
for them./_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js /_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/authority-delegation.js
which mean you can reach it with below link https://localhiost:1234/_content/Volo.Abp.Account.Pro.Public.Blazor.Shared/libs/account/link-user.js
-
0
Yes indeed I am able to reach it with a get request locally, that is because i do have the files under the wwwroot folder which it is referencing to? In this case, I guess the solution is to commit these files into our repository
-
0
ok, You can commit these to your repos.
but you can still access it if it isn't in the
wwwroot folder
folder. -
0
-
0
Can you share a project to reproduce this?
liming.ma@volosoft.com
Thanks