Hi guys,
I randomly get the following error about 1 out of every 200-300 requests either in the administration or in the public page:
System.ArgumentException: The route "/css/PluginList.styles.admin.css" was already specified (Parameter 'route')
at WebOptimizer.AssetPipeline.AddBundle(String route, String contentType, String[] sourceFiles)
at WebOptimizer.TagHelpersDynamic.Helpers.AddBundleByKey(IAssetPipeline pipeline, String route, String contentType)
at WebOptimizer.TagHelpersDynamic.Helpers.CreateCssAsset(IAssetPipeline pipeline, String key)
at WebOptimizer.TagHelpersDynamic.Helpers.GetOrCreateAssetByKey(IAssetPipeline pipeline, String key, Func`3 createAsset)
at WebOptimizer.TagHelpersDynamic.Helpers.HandleBundle(Func`3 createAsset, IAssetPipeline pipeline, TagHelperOutput output, ActionContext actionContext, WebOptimizerOptions options, String attrName, String attrValue, String bundleKey, String destBundleKey)
at WebOptimizer.Extensions.TagHelperExtensions.HandleCssBundle(TagHelperOutput output, IAssetPipeline pipeline, ActionContext actionContext, WebOptimizerOptions options, String href, String bundleKey, String destBundleKey)
at Nop.Web.Framework.TagHelpers.Shared.NopLinkTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output) in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web.Framework\TagHelpers\Shared\NopLinkTagHelper.cs:line 135
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
at AspNetCore._Areas_Admin_Views_Shared__AdminScripts.ExecuteAsync() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminScripts.cshtml:line 15
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.HtmlHelper.RenderPartialCoreAsync(String partialViewName, Object model, ViewDataDictionary viewData, TextWriter writer)
at AspNetCore._Areas_Admin_Views_Shared_AdminLayout.<>c_DisplayClass30_0.<<ExecuteAsync>b__0>d.MoveNext() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminLayout.cshtml:line 46
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
at AspNetCore._Areas_Admin_Views_Shared__AdminLayout.ExecuteAsync() in C:\dev\Nop-Templates\nopCommerce_4.5\Presentation\Nop.Web\Areas\Admin\Views\Shared\_AdminLayout.cshtml:line 37
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)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore\MiniProfilerMiddleware.cs:line 103
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Nop.Services.Installation.InstallUrlMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in C:\dev\Nop-Templates\nopCommerce_4.5\Libraries\Nop.Services\Installation\InstallUrlMiddleware.cs:line 52
at Nop.Services.Common.KeepAliveMiddleware.InvokeAsync(HttpContext context, IWebHelper webHelper) in C:\dev\Nop-Templates\nopCommerce_4.5\Libraries\Nop.Services\Common\KeepAliveMiddleware.cs:line 49
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
I would like to note that this error is not specific to the /css/PluginList.styles.admin.css file but appears with other css files. Only css files generate this error. It doesn't seem to have any affiliation to any plugin but rather be a core nopCommerce issue.
What could be the issue here?
Regards,
Anton