I have a test nopcommerce store 4.20 with many plugins (120).
When I pressed the button "restart store" and after 2-3 second I open another page in the new window and try to open this test nop store I saw such error message.
I understand that nop didn't started yet.
When nop store started than I can open any page without any error messages.
The problem is in this code
widgets = widgets.Where(widget =>
widget.GetWidgetZones().Contains(widgetZone, StringComparer.InvariantCultureIgnoreCase)).ToList();
Collection was modified; enumeration operation may not execute.
Full message
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.WhereListIterator`1.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Nop.Services.Cms.WidgetPluginManager.LoadActivePlugins(Customer customer, Int32 storeId, String widgetZone)
at Nop.Web.Areas.Admin.Factories.WidgetModelFactory.PrepareRenderWidgetModels(String widgetZone, Object additionalData)
at Nop.Web.Areas.Admin.Components.AdminWidgetViewComponent.Invoke(String widgetZone, Object additionalData)
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeSyncCore(ObjectMethodExecutor executor, ViewComponentContext context)