Try our conversational search powered by Generative AI!

Remove Expired Carts scheduled job is failing

Vote:
 

When running the Remove Expired Carts sheduled job that you get OOB with EPiServer CMS i'm getting the following error in the logs.  I'm running on my local development box so i have the .pdb's in the bin.

CMS Version:  11.8

Commerce: 12.2



2018-12-07 10:30:39,653 [135] ERROR EPiServer.DataAbstraction.ScheduledJob: Job EPiServer.Business.Commerce.ScheduledJobs.RemovedExpiredCartsJob failed for the job 'Remove Expired Carts' with jobId ='c7bfa31f-c7e2-4407-823d-dd7ba1381bef'

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
     at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
     at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
     at System.String.Format(IFormatProvider provider, String format, Object[] args)
     at EPiServer.Business.Commerce.ScheduledJobs.RemovedExpiredCartsJob.RemoveExpired(Int32 daysOld, String excludedCartName) in E:\BuildAgent\work\d8206f92e5515c89\EPiServer.Business.Commerce\ScheduledJobs\RemovedExpiredCartsJob.cs:line 119
     at EPiServer.Business.Commerce.ScheduledJobs.RemovedExpiredCartsJob.Execute() in E:\BuildAgent\work\d8206f92e5515c89\EPiServer.Business.Commerce\ScheduledJobs\RemovedExpiredCartsJob.cs:line 71
     at EPiServer.Scheduler.Internal.DefaultScheduledJobExecutor.<Execute>d__31.MoveNext()

System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
     at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
     at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
     at System.String.Format(IFormatProvider provider, String format, Object[] args)
     at EPiServer.Business.Commerce.ScheduledJobs.RemovedExpiredCartsJob.RemoveExpired(Int32 daysOld, String excludedCartName) in E:\BuildAgent\work\d8206f92e5515c89\EPiServer.Business.Commerce\ScheduledJobs\RemovedExpiredCartsJob.cs:line 119
     at EPiServer.Business.Commerce.ScheduledJobs.RemovedExpiredCartsJob.Execute() in E:\BuildAgent\work\d8206f92e5515c89\EPiServer.Business.Commerce\ScheduledJobs\RemovedExpiredCartsJob.cs:line 71
     at EPiServer.Scheduler.Internal.DefaultScheduledJobExecutor.<Execute>d__31.MoveNext()

#199731
Dec 07, 2018 16:51
Vote:
 

The offending line looks like this

_log.Information(String.Format(CultureInfo.CurrentCulture, _localizationService.Service.GetString("/Commerce/scheduledjobs/removedexpiredcartsjob/startjob")));

It works well for builtin translations, so I would suspect that your site has CultureInfo.CurrentCulture that has a custom translation. Probably look into that translation for some clue? 

#199738
Dec 09, 2018 8:44
Vote:
 

moved to commerce topic

#199739
Dec 09, 2018 18:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.