nopCommerce icon indicating copy to clipboard operation
nopCommerce copied to clipboard

WebOptimizer. Correct work with async collection

Open exileDev opened this issue 1 year ago • 1 comments

nopCommerce version:

Steps to reproduce the problem:

The issue appears to be in the css bundle. Server was restarting by ops and that fixed the issue. CSS files: "/lib_npm/jquery-ui-dist/jquery-ui.min.css" "/Themes/DefaultClean/Content/css/fontawesome.css" "/Themes/DefaultClean/Content/css/bootstrap-grid.css" "/Themes/DefaultClean/Content/css/styles.css" View "/lib_npm/magnific-popup/magnific-popup.css"

System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
   at System.Collections.Generic.HashSet`1.AddIfNotPresent(T value, Int32& location)
   at WebOptimizer.Asset.TryAddSourceFile(String route)
   at Nop.Web.Framework.UI.NopHtmlHelper.GetOrCreateBundle(String bundlePath, Func`3 createAsset, String[] sourceFiles) in /home/vsts/work/1/s/src/Presentation/Nop.Web.Framework/UI/NopHtmlHelper.cs:line 124
   at Nop.Web.Framework.UI.NopHtmlHelper.GenerateCssFiles() in /home/vsts/work/1/s/src/Presentation/Nop.Web.Framework/UI/NopHtmlHelper.cs:line 534
   at AspNetCore._Views_Shared__Root_Head.<>c__DisplayClass10_0.<<ExecuteAsync>b__0>d.MoveNext() in C:\inetpub\wwwroot\Views\Shared\_Root.Head.cshtml:line 69
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
   at AspNetCore._Views_Shared__Root_Head.ExecuteAsync() in C:\inetpub\wwwroot\Views\Shared\_Root.Head.cshtml:line 44
   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.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)
   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)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewResultExecutor.ExecuteAsync(ActionContext context, ViewResult result)
   at Microsoft.AspNetCore.Mvc.ViewResult.ExecuteResultAsync(ActionContext context)

Source: https://www.nopcommerce.com/en/boards/topic/94740/invalidoperationexception-bundle-on-product-page

exileDev avatar Aug 10 '22 13:08 exileDev

We're waiting for the solution to https://github.com/ligershark/WebOptimizer/issues/244

exileDev avatar Aug 11 '22 10:08 exileDev

Closed #6333. I think it might help

exileDev avatar Nov 07 '22 10:11 exileDev