Unexpected exception occurred while processing activities

Leigh Chilcott asked on May 6, 2016 21:23

As of yesterday we have enabled Marketing Automation and set up several processes since then we're seeing the following errors in the event log and the Marketing Automation Processes don't seem to be working (due to the errors no doubt). Does anyone know how to resolve this? Event log is as follows:

Event ID: 346740
Event type: Error
Event time: 5/6/2016 3:17:48 PM
Source: ContactActionsLogWorker
Event code: Processing contact actions
User ID: 65
User name: public
IP address:
Description: Unexpected exception occurred while processing activities.
Message: [AutomationManager.User]: User context is not initialized.

Exception type: System.NullReferenceException
Stack Trace: 
at CMS.Automation.AbstractAutomationManager`1.get_User()
at CMS.Automation.AbstractAutomationManager`1.GetNextSteps(InfoType infoObj, AutomationStateInfo stateObj)
at CMS.Automation.AbstractAutomationManager`1.MoveToNextStepInternal(InfoType infoObj, AutomationStateInfo stateObj, String comment, WorkflowTransitionTypeEnum transitionType)
at CMS.Automation.AbstractAutomationManager`1.MoveToNextStep(InfoType infoObj, AutomationStateInfo stateObj, String comment, WorkflowTransitionTypeEnum transitionType)
at CMS.Automation.AbstractAutomationManager`1.StartProcessInternal(InfoType infoObj, Int32 processId, ObjectWorkflowTriggerInfo trigger)
at CMS.Automation.Trigger.Process(TriggerOptions options)
at CMS.Automation.TriggerHelper.ProcessTriggersInternal(TriggerOptions options)
at CMS.OnlineMarketing.OnlineMarketingHandlers.RunActivityTriggers(Object sender, ProcessContactActionsBatchEventArgs e)
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler`1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List`1 list, TArgs e, Boolean important)
at CMS.Base.AdvancedHandler`2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler`2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler`2.Finish()
at CMS.OnlineMarketing.ContactActionsQueueProcessor.ProcessAllContactActions()
at CMS.OnlineMarketing.ContactActionsLogWorker.ProcessActions()

Message: [AutomationManager.User]: User context is not initialized.

Exception type: System.NullReferenceException
Stack Trace: 
at CMS.Automation.AbstractAutomationManager`1.get_User()
at CMS.Automation.AbstractAutomationManager`1.GetNextSteps(InfoType infoObj, AutomationStateInfo stateObj)
at CMS.Automation.AbstractAutomationManager`1.MoveToNextStepInternal(InfoType infoObj, AutomationStateInfo stateObj, String comment, WorkflowTransitionTypeEnum transitionType)
at CMS.Automation.AbstractAutomationManager`1.MoveToNextStep(InfoType infoObj, AutomationStateInfo stateObj, String comment, WorkflowTransitionTypeEnum transitionType)
at CMS.Automation.AbstractAutomationManager`1.StartProcessInternal(InfoType infoObj, Int32 processId, ObjectWorkflowTriggerInfo trigger)
at CMS.Automation.Trigger.Process(TriggerOptions options)
at CMS.Automation.TriggerHelper.ProcessTriggersInternal(TriggerOptions options)
at CMS.OnlineMarketing.OnlineMarketingHandlers.RunActivityTriggers(Object sender, ProcessContactActionsBatchEventArgs e)
at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler`1 h, TArgs e)
at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List`1 list, TArgs e, Boolean important)
at CMS.Base.AdvancedHandler`2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler`2.RaiseAfter(TArgs e)
at CMS.Base.AdvancedHandler`2.Finish()
at CMS.OnlineMarketing.ContactActionsQueueProcessor.ProcessAllContactActions()
at CMS.OnlineMarketing.ContactActionsLogWorker.ProcessActions()
Machine name: WEB2
Event URL:
URL referrer:
User agent:

CMS version is 8.2 HotFix 8.2.48

Correct Answer

Leigh Chilcott answered on May 9, 2016 16:02

Actually found the answer to this with a little help from Kentico Support. The Default user set in the settings app System > General > Default User ID was set to a user ID that didn't actually exist in our database

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.