AnsweredAssumed Answered

Error in task. Object reference not set to an instance of an object.

Question asked by michaels750 on Jul 3, 2016
Latest reply on Sep 28, 2016 by michaels750

Hi I have a workflow and form that I've been building and it's suddenly stop working.

 

All items return an error of 'Sorry, something went wrong' and the workflow errors: 'Error in task. Object reference not set to an instance of an object.'

 

I've found these errors when opening any workflow task within the workflow:

 

Failed to find the default form for PAGETYPE PAGE_EDITFORM.  Details:  

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.SetFormMode()   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.InitialiseForm(Boolean hasEnterpriseLicense)   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.OnInit(EventArgs e)   

at System.Web.UI.Control.InitRecursive(Control namingContainer)   

at System.Web.UI.Control.InitRecursive(Control namingContainer)   

at System.Web.UI.Control.AddedControl(Control control, Int32 index)   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateChildControls()   

at System.Web.UI.Control.EnsureChildControls()   

at Microsoft.SharePoint.WebPartPages.WebPart.get_WebPartMenu()   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.CreateWebPartMenu()   

at Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnLoad(EventArgs e)   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Control.LoadRecursive()   

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)   

at System.Web.UI.Page.ProcessRequest()   

at System.Web.UI.Page.ProcessRequest(HttpContext context)   

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)   

at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)   

at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)   

at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)   

at System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)   

at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)

Failed to retrieve form from workflow. Error: Object reference not set to an instance of an object.. Stack trace:  

at eBs=.Xhw=.Yxw=(NWContextDataCollection ZBw=, Approver ZRw=, NWWorkflowContext Zhw=, ContextDataOptions Zxw=, Boolean aBw=)   

at Nintex.Workflow.HumanApproval.ListWorkflowApprovalContext.GetContextData(Approver appover, ContextDataOptions options, Boolean forceRefresh, Boolean retrieveForLogging)   

at Nintex.Forms.SharePoint.NintexWorkflowMethods.AddContextData(SPWeb web, Guid list, SPListItem listItem, ContextDataCollection formsContextData, Collection`1 variables, PublishingType publishingType, Nullable`1 instanceId, Approver approver, ContextKeyCollection keysUsed, ContextDataOptions contextDataOptions)   

at Nintex.Forms.SharePoint.NintexWorkflowMethods.FormPreProcessorGetContextData(SPWeb web, Guid list, SPListItem listItem, String serializedForm, Collection`1 variables, PublishingType publishingType, SPControlMode formMode, Nullable`1 instanceId, Approver approver)   

at Nintex.Forms.SharePoint.TaskHelper.FormPreprocessor(SPListItem task, SPListItem listItem, String serializedForm, Collection`1 workflowVariables, Approver approver, HttpRequest request, SPControlMode sharePointControlMode)   

at Nintex.Workflow.Forms.ControlTemplates.TaskForm.GetForm(String formKey, FormData formData, Boolean hasEnterpriseLicense)

Failed to handle form host page on initialize event. Error: Object reference not set to an instance of an object.. Stack trace:   .....

Application error when access /sandbox/michael/Modification Request2/Lists/Workflow Tasks/DispForm.aspx, Error=Object reference not set to an instance of an object.  .....

System.NullReferenceException: Object reference not set to an instance of an object.  

at eBs=.Xhw=.Yxw=(NWContextDataCollection ZBw=, Approver ZRw=, NWWorkflowContext Zhw=, ContextDataOptions Zxw=, Boolean aBw=)   

at Nintex.Workflow.HumanApproval.ListWorkflowApprovalContext.GetContextData(Approver appover, ContextDataOptions options, Boolean forceRefresh, Boolean retrieveForLogging)   

I'm not exactly sure where this came from, I cannot be sure what changes I made to cause this. I've only been updating the workflow emails and task forms. I've reverted back a few revisions of the workflow and the issue is still occurring so I'm at a loss.

Outcomes