06-30-2021 04:08 AM - edited 09-29-2022 07:23 PM
From the Gallery Admin view, the Schedule Forecast page does not load and is stuck on "Loading forecast data".
To confirm that you are facing this specific defect, search for this error in your Gallery logs .
Sequence contains no elements
Full error message
2021-06-28 18:14:55.096408,ERROR,12,ErrorHandler,HandleError,dxxx2,6xxx1,127.0.0.1,MACHINE1,Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0,GET,/gallery/api/scheduler/forecast/,500,9543,Exception caught by ErrorHandler and marshaled to client,"System.InvalidOperationException: Sequence contains no elements-> at System.Linq.Enumerable.Average(IEnumerable`1 source)-> at Alteryx.Server.Models.Presenters.SchedulerPresenter.GetScheduleForecast(DateTime startDate, DateTime endDate)-> at Alteryx.Server.Models.Presenters.SchedulerPresenter.GetScheduleForecastSummary(DateTime startDate, DateTime endDate, Int32 timeSlotSize)-> at Alteryx.Server.Api.Services.SchedulerService.GetScheduleForecast(DateTime startDate, DateTime endDate, Int32 timeSlotSize)-> at SyncInvokeGetScheduleForecast(Object , Object[] , Object[] )-> at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)-> at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)-> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)-> at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)-> at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)"
Product defect DE33912/TGAL-2885.
This issue occurs when this page is unable to find past workflow runs for scheduled jobs.
These historical runs are typically missing if your instance has the Persistence Options in Alteryx System Settings (Controller > Persistence > Persistence Options) for "Delete Queue and Results after" enabled. However, end-users do have the ability to delete workflow results from the Gallery on the Workflow Results page as well.
For example:
This defect has been fixed starting from Server version 2021.3. Upgrading to version 2021.3 or newer should resolve the issue.
You can use the Gallery logs to identify the Schedule that is causing this issue with the following:
Sequence contains no elements
db.getCollection("AS_Schedules").find({"AS_Application__ID" :"5xxxxxxx"})
removed