- 1
We're getting the following error in Nop 4.20 when the scheduled task runs or when executing manually:
System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object.
at AspNetCore.Plugins_SevenSpikes_Nop_Plugins_CustomerReminders_Areas_Admin_Views_TokenTemplates_Order_ProductsWithPictures.ExecuteAsync()
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)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at SevenSpikes.Nop.Plugins.CustomerReminders.Helpers.RenderViewToString.Render(String controllerName, String viewName, Object viewData)
at SevenSpikes.Nop.Plugins.CustomerReminders.Services.CompletedOrderReminderRule.GetTokens(Customer customer, Order order, Int32 storeId, DateTime orderCompleteDate)
at SevenSpikes.Nop.Plugins.CustomerReminders.Services.CompletedOrderReminderRule.GetCustomerReminderInfos(TimeSpan conditionMetDataEarlierThan, TimeSpan conditionMetDateLaterThan, Int32 storeId, Int32 reminderId)
at SevenSpikes.Nop.Plugins.CustomerReminders.Services.RemindersProcessor.ProcessRemindersInternal()
at SevenSpikes.Nop.Plugins.CustomerReminders.Tasks.CustomerRemindersTask.Execute()
at Nop.Services.Tasks.Task.ExecuteTask() in C:\TeamCity\buildAgent\work\1344d44824dd64c5\Libraries\Nop.Services\Tasks\Task.cs:line 79
at Nop.Core.Caching.MemoryCacheManager.PerformActionWithLock(String key, TimeSpan expirationTime, Action action) in C:\TeamCity\buildAgent\work\1344d44824dd64c5\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 107
at Nop.Services.Tasks.Task.Execute(Boolean throwException, Boolean ensureRunOncePerPeriod) in C:\TeamCity\buildAgent\work\1344d44824dd64c5\Libraries\Nop.Services\Tasks\Task.cs:line 143
at Nop.Web.Areas.Admin.Controllers.ScheduleTaskController.RunNow(Int32 id) in C:\TeamCity\buildAgent\work\1344d44824dd64c5\Presentation\Nop.Web\Areas\Admin\Controllers\ScheduleTaskController.cs:line 117
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
at AspNetCore.Plugins_SevenSpikes_Nop_Plugins_CustomerReminders_Areas_Admin_Views_TokenTemplates_Order_ProductsWithPictures.ExecuteAsync()
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)<---