title: Evaluation of condition failed. Rule item ID: Unknown, condition item ID: Unknown - Operation not valid due to the current state of the object
body: <p>I'm reviewing the Sitecore logs in my site and I'm getting a huge number of the following error:</p>
  
  <blockquote>
    <p>ERROR Evaluation of condition failed. Rule item ID: Unknown, condition item ID: Unknown</p>
    
    <p>Exception: System.InvalidOperationException</p>
    
    <p>Message: Operation is not valid due to the current state of the object.</p>
    
    <p>Source: Sitecore.ExperienceAnalytics
       at Sitecore.ExperienceAnalytics.Aggregation.Rules.AggregationAdaptor.HistoricalVisitContextBase.GetPages()
       at Sitecore.Analytics.Rules.Conditions.HasVisitedPageCondition<code>1.Execute(T ruleContext)
       at Sitecore.Rules.Conditions.WhenCondition</code>1.Evaluate(T ruleContext.......</p>
  </blockquote>
  
  <p>In the past week, this error has occurred >10,500 times</p>
  
  <p>I don't know what to do to figure out what is causing the error or to resolve it. I don't know if it's affecting site performance or not, but I'd like to resolve this issue so I don't have >10k errors happening each week.</p>